Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: LDStudios on January 29, 2014, 06:11:58 pm

Title: nRaged
Post by: LDStudios on January 29, 2014, 06:11:58 pm
So today, i made a simple rage game for nspire.
Its about 1 hours work, 83 lines of code, and 2KB, so nothing special, really just me practicing some varius techniques in lua.

How to play:
Move the curser around, and the blue square will follow it.
The closer the square is to the cursor, the slower it will move.
Avoid the red squares that spawn every .03 seconds.
The Red squares move slower when they are near the blue square.
Try not to die

Screenshots here, and a download below :)

(http://img.ourl.ca/nraged%20title.jpg)

(http://img.ourl.ca/nraged.jpg)

EDIT: Just a warning, this game runs incredibly fast on the student software, if you want me to change that I can, but I thought it was exciting that way, so for now, if you want to play it at a normal speed, do it on calc

EDIT: Now compatable with OS 3.1
Title: Re: nRaged
Post by: DJ Omnimaga on January 29, 2014, 06:37:52 pm
Interesting, I can't try right now, but is it a bit like
for the 84+? (other than the squares getting slower as they get closer to the blue one)
Title: Re: nRaged
Post by: LDStudios on January 29, 2014, 06:40:25 pm
Its kind of like that. The main difference is that you control it with the cursor, and the blue square follows the cursor, rather than directictly controlling the square. Also, just having cursor controls in general is pretty different. Also, you dont have to collect items, and there is an infinite number of enemies spawning
Title: Re: nRaged
Post by: fb39ca4 on January 29, 2014, 08:23:48 pm
Are there any timers you could use to regulate the framerate?
Title: Re: nRaged
Post by: LDStudios on January 29, 2014, 10:46:45 pm
@fb39ca4: I'm not sure what you mean by that. Could you explain?
Anyways, I optimized a bit, made it harder, and slowed it down on student software. I cant promise it will work on 3.1 though because im not sure if platform.hw() works with 3.1. If not, just use the link at the top.
Title: Re: nRaged
Post by: DJ Omnimaga on January 30, 2014, 12:11:21 am
Ok so the last version didn't work, but the previous one did. Nice game, I wish the Nspire touchpad in Lua and in the OS was as responsive as in Ndless programs, since sometimes I find myself stuck D:, but that's  TI fault.
Title: Re: nRaged
Post by: fb39ca4 on January 30, 2014, 12:42:48 am
@fb39ca4: I'm not sure what you mean by that. Could you explain?
Anyways, I optimized a bit, made it harder, and slowed it down on student software. I cant promise it will work on 3.1 though because im not sure if platform.hw() works with 3.1. If not, just use the link at the top.

You can use timer.getMilliSecCounter to get the time in milliseconds, and from that calculate the time since the last frame. You can either have everything move proportional to the delta time, resulting in a variable framerate yet constant gameplay speed, or wait for the delta time to reach a certain amount, resulting in a constant framerate.
Title: Re: nRaged
Post by: Sorunome on January 30, 2014, 10:48:32 am
Looks like an interesting concept to me, nice :)
Title: Re: nRaged
Post by: LDStudios on January 30, 2014, 02:09:39 pm
01101000 01101111 01101111 01110010 01100001 01111001 00100000 01100110 01101111 01110010 00100000 01100010 01101001 01101110 01100001 01110010 01111001 !!!!!!!!!!!!!

(http://img.ourl.ca/binary.jpg)

(http://img.ourl.ca/binary%20over.jpg)