Omnimaga
Calculator Community => Casio Calculators => Topic started by: flyingfisch on June 11, 2012, 11:15:59 am
-
Hi all!
Working on my first game in LuaFX. So far all that happens is the ai cars try to avoid you.
Code: http://pastebin.com/5EWqXNzf (http://"http://pastebin.com/5EWqXNzf")
I am having trouble with the collisions detection right now... for some reason ai cars can "run over" you and you do not get the crash screen. The detection is done on line 231.
If people could test this program that would be great, so I have provided a *.lc for download:
Link (http://"http://www.casio-scene.com/downloads.php?do=file&id=453")
-
hi
i didn't test it (i don't have any casio calc), but i think i found the reason of the crash bug.
it's explained in the image (i hope you understand it xp)
(http://img.removedfromgame.com/imgs/crash.gif)
ok, i just saw a mistake in the image. the inequation signs have to be switched in the ai.x statements
in words: your ai.x value collides with the player.x value, so that's oogd
but for the y checking, you also have to iclude the height of the ai cars. in the ai.y<player.y+8 you have to change the ai.y to ai.y+ai.height <player.y+8
-
I should make a program to run these programs on a TI-Nspire. Shouldn't be too hard.
-
hi
i didn't test it (i don't have any casio calc), but i think i found the reason of the crash bug.
it's explained in the image (i hope you understand it xp)
(http://img.removedfromgame.com/imgs/crash.gif)
ok, i just saw a mistake in the image. the inequation signs have to be switched in the ai.x statements
in words: your ai.x value collides with the player.x value, so that's oogd
but for the y checking, you also have to iclude the height of the ai cars. in the ai.y<player.y+8 you have to change the ai.y to ai.y+ai.height <player.y+8
Ah, I will try that and tell you what happens. :)