Author Topic: Doodle Jump in Lua  (Read 11836 times)

0 Members and 2 Guests are viewing this topic.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Doodle Jump in Lua
« 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 :)


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


« Last Edit: December 03, 2012, 02:30:34 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: DoodleJumpLua
« Reply #1 on: December 01, 2012, 11:10:00 am »
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? ;)
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: DoodleJumpLua
« Reply #2 on: December 01, 2012, 11:18:58 am »
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.
« Last Edit: December 01, 2012, 11:21:58 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: DoodleJumpLua
« Reply #3 on: December 01, 2012, 11:20:59 am »
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
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Doodle Jump in Lua
« Reply #4 on: December 01, 2012, 11:54:36 am »
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 :)
« Last Edit: December 01, 2012, 11:57:27 am by Rhombicuboctahedron »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Doodle Jump in Lua
« Reply #5 on: December 01, 2012, 01:22:05 pm »
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://tiplanet.org/forum/archives_voir.php?id=9446
« Last Edit: December 01, 2012, 01:31:51 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Doodle Jump in Lua
« Reply #6 on: December 01, 2012, 02:48:37 pm »
wow, this is pretty epic O.o gread work!

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Doodle Jump in Lua
« Reply #7 on: December 01, 2012, 04:10:39 pm »
Version 1.2 :
- Welcome/Main Screen (with scrolling background :D)
- Highscore displayed
- Pause
- Original game scrolling mode (changeable)



Same download link, or on github (always latest : https://raw.github.com/adriweb/Doodle-Jump-Lua/master/DoodleJumpLua.tns)
« Last Edit: December 01, 2012, 04:15:16 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Doodle Jump in Lua
« Reply #8 on: December 01, 2012, 04:11:29 pm »
stop making it awesome :P
Now add the different themes :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Doodle Jump in Lua
« Reply #9 on: December 01, 2012, 04:36:41 pm »
Looks good, but can't test it right now because it seems to be a 3.2 document :/

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Doodle Jump in Lua
« Reply #10 on: December 01, 2012, 06:01:17 pm »
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
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Doodle Jump in Lua
« Reply #11 on: December 01, 2012, 07:09:31 pm »
The latest one from GitHub works now, thanks.

It's very hard to survive more than one second :P

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Doodle Jump in Lua
« Reply #12 on: December 01, 2012, 07:33:33 pm »
Hmm My best score is 750, but it's all randomly generated ^^
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Doodle Jump in Lua
« Reply #13 on: December 02, 2012, 10:02:41 am »
Version 1.3 with background image for 3.2 OSes, and some other little things and optimizations.
(thanks @ Jim Bauwens)



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
« Last Edit: December 02, 2012, 10:05:50 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Doodle Jump in Lua
« Reply #14 on: December 02, 2012, 11:46:06 am »
What bug are you fixing? I was reading your code and saw "-- fix of TI Bug...."

Some people need a high five in the face... with a chair.
~EC