[Question] Help With My Frogger Game
#1
Posted 21 December 2012 - 02:57 AM
https://github.com/H...ter/frogger.lua
#2
Posted 21 December 2012 - 02:40 PM
#3
Posted 21 December 2012 - 03:13 PM
#4
Posted 21 December 2012 - 04:50 PM
ChunLing, on 21 December 2012 - 03:13 PM, said:
how would I run them at the same time without parallel? I've never made a game so I have no idea how they are usually set up.
#5
Posted 21 December 2012 - 04:54 PM
Henness, on 21 December 2012 - 04:50 PM, said:
ChunLing, on 21 December 2012 - 03:13 PM, said:
how would I run them at the same time without parallel? I've never made a game so I have no idea how they are usually set up.
#6
Posted 21 December 2012 - 05:16 PM
#7
Posted 21 December 2012 - 05:17 PM
#8
Posted 21 December 2012 - 05:33 PM
#9
Posted 21 December 2012 - 06:29 PM
https://github.com/H...ter/frogger.lua
#10
Posted 21 December 2012 - 06:42 PM
That should fix at least some of your apparent lag, for the rest you'll just have to use better code to handle moving stuff, or only execute your really lag-prone code occasionally. Not everything should move every frame, after all.
#11
Posted 21 December 2012 - 07:23 PM
ChunLing, on 21 December 2012 - 06:42 PM, said:
That should fix at least some of your apparent lag, for the rest you'll just have to use better code to handle moving stuff, or only execute your really lag-prone code occasionally. Not everything should move every frame, after all.
Okay I fixed it I accidentally had the sleeps still in the objects function from when I had it in parallel. So it runs super smooth now, I just have to mess with the speeds of the objects. But I'm still back to my original problem, when you move to the end of a log or turtle the next time the object moves you get pushed off into the water.
https://github.com/H...ter/frogger.lua
Thanks for all the help this is a much better way of writing it then with the parallel api.
#12
Posted 21 December 2012 - 08:20 PM
#13
Posted 21 December 2012 - 11:19 PM
Henness, on 21 December 2012 - 08:20 PM, said:
Not sure about that but I accidentally left my computer on with your game playing and after a while the game starts flashing badly because it redraws a lot every second or so
#14
Posted 21 December 2012 - 11:35 PM
Try making a debug log by serializing all your tables and saving them to a file every now and then. Run the program and see if you have tables growing out of control, if not then I'd guess you're okay.
As for the falling of the backs of turtles/logs, are you only falling off the very last space? Cause you check death after moving stuff. Which makes sense but it could be pulling stuff out from under you at the last moment. Other than that just make sure you're drawing them where they're supposed to be.
#15
Posted 22 December 2012 - 12:22 AM
Anyway I still can't figure out the falling of objects bug. Any one have any ideas?
#16
Posted 22 December 2012 - 01:00 AM
#17
Posted 22 December 2012 - 03:10 AM
#18
Posted 22 December 2012 - 03:16 AM
#19
Posted 22 December 2012 - 11:59 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











