Log In  
Follow
Andre4s
[ :: Read More :: ]

Cart #26987 | 2016-08-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


You are a knight in a castle where some trigger happy ghosts live. You need to find your way out of the castle. The game have 4 levels. Collect keys to open doors to get to the next level. You can also collect coins, 5 coins and you will remain on the same level when you die. Else you will end up in the previous level.

P#26989 2016-08-16 10:39 ( Edited 2016-08-16 14:39)

[ :: Read More :: ]

Cart #26683 | 2016-08-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Here I have played around a bit with animations. I have combined both sprite animations and particle animations to make it look good. The sprite animations are done with a "config" structure so that I can use the same functions for drawing the animations later. Actors and particles are seperated in there own tables. I think this is best if you want to do collision detection later.

Now I want to improve the code and what some suggestions. I have not used Lua and I am sure you can see that on the code. Currently it use 870 tokens. This must be improved I guess? I guess every token counts in the end when you are creating a complete game. But I think there is a lot of stuff that can be improved.

I do also have some questions. For example I update and delete disabled actors like this, is this safe? or can this result in that some actors are updated multiple times peer loop etc?

    for a in all(actors) do
        if(a.enabled) then
            a.update(a)
        else
            del(actors, a)
        end
    end
P#26684 2016-08-09 05:10 ( Edited 2016-08-09 10:47)

[ :: Read More :: ]

Cart #26727 | 2016-08-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


Changes:

  • Some cleanups
    Cart #24743 | 2016-07-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    3


    Cart #24660 | 2016-07-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    3


    How to play the game:
    You win when there is only one marble left on the board. You remove marbles by jumping over them to a empty slot of the board. If you select a marble and there is only one valid move to make from this selection this move will be executed automatically. if there are multiple valid destinations you have to specify where to move the selected marble.

Good luck!

P#24663 2016-07-05 19:21 ( Edited 2016-08-10 15:42)

Follow Lexaloffle:          
Generated 2024-04-18 15:51:44 | 0.070s | Q:18