Author Topic: Rush Hour  (Read 27091 times)

0 Members and 1 Guest are viewing this topic.

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Rush Hour
« 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.

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:

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.
Updated Screenie
« Last Edit: May 04, 2012, 05:19:44 pm by cyanophycean314 »

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Rush Hour
« Reply #1 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
« Last Edit: January 13, 2012, 03:17:14 am by jimbauwens »

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Rush Hour
« Reply #2 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

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Rush Hour
« Reply #3 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?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Rush Hour
« Reply #4 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...
« Last Edit: January 13, 2012, 05:26:21 pm by jimbauwens »

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Rush Hour
« Reply #5 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

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Rush Hour
« Reply #6 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 :)

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Rush Hour
« Reply #7 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

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Rush Hour
« Reply #8 on: January 17, 2012, 09:27:22 pm »
That's actually a really cool way to edit it! I like!

Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: Rush Hour
« Reply #9 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
You just lost the game.



Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Rush Hour
« Reply #10 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

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Rush Hour
« Reply #11 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

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Rush Hour
« Reply #12 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...
There's something about Tuesday...


Pushpins 'n' stuff...


Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Rush Hour
« Reply #13 on: January 22, 2012, 12:52:54 pm »
 I realize that, but why not have some variety!  ;) Now has 12 levels.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Rush Hour
« Reply #14 on: January 22, 2012, 02:10:18 pm »
Good to see this progressing. :)
Sig wipe!