Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: cyanophycean314 on January 12, 2012, 07:52:28 pm

Title: Rush Hour
Post by: cyanophycean314 on January 12, 2012, 07:52:28 pm
Well, as a more long term project and for the Board Game Member Guild  :P, I think I'm going to work on Rush hour, based on the board game by ThinkFun.

For wikipedia entry, http://en.wikipedia.org/wiki/Rush_Hour_%28board_game%29 (http://en.wikipedia.org/wiki/Rush_Hour_%28board_game%29).

Right now I have a problem with tables. The levels are stored as tables with the positions of the cars and stuff. Basically, is there any equivalence of the python statement table2 = table1[:]? Basically, that copies the entire table1 to table2, but they no longer have the same reference. Is there any Lua idiom for that?

Oh, and I need some more levels. I plan on having at least 50 levels, so any level contributions are welcome! I could also port the 40 original levels, but I don't own the original version.

And a primitive screenie
Spoiler For Spoiler:
(http://img.removedfromgame.com/imgs/rushpic.gif)

Edit: Oh yeah, the colors work fine enough on grayscale, I'll probably change to sprites later on.

EDIT: Final version is out! Find it here. (http://ourl.ca/14847/299820)
Updated Screenie
Title: Re: Rush Hour
Post by: Jim Bauwens on January 13, 2012, 03:15:03 am
Nice :)
Are you planning on using TI-Images?
If you are, I can help you with the images (as I already had a part for my clone..).

Edit:
for the table copying, you can check out BetterLuaApi from Adriweb.
It contains some table copy functions :)
https://github.com/adriweb/BetterLuaAPI-for-TI-Nspire/blob/master/BetterLuaAPI.lua
Title: Re: Rush Hour
Post by: Nick on January 13, 2012, 09:01:30 am
ow great, yeah, i'll recommend you to change to sprites, it doesn't really need its speed, so why not, it can only be nice :)

looks great
Title: Re: Rush Hour
Post by: cyanophycean314 on January 13, 2012, 04:34:20 pm
Yeah, I'm going to be changing to TI-Images as sprites. I guess there's no Lua function for that, you just have to manually do it.

@jimbauwens: You wrote a clone of rush hour?  ??? But for the images, any help would be appreciated. Does that mean you're drawing the sprites?
Title: Re: Rush Hour
Post by: Jim Bauwens on January 13, 2012, 05:25:02 pm
I wanted to make it, but did not start on it because of other projects.
But I did get the images from the official game and resized them to suit the calculator.
I can give these to you :)

Edit:
What do you mean with "I guess there's no Lua function for that, you just have to manually do it."?
There are sprite functions available...
Title: Re: Rush Hour
Post by: cyanophycean314 on January 13, 2012, 09:26:06 pm
I was referring to the copying of tables, not the sprites.  :P Sorry for misunderstanding.

The sprites would be awesome! I guess you could post them here or PM me. Thanks a lot!  :D
Title: Re: Rush Hour
Post by: Xeda112358 on January 17, 2012, 07:32:37 pm
Cool, as another BGMG coder, I think I will attempt this at some point with Grammer. The screenie looks nice, too :)
Title: Re: Rush Hour
Post by: cyanophycean314 on January 17, 2012, 09:26:17 pm
Thanks Xeda! Isn't the BGMG a bit lonely? It's just you, epic7, and I right? We need some more members.  :D

Anyways, I've been working on a level editor for this, so you can create custom levels. I think you'll also be able to save them later on. Here's a screenie of it.

As of now, there are an entire 6 levels! Haven't ported too much yet...  :P
Title: Re: Rush Hour
Post by: willrandship on January 17, 2012, 09:27:22 pm
That's actually a really cool way to edit it! I like!
Title: Re: Rush Hour
Post by: AzNg0d1030 on January 17, 2012, 09:33:15 pm
Just make sure you don't create a level on the editor that isn't possible XD
Title: Re: Rush Hour
Post by: cyanophycean314 on January 17, 2012, 09:35:59 pm
You can create levels that are impossible... You can have super long vertical blocks that will block the entrance, but I don't think I can stop that, whatever.  :P
Title: Re: Rush Hour
Post by: Xeda112358 on January 18, 2012, 01:07:06 am
I think he means not to create an impossible level that is included XD But yeah, if the user wants to create a custom level that is impossible, let 'em :D
Title: Re: Rush Hour
Post by: ZippyDee on January 18, 2012, 02:06:40 am
I just wanted to point out that the actual game only ever has blocks with a length of either two or three...
Title: Re: Rush Hour
Post by: cyanophycean314 on January 22, 2012, 12:52:54 pm
 I realize that, but why not have some variety!  ;) Now has 12 levels.
Title: Re: Rush Hour
Post by: Yeong on January 22, 2012, 02:10:18 pm
Good to see this progressing. :)
Title: Re: Rush Hour
Post by: cyanophycean314 on January 31, 2012, 09:34:07 pm
Progress recently has been stalled due to two major tests, a physics competition (F=ma) and a musical audition. Development will resume by next week.

I will release it as soon as it hits 20 levels, but I plan on having around 60?
Title: Re: Rush Hour
Post by: hellninjas on January 31, 2012, 09:39:46 pm
Woa 60! :D This sounds like an addiction soon to fall upon me!
Title: Re: Rush Hour
Post by: cyanophycean314 on January 31, 2012, 09:47:49 pm
Basically all the original levels along with some random self-made and online ones
Title: Re: Rush Hour
Post by: Jim Bauwens on February 01, 2012, 02:23:16 am
Oh I forgot, here are the pictures.
You still need to rotate some of them 90 degrees.
Title: Re: Rush Hour
Post by: cyanophycean314 on February 03, 2012, 05:01:14 pm
Thanks! I'll have to change my code up a bit for sprites, but I'm sure it can be done.

 In the mean time, I currently have 52 levels!  :o I worked and ported 40 levels from the original game and the twelve I had before. So you guys can expect a release soon after the menu is done and sprites (possibly).
Title: Re: Rush Hour
Post by: Nick on February 03, 2012, 08:55:06 pm
wow, great, that's a lot of levels Ö i really hope you can add the sprites in, it would be very good looking..
Title: Re: Rush Hour
Post by: hellninjas on February 15, 2012, 03:21:58 pm
This looks like the "unblock me" app on the app store! Now i dont have to worry about my ipod dying! xD
Anyways, I like the progression of this game! Keep it going cyan!
Title: Re: Rush Hour
Post by: cyanophycean314 on February 15, 2012, 07:50:37 pm
Sorry progress has been so slow. I will work on finishing this! Menu interface is actually pretty far, but just is not finished up. Hopefully, release soon...

I have a game on my phone called Containers Block, but it's really easy. You can solve the first ~20 levels in 3 moves each.
Title: Re: Rush Hour
Post by: DJ Omnimaga on February 15, 2012, 11:30:14 pm
Yeah, I'm going to be changing to TI-Images as sprites. I guess there's no Lua function for that, you just have to manually do it.

@jimbauwens: You wrote a clone of rush hour?  ??? But for the images, any help would be appreciated. Does that mean you're drawing the sprites?
Actually there is already a released clone of Rush Hour on TI-Planet. However there are no sprites either (although the edges are round instead of rectangular and the map has more cars). It would be nice if you actually added more graphics and maybe transitions when moving stuff around, so it moves gradually instead of instantly.
Title: Re: Rush Hour
Post by: cyanophycean314 on February 18, 2012, 12:48:12 pm
 D: There's already a clone... I should check TI Planet for duplicates, but I don't really know french...

Wow, I just checked TI Planet, there are so many programs for the Nspire! I need to go through those...

But anyways, here is a first playable version with 51 levels (I lied previously). The last 9 are dummy levels, but I'll fill them in.

To do:
 -Sprites!
 -Level Editor!

Two Screenies

Enjoy!
Title: Re: Rush Hour
Post by: Chockosta on February 18, 2012, 01:34:25 pm
Nice work :)

And I think that your game is better than the other clone, because it works on Clickpad models, while the other one uses the mouse.

EDIT : By the way you should add a way to show which levels have been finished.
Title: Re: Rush Hour
Post by: DJ Omnimaga on February 18, 2012, 02:23:53 pm
Yeah I agree, plus you got more different colors and the game area seems a bit larger. It just need actual cars (and parking/road) sprites now :D
Title: Re: Rush Hour
Post by: cyanophycean314 on February 18, 2012, 04:02:26 pm
Yes, progress and saving will be added.
Title: Re: Rush Hour
Post by: Jonius7 on February 25, 2012, 05:53:38 am
Hey cyanophycean314!
I was thinking of doing a Rush Hour port myself (in either Lua or Axe) but looks like you have made significant progress on yours already! I own the electronic handheld version, and the levels are sorted differently. Firstly there are 5 difficultly levels and within there are around 10-15 unique levels within each difficulty. Each unique level can be rotated/mirror imaged 4 times giving around 600 levels in total? Perhaps you may want the layouts for these levels? I can give these to you.
Anyway good luck.
Title: Re: Rush Hour
Post by: cyanophycean314 on February 26, 2012, 08:33:29 pm
I'm not sure how many more levels I'm going to add, but the levels would be nice. My cell phone has over 6000 levels. There is a limit where you do not want the user to be so overwhelmed by the amount of levels they need to complete that they stop playing. Additionally, rotating and mirroring levels seems a little cheap, no?  ;)

If you want to build your own clone for educational purposes or an Axe clone, go ahead!  :)
Title: Re: Rush Hour
Post by: DJ Omnimaga on February 26, 2012, 08:44:07 pm
Hmm an Axe clone would be nice I guess, unless there is already a very good ASM version for the 83+ series that would be hard to match in Axe.
Title: Re: Rush Hour
Post by: Jonius7 on February 26, 2012, 08:46:03 pm
I'll give you some of the harder level 5 levels. I'll do it when I get home today.
I dunno what I can really do in Axe, tho I had some ideas thinking about it.
Title: Re: Rush Hour
Post by: cyanophycean314 on February 26, 2012, 09:11:40 pm
I think there already is a version for the 84, but I'm not sure what language it's from. That was where I got the inspiration to write this version.
Title: Re: Rush Hour
Post by: Jonius7 on February 27, 2012, 08:16:03 pm
Sorry, I found my handheld, but didn't get time to write down the levels from it. Shall do it today,(hopefully :))
Title: Re: Rush Hour
Post by: cyanophycean314 on February 27, 2012, 08:48:58 pm
Ok. btw, you have 999 posts!
Title: Re: Rush Hour
Post by: Jonius7 on February 27, 2012, 11:27:15 pm
Yeah, 1000 and 1 now. I did some experiments, and got to 1000 posts, set my custom title and deleted a post. My custom title was still there! http://ourl.ca/153285
Title: Re: Rush Hour
Post by: AzNg0d1030 on February 28, 2012, 06:42:01 pm
Don't go off topic guys ;)
Title: Re: Rush Hour
Post by: Jonius7 on February 28, 2012, 08:24:07 pm
Technicially you're going off topic by telling us not to go off topic :) jks.

I have some levels but am busy right now and can't post them here. After I finish schoolwork today.
Title: Re: Rush Hour
Post by: Jonius7 on February 29, 2012, 07:01:30 am
I have some levels for you cyano,
I have taken these from Rush Hour electronic Handheld, Level 5 Difficultly. I have drawn 8 of these levels up here. Sorry they are really crude (Just lines and some boxes) but hope you can understand them.
The arrows mean the direction the car must go in/where the exit is located.
Enjoy!
Title: Re: Rush Hour
Post by: cyanophycean314 on February 29, 2012, 07:26:16 pm
Thank you! They are a bit messy, but I'll take care of converting them and finishing up all 60 levels! Thank you Jonius7.  :thumbsup:

Btw, saving has been implemented, but have not had opportunity to test because nspire_emu and Student Software both hate me right now.  D:
Title: Re: Rush Hour
Post by: Jonius7 on February 29, 2012, 11:30:05 pm
What's wrong with nspire_emu?
Also if you need any other levels, feel free to ask.
From the 5 difficulty levels.

And I know about the original rush hour board game style version had a card pack, and at least 4 purchasable card packs with extra levels.

EDIT: I also realised that you had 51 levels already! Then the 8 I gave you should finish it off nicely.
EDIT2: Do you have a credits page of some sort?
Title: Re: Rush Hour
Post by: cyanophycean314 on March 01, 2012, 05:49:15 pm
Right now, I can't get Nspire_emu to start up after Student Software exploded. I've been following instructions as posted here http://ourl.ca/13290/247912 (http://ourl.ca/13290/247912) and I have everything done except the last two steps. When I type the first one in, it gives me the regular command list output. I think it should create the flash.bin, but it doesn't. When I then type in the second command, it says flash.bin wasn't found. I got it to run once, but then it screwed up at installing factory image. Now it won't even start up D:

A credits page? I'll be sure to add one and include you in it. Don't worry, you shall be recognized.  ;)
Title: Re: Rush Hour
Post by: Jonius7 on March 02, 2012, 04:40:46 am
Are you using nspire_emu_060? If so then Goplat has changed some commands and commands that worked in <0.53 may not work now.
EDIT: Hmm I see yes that post you showed me is for nspire_emu_053. Things have changed in 060. I believe that the TI-nspire Emulator thread here on Omnimaga has more information, somewhere in the middle of the thread. http://ourl.ca/9360;action=printpage
I am also creating batch files (edited from Levak's ones) for the new version so there won't be the big hassle of command line stuff.

Quick thing though, /N will not do you any good in 060. It does not create a rom file anymore.
Also .bin files are different only if you want to use boot1 (with boot2)
.bin files are hard to dump/get, as they are illegal to get from other people, and you need an actual calc connected to dump boot1.

But they are required to emulate a CX.

Also, have you ever made nspire_emu work before?
I know it can be quite confusing, very confusing in fact. I hope to change that with some tutorials somewhere.
Title: Re: Rush Hour
Post by: cyanophycean314 on March 02, 2012, 04:52:24 pm
I got nspire_emu working! THANK YOU SO MUCH! Somebody should either A) Put that tutorial hidden in the post in the tutorials section or B) include a readme with the file. Maybe I'll do that if I have time. Now development shall continue!  :D
Title: Re: Rush Hour
Post by: Jonius7 on March 02, 2012, 11:05:36 pm
Yay woohoo!
Yeah, there definitely there should be a readme of some sort, especially with all the changes in 060, however Goplat just seems to provide us with the source code and executable only.
EDIT: At 1000 posts I think your tutorials get approved automatically. Otherwise an admin will do it for you.
Title: Re: Rush Hour
Post by: Jonius7 on March 26, 2012, 07:38:17 am
Hopefully you're ready to release the 60 level version? I enjoyed the levels so far.
Btw there's a bug in lvl 15 with some of the blocks in the top left corner (or somewhere near) that creates an extra car that makes it impossible to solve.
Title: Re: Rush Hour
Post by: cyanophycean314 on March 26, 2012, 08:00:37 pm
Well, yes, the sixty levels have been implemented (The last one is anticlimatic). Unfortunately, I have run into a bug with the saving.  D:

Expect some more work during spring break, next week. Sorry for inactivity.

Level 15 bug was fixed!  :D
Title: Re: Rush Hour
Post by: Jonius7 on March 26, 2012, 08:12:41 pm
Wow! Good to see progress! And yes the saving progress feature, Chockosta might know about this, he has a similar system for his Gravity Guy Beta :)

Oh, no longer leet :(
Title: Re: Rush Hour
Post by: cyanophycean314 on March 26, 2012, 09:03:14 pm
Oh, no longer leet :(
What?

Additionally, when testing on Nspire_emu, the menu numbers are screwed up, even though I didn't touch them since last time...
Title: Re: Rush Hour
Post by: DJ Omnimaga on March 26, 2012, 09:16:31 pm
Oh, no longer leet :(
What?
It was in (off-topic) reference to his post count of 1337 (and a SMF easter egg)

Oh, no longer leet :(
What?

Additionally, when testing on Nspire_emu, the menu numbers are screwed up, even though I didn't touch them since last time...
You might have to report this to Goplat, since this is most likely a bug in his emulator. You are using the same Boot/OS versions as your Nspire, right?
Title: Re: Rush Hour
Post by: Jonius7 on March 27, 2012, 01:21:14 am
Screwed up in what way? Are the level numbers graphically scrunched or intact but just positioned wrongly?
Or is it something else?
Hmm... Also need a better Lvl 60? I really like some of your levels, they have creative solutions. None of them are extremely hard though.

Also the way you move your pieces in your version is different to the Electronic Version. In the Elec version you "pick up" car move it back and forth and press enter again to place the car. In this way, the number of moves could be counted, as the Electronic Handheld told the player the minimum number of moves required. That could be something implemented once you've got everything else going! ;)
Title: Re: Rush Hour
Post by: cyanophycean314 on April 04, 2012, 04:57:45 pm
Ok numbers are fixed. Jonius7, you're in the credits. Saving still doesn't work though.

Right now, any time I try to use var.store, it'll crash my program. D:

The statement is var.store("beaten",beats) where beaten is the math variable that is recalled at the beginning and beats is the list with true or false in each level, if it's beaten or not.

I could just release it without the saving feature for now. Thinking about that, maybe I should take the time and publish a few of my programs on ticalc.org...
Title: Re: Rush Hour
Post by: DJ Omnimaga on April 18, 2012, 12:22:18 am
Don't forget you can also put them in Omni download section if you want to, since you got 20 posts or higher. That will give them more visibility.
Title: Re: Rush Hour
Post by: Jonius7 on April 18, 2012, 01:52:05 am
Ok numbers are fixed. Jonius7, you're in the credits. Saving still doesn't work though.

Right now, any time I try to use var.store, it'll crash my program. D:

The statement is var.store("beaten",beats) where beaten is the math variable that is recalled at the beginning and beats is the list with true or false in each level, if it's beaten or not.

I could just release it without the saving feature for now. Thinking about that, maybe I should take the time and publish a few of my programs on ticalc.org...

If you're mainly finished with it I'd recommend you put it on ticalc.org. It can take a bit of effort though with filling out the file upload form and other stuff, but it does make your game releases a bit more widely known.
Also put it in Omnimaga downloads too if you can.
Title: Re: Rush Hour
Post by: cyanophycean314 on April 19, 2012, 07:53:56 pm
Ok, I'll just release my current version then. I should also take the time to put them in Omni archives someday too...
Title: Re: Rush Hour
Post by: cyanophycean314 on May 04, 2012, 05:12:17 pm
Rush Hour is finally complete after four long months! Will be put on ticalc.org some time. This was a pretty long-term project.

Features
----------------------------------
*60 levels ranging from easy to challenging for you to solve!
*Colors for the CXs.
*Slashes showing you what levels have been done. (However, it doesn't save into a variable. Will update later)
*Moves counter showing you how long it takes for you to do it.
*In-game help!

Might also update a feature for a timer, psychedelic mode, and the aforementioned saving bug.

Screenies and download attached. First post edited.
Title: Re: Rush Hour
Post by: DJ Omnimaga on May 05, 2012, 01:21:17 am
Looks nice. If you ever update it again, it would be nice if you eventually replaced the plain color squares with actual car sprites, though, and maybe asphalt for the background.
Title: Re: Rush Hour
Post by: Jonius7 on May 07, 2012, 07:58:09 pm
Yay! Nice car sprite on the level selection screen. As DJ_O said you could slightly modify it and use it as the sprite for the actual ingame levels.
Though the move counter is for each car moving one square instead of one move for a vehicle moving in total which may or may not need to be fixed.
I like the credit down the bottom, though I only supplied levels 52-59 (8 levels!)
Title: Re: Rush Hour
Post by: cyanophycean314 on May 07, 2012, 08:17:12 pm
Yeah, it'd be nice with sprites, but I'd need to change some widths and stuff. I'll find some time to do it later. Finals and lots of testing is coming up like with everyone now.  :)

I think I'm fine with the move counter and your credits.  :)
Title: Re: Rush Hour
Post by: Wretchedlout on May 07, 2012, 10:49:58 pm
Is it just me or does the cursor seem high and to the left?
Title: Re: Rush Hour
Post by: cyanophycean314 on May 08, 2012, 04:33:09 pm
Is it just me or does the cursor seem high and to the left?

Maybe a bit. :P
Title: Re: Rush Hour
Post by: cyanophycean314 on June 05, 2012, 05:38:43 pm
Hey, I'm still working on it! During some free time, I put together this initial version with sprites. I could add up to 10 different colors for the small cars, but I don't think that's really worth it  <_<. Maybe 4.

Also fixed some bugs in 52,53,55.

Screenie attached
Title: Re: Rush Hour
Post by: Jonius7 on June 12, 2012, 09:47:35 pm
Wow I like these sprites. I was going to say make the other vehicles multicoloured but then you'd get confused by which one is your car.
In some levels on the electronic version you can be a truck too!
Title: Re: Rush Hour
Post by: squidgetx on June 12, 2012, 10:10:22 pm
Hey that looks pretty good! I love Rush Hour ;D

Your car is always red, so you could use that as a distinction in the original board game. Actually I think that your car also is styled differently than the others (it's a sports car where the rest are typical sedans..)
Title: Re: Rush Hour
Post by: cyanophycean314 on June 13, 2012, 04:39:11 pm
Thanks you two!  :)

Wow I like these sprites. I was going to say make the other vehicles multicoloured but then you'd get confused by which one is your car.
In some levels on the electronic version you can be a truck too!

Your car is always red, but I'm worried about grayscale calculators... Maybe I'll do something different.
Title: Re: Rush Hour
Post by: AzNg0d1030 on June 13, 2012, 05:42:47 pm
Like squidgetx said, if you make the controlled car a different texture, or maybe fatter or thinner, grayscale should be fine
Title: Re: Rush Hour
Post by: cyanophycean314 on June 16, 2012, 06:01:24 pm
I has multicolored sprites now.

I would like to release an update, but I'm trying to fix the same bug about saving the level data. Chockosta has this working in Bobby Carrot...

As mentioned in a few posts before, the statement var.store("beatens",beats) throws an error of "bad argument #-1 to store (string expected, got boolean)" I've played around a bit and I think the var functions aren't really working with this program  ???

I've decided against adding asphalt because it makes the cursor hard to see and the edges around the images don't look nice.
Title: Re: Rush Hour
Post by: AzNg0d1030 on June 16, 2012, 07:03:57 pm
Good to see you're putting a ton of ideas and renovations on this
Title: Re: Rush Hour
Post by: cyanophycean314 on July 02, 2012, 05:00:25 pm
Sprite update! Now with moar colors than EVAR. If some people could test it on grayscale, that'd be awesome.  :)