Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: hoffa on June 11, 2011, 10:38:56 am

Title: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 11, 2011, 10:38:56 am
Hello,

I've been working on a copter-like game called Pixel Escape for a few days. If you have ever played the Copter Game (http://www.coptergame.net/), you should know what this is about. It's the same thing except there's no copter, but a "pixel" (I initially wanted to make it with a copter, but while I was testing the movement with a primitive rectangle, I realized it was quite nice with a trail of squares (looks like a sperm I have to admit), and decided to stick with it).

(http://webgel.net/bf/12/screen1.png) (http://webgel.net/bf/15/screen2.png)

(http://webgel.net/bf/10/screen3.png) (http://webgel.net/bf/3/screen4.png)

I filmed it while playing, here you go: (Edit: I'm more or less constantly changing things so the video won't be up-to-date):



The number at bottom left is the current score, while the one in the bottom right is the best score. The game gets harder as your pixel gets further.
Download link somewhere here (http://hoffa.franceserv.fr/) (june 16 update).
The controls won't be that great if you try it on the computer, especially because of the huge clock difference.
In order to save your score, close the document with the Ctrl + W key combination (which is how you close a document, for anyone who didn't know), it should then ask to save or not.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Spyro543 on June 11, 2011, 10:43:52 am
Wow ;D Looks like quite the fun tunnel game :D I hope it's not as hard as Psychedelic Tunnel, and I hope it doesn't ruin my screen as much ;) What are the controls?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: GB on June 11, 2011, 10:44:04 am
I'll have to load this on my TI-Nspire and try it out.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 11, 2011, 10:45:53 am
Wow ;D Looks like quite the fun tunnel game :D I hope it's not as hard as Psychedelic Tunnel, and I hope it doesn't ruin my screen as much ;) What are the controls?
Just up. The only thing you can do is give some power to the pixel (just as in the copter game I linked in my first post).
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: pianoman on June 11, 2011, 10:57:06 am
Awesome!
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Stefan Bauwens on June 11, 2011, 11:23:36 am
This looks nice. Would you add "floating" walls( /me forgot the name ) ?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 11, 2011, 11:31:05 am
This looks nice. Would you add "floating" walls( /me forgot the name ) ?
You mean in the same way as in the Flash game? I was thinking about, but wasn't sure if it would make the game too hard. I was also thinking about a "surprise factor" (which I will probably use) to have sudden drops or rises, adding some more difficulty to the game. Also increasing the speed of the "pixel" as it gets further. I'll maybe also add a light scrolling background. I'll try out and see how the difficulty is and stuff like that. I might even try to add an options page to change the setting, we'll see.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Jim Bauwens on June 11, 2011, 11:32:33 am
Looks pretty nice, good job Hoffa!
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Kjelddy on June 11, 2011, 12:24:17 pm
this game looks really nice. I hope you will make it avalaible soon. So I can play it :)

KJ
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: ztrumpet on June 11, 2011, 12:40:14 pm
This looks great!  Nice job. :)
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: DJ Omnimaga on June 11, 2011, 02:31:20 pm
Wow nice! Do you plan to release it soon? Also I didn,t know Lua was that fast. Most other games runs at like 4-8 FPS it seems.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Adriweb on June 11, 2011, 02:38:03 pm
looks very nice :)
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 11, 2011, 04:27:40 pm
Alrighty first version is ready! I added a new YouTube video so you can see what it looks like. I also added the download link if you want to try it out. It now has ranks (I'll let you discover them by yourself), the difficulty increases as you advance further in the cave and some other things.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Kjelddy on June 11, 2011, 05:04:10 pm
NICE
i got to 1481 so far ty very much
btw i played it on my CX so it works there :D
but the highscore isn't saved when i close the program and then open it again
(i am not sure if thats a CX issue or normal one)


edit: score
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 11, 2011, 05:22:26 pm
NICE
i got to 1481 so far ty very much
btw i played it on my CX so it works there :D
but the highscore isn't saved when i close the program and then open it again
(i am not sure if thats a CX issue or normal one)
I know, I think I have a solution for that and will try to make it save the high score even after closing the program (Nspire's Lua doesn't allow writing in files though). I also changed adjusted some settings (adjusted speed, gravity, other things that make the game slightly harder and ranks); just updated the first post for the new download link.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: GB on June 11, 2011, 06:15:56 pm
What is the picture on the title screen?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 11, 2011, 06:36:08 pm
What is the picture on the title screen?
It should be the exit of a cave seen from the inside. :°
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: DJ Omnimaga on June 11, 2011, 11:26:39 pm
Nice I didn't see the download link earlier. I'll try the game on my calc when I get some time.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: BrownyTCat on June 12, 2011, 02:52:41 am
HOLY-/me encountered a buffer overflow.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 12, 2011, 05:48:18 am
I've tuned the settings (speed, gravity, ranks, the speed at which the size of the gap decreases, and now it's much easier to go up, so no need to furiously hammer the up key anymore), changed the way the cave is generated and modified some minor things. Now the cave has things like these (just slopes I guess):
(http://bb.xieke.com/files/10/screen.png)
Also now the game doesn't lose the high score as soon as you close the document. Now when you do quit the game, it should ask you whether or not you want to save the document, pressing yes will save the high score. The new download link should be there now.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Adriweb on June 12, 2011, 05:50:09 am
Do you use a var.store to 'externally' save the score to a math variable ?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 12, 2011, 05:54:09 am
Do you use a var.store to 'externally' save the score to a math variable ?
Yes, but I tried accessing it externally without success (which is a good thing). Maybe it creates its own namespace only accessible through the document itself.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Jim Bauwens on June 12, 2011, 05:59:33 am
Indeed, the variable is only accessible from the current document (you can access it when adding a calculator page and typing the name of the variable)
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: ztrumpet on June 12, 2011, 02:19:39 pm
Also now the game doesn't lose the high score as soon as you close the document. Now when you do quit the game, it should ask you whether or not you want to save the document, pressing yes will save the high score. The new download link should be there now.
That's a neat way to do that. :)  It sounds cool. :D
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Chockosta on June 13, 2011, 05:12:04 am
Great !
This game looks very nice, congrats !
(But the picture on the title screen must be quite heavy and not really useful)
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 13, 2011, 05:37:04 am
Great !
This game looks very nice, congrats !
(But the picture on the title screen must be quite heavy and not really useful)
Well, the picture on the title screen is the title screen picture after all. It might be heavy as raw text, but once it is processed and compressed by TI's tool, it gets very light. The "not really useful" is more subjective than anything else, some people might prefer to have a text-based game without graphics at all. They could just give out all those commercial games you see in shops in a small cardboard box; the artwork doesn't add anything to the game. I personally like to have a title screen, I guess I must be a perfectionist.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Chockosta on June 13, 2011, 01:48:29 pm
Yes it does look good, but it's only decorative.
Of course I prefer games with wonderful graphics rather than text-only games.
The picture is heavier than the code, and I think that's strange... But this is not a big problem.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 13, 2011, 02:17:40 pm
Okay new update. First of all I changed that depressive title screen into a less depressive one (long live monochrome displays! :3), and now the high score shows up there also. Then I added the "floating walls" to spice up the game, just cruising straight forward in the cave won't be enough anymore. I fine-tuned the settings and cleaned up the chamber of horrors (i.e. source code) into a polished piece of art. Also some slight performance improvements were made. Download link's there now.

Yes it does look good, but it's only decorative.
Of course I prefer games with wonderful graphics rather than text-only games.
The picture is heavier than the code, and I think that's strange... But this is not a big problem.
Well the whole point of graphics is that it's just eye candy. A well-decorated and good-looking dish is always better than the same food in a rusty old barrel.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: DJ Omnimaga on June 13, 2011, 02:48:17 pm
This looks nice! Also I like how you use different text fonts for the numbers at the bottom.

Also since the title screen is 16 level grayscale in the first screenshot, how large is it on calc? Somehow I think it must be larger than the entire game, but I could be wrong O.O

EDIT: Bug report, I can only press the up arrow once. If I release the key, afterward it never detects anymore arrow key holding down again so after my first jump I fall down and die, no matter if I keep the up arrow pressed. ???
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 13, 2011, 02:54:17 pm
This looks nice! Also I like how you use different text fonts for the numbers at the bottom.

Also since the title screen is 16 level grayscale in the first screenshot, how large is it on calc? Somehow I think it must be larger than the entire game, but I could be wrong O.O
Well once the game has been saved, it takes about 16K of space, which is practically nothing. The ZIP compression their format uses does a good job in compressing the picture (and anything for that matter), so no worries there.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 13, 2011, 02:59:49 pm
EDIT: Bug report, I can only press the up arrow once. If I release the key, afterward it never detects anymore arrow key holding down again so after my first jump I fall down and die, no matter if I keep the up arrow pressed. ???
You mean when holding the key down? If yes, well then it hasn't got much to do with the program itself, but rather the way the whole OS has been made (or whatever that deals with the key presses). It only starts sending the key signals while you hold the button down after a short delay, and there is, as far as I know, no practical and accurate way of knowing when the button is held down. The controls should be quite sensitive, so just try to get used to pressing the button rather than holding it down (at least until I find a nice way to deal with the issue).
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: DJ Omnimaga on June 13, 2011, 03:08:07 pm
Ah ok good.

What about the bug mentionned in my post edit above? (up arrow no longer responds after releasing it the first time). Basically the farthest I can even go is about 20 points or so, because after I moved up once, I can no longer do so again because the game no longer responds to my keypresses.

ActuallY nevemind, I just realized we still had to spam the up arrow to stay somewhat up. Holding it down is less responsive x.x
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 13, 2011, 03:32:15 pm
Ah ok good.

What about the bug mentionned in my post edit above? (up arrow no longer responds after releasing it the first time). Basically the farthest I can even go is about 20 points or so, because after I moved up once, I can no longer do so again because the game no longer responds to my keypresses.

ActuallY nevemind, I just realized we still had to spam the up arrow to stay somewhat up. Holding it down is less responsive x.x
I somehow feel that you didn't notice my previous message. :*
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: DJ Omnimaga on June 13, 2011, 03:48:34 pm
You double posted? O.O

But yeah I didn,t notice it, as I didn't see any edit in your other post x.x (and double-posting within 6 hours of the last post is normally not allowed :P).

Thanks for the advice, though. I decided to just mash the key over and over, since it's easier that way. By the way I love the game :D. I planned posting a news soon, but I was busy trying two other calc games as well, which kinda slowed me down, not to mention yesterday I worked 12 hours in a row and had two other news to post X.x
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Kjelddy on June 13, 2011, 04:32:01 pm
by me the saving of the highscore still doesn't work... I am not if i am doing something wrong or if its the calculator(CX) or the game itself.
I think I got the right version but I will check it out tommorow
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 13, 2011, 04:40:25 pm
You double posted? O.O

But yeah I didn,t notice it, as I didn't see any edit in your other post x.x (and double-posting within 6 hours of the last post is normally not allowed :P).

Thanks for the advice, though. I decided to just mash the key over and over, since it's easier that way. By the way I love the game :D. I planned posting a news soon, but I was busy trying two other calc games as well, which kinda slowed me down, not to mention yesterday I worked 12 hours in a row and had two other news to post X.x
Yeah, sorry my bad. Won't happen again. :)

by me the saving of the highscore still doesn't work... I am not if i am doing something wrong or if its the calculator(CX) or the game itself.
Try quitting the document using Ctrl + W (which is actually the way you really quit a document), it should then ask to save it.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: DJ Omnimaga on June 13, 2011, 05:13:56 pm
I didn't even know how to quit a document, lol. I just pressed HOME then menu when I selected the document, to close it, or simply ran another.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 14, 2011, 02:57:23 am
Hoffa, I just tried this game and I have to say it's awesome, the best game for Lua I've ever seen. It's not just the gameplay, which is cool, but it's also the design, the design of this game is great, the title screen, the instructions, score, highscore, the pixel, everything looks perfectly designed.

Very nice job!
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: fb39ca4 on June 14, 2011, 01:19:01 pm
:thumbsup:
Brings back fond memories of Cave for 83/84 calcs.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 14, 2011, 05:42:55 pm
hoffa, could you release the source please? I'd be delighted.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Jim Bauwens on June 15, 2011, 04:39:59 am
I just tried it, and I must say its pretty epic!
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: aeTIos on June 16, 2011, 10:43:42 am
This game is cool. I dont have a nSpire to try, though...
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 16, 2011, 12:54:28 pm
hoffa, could you release the source please? I'd be delighted.
Sorry, didn't notice your message. Sure I will. I also updated the game, so it's up to 0.9 now (fine-tuned the settings some more, made the ranks realistically achievable, now the high score is saved as soon as the pixel hits a wall, added a small readme.txt file). I edited my first post, the new download link is on the website. I also released the source code, as you wished. :)
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 16, 2011, 12:56:08 pm
hoffa, could you release the source please? I'd be delighted.
Sorry, didn't notice your message. Sure I will. I also updated the game, so it's up to 0.9 now (fine-tuned the settings some more, made the ranks realistically achievable, now the high score is saved as soon as the pixel hits a wall, added a small readme.txt file). I edited my first post, the new download link is on the website. I also released the source code, as you wished. :)

Looking great thanks a lot, time to fork it! :P
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: hoffa on June 16, 2011, 02:51:41 pm
This was quick, but it's going 1.0 now. I fixed a small bug in the title screen (pressing the up arrow in the menu would make the "pixel" in the game change position) that Scout pointed out. The dot is now controlled using either tab or enter (which also means that doing sharp rises when both are pressed is possible), because the arrow key is useless. I initially wanted the player to be able to hold the key, but because the way the OS deals with key signals is crap, it has no advantage. After all tab or enter are also more comfortable and precise. Now the player can return to the title screen at any moment by pressing ctrl + menu. I made some other minor changes and slightly changed the code. This way I have a stable and clean version to work on later. The new download links are on the website.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 17, 2011, 09:51:50 am
This was quick, but it's going 1.0 now. I fixed a small bug in the title screen (pressing the up arrow in the menu would make the "pixel" in the game change position) that Scout pointed out. The dot is now controlled using either tab or enter (which also means that doing sharp rises when both are pressed is possible), because the arrow key is useless. I initially wanted the player to be able to hold the key, but because the way the OS deals with key signals is crap, it has no advantage. After all tab or enter are also more comfortable and precise. Now the player can return to the title screen at any moment by pressing ctrl + menu. I made some other minor changes and slightly changed the code. This way I have a stable and clean version to work on later. The new download links are on the website.

I just downloaded and tested, looking very good :D
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 18, 2011, 05:14:36 pm
http://paste.bwns.be/p/f16dc06e3 (http://paste.bwns.be/p/f16dc06e3)

I made that, what if the score is automatically updated, like in most calculator games? I'd like that.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Progammer on June 18, 2011, 08:43:29 pm
Good !
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 19, 2011, 05:46:43 am
Code: [Select]
function on.deleteKey()
    if onTitleScreen then
        bestScore = 0
        var.store(magic, bestScore)
    end
end

I also tried that so that when we press DEL in Title Screen, HighScore is restored, it didn't work, but can you add that please?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: BrownyTCat on June 23, 2011, 01:45:11 am
I tried the latest version of the application on my Clickpad with OS3.0.2 and it was good, but the controls were very unresponsive. I'm guessing this was made on a touchpad?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 23, 2011, 07:31:41 am
I tried the latest version of the application on my Clickpad with OS3.0.2 and it was good, but the controls were very unresponsive. I'm guessing this was made on a touchpad?

It works fine on my touchpad, but it should work with the Tab Button. Maybe because it's OS 3.0.2.?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: BrownyTCat on June 23, 2011, 08:01:11 pm
I tried the latest version of the application on my Clickpad with OS3.0.2 and it was good, but the controls were very unresponsive. I'm guessing this was made on a touchpad?

It works fine on my touchpad, but it should work with the Tab Button. Maybe because it's OS 3.0.2.?
I don't think 302 should have anything to do with it.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Munchor on June 24, 2011, 07:43:50 am
I tried the latest version of the application on my Clickpad with OS3.0.2 and it was good, but the controls were very unresponsive. I'm guessing this was made on a touchpad?

It works fine on my touchpad, but it should work with the Tab Button. Maybe because it's OS 3.0.2.?
I don't think 302 should have anything to do with it.

Then I have no idea. None of the keys work (UP, Tab or Enter)? That's really strange.
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: cypressx1 on July 26, 2011, 08:46:58 am
it's a nice game.can we share your codes?
Title: Re: [Nspire] Pixel Escape -- a copter-like game written in Lua
Post by: Somicstar on April 29, 2013, 09:54:56 am
Hey mate!
It's one of the best game i ever played (no joke!)
I have a new high score of 2634 points and my goal is to reach the 3000 mark. (I've a battle with a friend)

Can you tell me, whether it's possible to get this score, and is there an end? Do you have any special hints?

It would be nice if you give an answer, cause the last post goes back to 2011 :D

Thank you, you did a great job!

Greetz from Germany (sorry for any english mistakes ;)...)
Somic