Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: Adriweb on December 01, 2012, 11:06:17 am
-
Hi guys :)
A few days ago, I got bored and looked around what I could quickly do, and making Doodle Jump was what I thought first :D
So, after a few hours, here's what I've coded so far.
Updates : Graphics + main/welcome menu :)
(http://i.imgur.com/gYOLfm.png) (http://i.imgur.com/OuZpY.png) (http://i.imgur.com/1RLdk.png)
You can also play online :) (but resize the window to approximately the image's size :P)
http://education.ti.com/html/nspireplayer/3.2.0/application/index.html?locale=en&nspirefile=https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua32.tns
BTW : when launching the .tns, please either zoom up to 150% on the computer view, or switch to the handheld view ;)
Download :
- TI-Planet : http://tiplanet.org/forum/archives_voir.php?id=9446
- GitHub : https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua.tns
( Version with bakcground image for 3.2 : https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua32.tns )
Source Code : https://github.com/adriweb/Doodle-Jump-Lua/blob/master/DoodleJumpLua.lua
-
Looks great so far, but maybe it should be slown down a little bit...?
And can you maybe remove the cross so that it looks smoother? ;)
-
Looks great so far, but maybe it should be slown down a little bit...?
And can you maybe remove the cross so that it looks smoother? ;)
Thanks.
Let me explain the thing :P
On the software, as usual, it looks smooth and all. On Calc it's still a bit slower. I'll see what I can do with that...
The "cross" is here so that you can actually control the game with the touchpad/mouse.
BTW : you can move left with left or [1] or [4] or [7], and right with right or [3] or [6] or [9], and shoot (at no enemies for now but they will come ^^) with click or 2 or 5 or 8.
-
ok cool , i don't have an nspire myself but i thought, let's take a look :p (i'm gonna download an emulator anyway
-
Awesome!
This is more fun than the original game when you use the mouse, but the mouse doesn’t work well on the handheld.
Normally the touchpad is slow in responding, but with Lua, and especially a timer and graphics, it is very unresponsive.
But it’s still very fun even with the d-pad and the keyboard.
One thing I notice is that in the generation of the platforms, it seems that every now and then there is a section with no platforms and is too large to jump over, but good work anyway!
\\Next, add an accelerometer :)
-
Thanks !
This is more fun than the original game when you use the mouse, but the mouse doesn’t work well on the handheld.
Normally the touchpad is slow in responding, but with Lua, and especially a timer and graphics, it is very unresponsive.
But it’s still very fun even with the d-pad and the keyboard.
Hmmm, the touchpad isn't working so badly for me, with this script, I can play with no problems.
But yeah, universal control -> keyboard :P
One thing I notice is that in the generation of the platforms, it seems that every now and then there is a section with no platforms and is too large to jump over, but good work anyway!
I know, since it's all kinda random I don't control that, but let's say it's part of the game ? Always trying to get the highscore no matter what happens :P
Next, add an accelerometer :)
Sure, why not - Sadly I don't have the required Vernier sensors to test, though ^^
Edit :
Update : Graphics :)
(http://i.imgur.com/gYOLfm.png)
http://tiplanet.org/forum/archives_voir.php?id=9446
-
wow, this is pretty epic O.o gread work!
-
Version 1.2 :
- Welcome/Main Screen (with scrolling background :D)
- Highscore displayed
- Pause
- Original game scrolling mode (changeable)
(http://i.imgur.com/aOaUdm.png)
Same download link, or on github (always latest : https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua.tns)
-
stop making it awesome :P
Now add the different themes :P
-
Looks good, but can't test it right now because it seems to be a 3.2 document :/
-
I saved it with 3.1, I hope I didn't push to github the one with 3.2... Can you redownload the latest .tns from GitHub ?
I'll see tomorrow morning, sorry.
You can still try online : http://education.ti.com/html/nspireplayer/3.2.0/application/index.html
-
The latest one from GitHub works now, thanks.
It's very hard to survive more than one second :P
-
Hmm My best score is 750, but it's all randomly generated ^^
-
Version 1.3 with background image for 3.2 OSes, and some other little things and optimizations.
(thanks @ Jim Bauwens)
(http://i.imgur.com/rDScQ.png)
You can also play online :) (but resize the window to approximately the image's size :P)
http://education.ti.com/html/nspireplayer/3.2.0/application/index.html?locale=en&nspirefile=https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua32.tns
(mac or windows)
Download :
- For < 3.2 : https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua.tns
- For 3.2 : https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua32.tns
-
What bug are you fixing? I was reading your code and saw "-- fix of TI Bug...."
-
Yeah, there is a timer issue on 3.2, which that fixes :
-- fix of TI Bug....
local tstart = timer.start
function timer.start(ms)
if not timer.isRunning then
tstart(ms)
end
timer.isRunning = true
end
local tstop = timer.stop
function timer.stop()
timer.isRunning = false
tstop()
end
-
But what does it fix, or is it too technical/unknown and it is just known this fixes it?
-
Well, I'm not sure why it acts that way, but they probably chanced its internals and since then, when you call a timer.start() while there was another one running, it simply didn't start.
The fix here monitors when ther is a call to timer.start and stop and calls the stop() before starting another :P
We have reported that bug :)
-
Just the weird part is that I have never encountered this bug :P
-
All right, Version 1.4 (beta) :
- Better platforms generation (:P)
- Better collisions detections
- Enemies !
(Still has the weird bug I've spent a few hours on but I can't understand- basically, the doodle will keep going up without bouncing, sometimes, when it goes through a jumpable platform, without bouncing on it first)
(http://i.imgur.com/OuZpY.png)
-
The highscore always resets when restarting the game on 3.1 (at least for me). And did you notice that in not constant scrolling mode it's almost impossible because the jump heights are much too short if the level doesn't go down while you're going up?
Also lol, I thought it was intended that you could jump without bouncing on the platforms :P
-
The highscore always resets when restarting the game on 3.1 (at least for me). And did you notice that in not constant scrolling mode it's almost impossible because the jump heights are much too short if the level doesn't go down while you're going up?
Also lol, I thought it was intended that you could jump without bouncing on the platforms :P
Hmm, weird, the scores should be saved.
I'll redo it in pure lua anyway (for now it's a basic variable, but there is a save/resotre thing in lua, kinda made for these things :D)
And yeah, about the constant scrolling, it's actually doable kindof on the software, I haven't tested that mode on-calc :D
Maybe I should indeed make it jump higher :P
However, you can trigger this mode if you ever find yourself stuck in the normal mode a little bit too low :D