Log In  
Follow
Cupps

Cart #cardhanddemo-0 | 2020-09-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

This is a demo on how to display the cards in a player's hand. Hope you find this useful!

--the amount of room for the cards to be in
hand_width = 96

--the size of the room in pixels
room_width = 128

--number of cards on screen
card_num = 0

--the width of the card in pixels
card_width = 12

--how many cards until they compress
card_fit_num = flr(hand_width/card_width)

function _update()

    --update card_num
    if btnp(❎) then
        card_num += 1
    end
    if btnp(🅾️) and card_num > 0 then
        card_num -= 1
    end
    --update hand_width
    if btn(⬆️) then
        hand_width += 1
    end
    if btn(⬇️) and hand_width > 12 then
        hand_width -= 1
    end
    card_fit_num = flr(hand_width/card_width)

end

function _draw()

    --draw stuff
    cls(1)
    print("card num:"..card_num,43,50,6)
    print("x to add card",37,58)
    print("c to retract card",29,64)
    print("⬆️⬇️ to change hand size",15,70)

    line(room_width/2-hand_width/2-2,98,room_width/2-hand_width/2-2,117)
    line(room_width/2-hand_width/2+hand_width+1,98,room_width/2-hand_width/2+hand_width+1,117)
    line(room_width/2-hand_width/2-2,98,room_width/2-hand_width/2+hand_width+1,98)
    line(room_width/2-hand_width/2-2,117,room_width/2-hand_width/2+hand_width+1,117)

    --where the magic happens
    if card_num > card_fit_num then
        for i=0,card_num-1 do
            spr(1,(room_width/2-hand_width/2)+(hand_width-card_width)*(i/(card_num-1)),100,2,2)
        end
    else
        for i=0,card_num-1 do
            spr(1,(room_width/2-hand_width/2)+hand_width/2-(card_width*(card_num/2))+(i*card_width),100,2,2)
        end
    end

end
P#82481 2020-09-30 23:27

Cart #shopshop-4 | 2020-09-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

The cart is completed! There are a few bugs with the seed menu but I'm too tired to mess with it anymore. If there are any game-breaking bugs please report them in the comments.

The song is an 8-bit remix of Amazing Plan by Kevin Macleod.
This is a cart based on I'll Take You To Tomato Town for my major project in school.

Random Seed Time: 00:31
Set Seed Time : XX:XX
Can you beat my times?

Arrow keys to move
X to show menu
C to toggle with shelves
X+C to shop minimap

P#80222 2020-08-02 02:03 ( Edited 2020-09-11 13:48)

Cart #react-0 | 2020-07-16 | Code ▽ | Embed ▽ | No License
1

Have to make my own experiment for a science assessment. I'm doing mine on how colour affects reaction time so I created this little cart to do so.

P#79400 2020-07-16 04:46 ( Edited 2020-09-11 13:11)

Cart #getbit-0 | 2020-04-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

To know how to play this game, check the official website to the card game this is based on.
https://www.ultraboardgames.com/get-bit/game-rules.php

P#74417 2020-04-02 10:51

Cart #dvdlogo-3 | 2019-05-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15

Made this game over the course of 2 days. I wanted to make something simple so I could familiarise myself with Lua so I made this. The best part is no matter where it spawns it will always hit the corner! Hope you guys enjoy. (Pls leave a star, I'd appreciate that :D)

Edit: Thank you so much for leaving such nice words about my game.
Update: Fixed a bug where if it spawned at x83 and moved right then it would clip out of the map.

P#63493 2019-04-14 08:23 ( Edited 2019-05-20 09:43)

Cart #templetombs-2 | 2019-01-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

this is my first game that I'm working on inspired by Tomb of the Mask. So far there's only 3 levels but there's more I want to do with this such as moveable boxes for puzzles and some hazards too.

P#60741 2019-01-10 23:57 ( Edited 2020-09-30 23:30)

Follow Lexaloffle:        
Generated 2020-11-25 05:19 | 0.119s | 4194k | Q:92