Cuboid Clone

Return to Showcase

Cuboid Clone

Postby ThomasEgi » Sun Oct 18, 2009 1:46 pm

Welcome to another episode "jeez i'm so bored what shall i do && my girlfriend is looking for a fun game to play knows one but doesnt run on her machine && can i clone one?"

ok that's not exactly it but quite close. so i thought i'd clone cuboid.
actually a PS3 only game afaik, so i thought some it wouldnt hurt.
http://home.arcor.de/positiveelectron/files/project-files/Cuboid-Clone.zip
here it is. if it doesnt run due to complaining about sound stuff. uncomment line 18 (sry for the windows users that line sorta slipped in). note, the game has no sound yet.

it comes with 2(two) thrilling and challanging levels, you can easily write your own ones.
featuring some of the cool animation as seen in the real cuboid.
see here for the original game http://www.youtube.com/watch?v=bheCWlrtp-o

took me 6hours straight to write it (i watched video's and chatted beside so it wasnt really hard work)

feel free to comment, report bugs, make additions, add content,levels,sounds whatever.

greetings to everyone

[EDIT]:
for the ones who dont want to download it. thats what it looks like:
Image
Image
Last edited by ThomasEgi on Wed Oct 21, 2009 9:06 am, edited 1 time in total.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Nemesis#13 » Sun Oct 18, 2009 1:58 pm

nice game!
add some fancy effects and you have a competitioner for the original :)
User avatar
Nemesis#13
 
Posts: 1041
Joined: Mon Aug 04, 2008 8:09 pm
Location: Germany

Postby rdb » Sun Oct 18, 2009 2:24 pm

Very nice! Simple but really fun to play; maybe we can add some cool effects to this game and ship it as sample program :-)
rdb
 
Posts: 9697
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby ThomasEgi » Sun Oct 18, 2009 4:08 pm

i had some more time and added the first few cuboid levels.
you can copy and paste them into a new textfile named level+levelnumber (without the txt. in the end. for example level3 )
that would be level2:
Code: Select all
000000111
000111131
111111111
121111
111


there is no need to fill the empty-space with zeroes. it just looks better in most editors
level3:
Code: Select all
          111
          131
          111
           1
           1
           1
           1
           1
111       111
1211111111111
111       111   


level4:
Code: Select all
       111
       1311
       1111
          1
      111 1
      111 1
 1111111111
 111
 121
 111     

and finally.
level5
Code: Select all
1111111
1  1131
11  111
111
121
111


guess next step is to add more stuff. like in the real game,too. break-able tiles, portals. etc.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Hypnos » Mon Oct 19, 2009 7:41 am

change the background color to black, add a counter how many steps it took. a web-database for levels (and editor, maybe just recording the moves a player makes). and you've created a very nice game and a good sample for panda.
Hypnos
 
Posts: 585
Joined: Sat Sep 11, 2004 8:07 am
Location: Zürich, Switzerland

Postby ThomasEgi » Mon Oct 19, 2009 1:05 pm

added a few new features. like a sound (whohoo..coool stuff).
a propper cube-texture (again.. yay)
and *drumroll* a level generator which automatically generates new levels if you run out of the pre-made ones.
so even if the 18 levels included now arent enough for you you can play to almost infinity and beyond. if you liked a level, you can save it and it will be added to your collection. please upload good levels, (the generator makes pretty easy stuff most of the time so good levels are rare)
[EDIT]
whopsie.. fixed a one in 12,9bio cases bug in the level generation code... and cleaned up console output. you can now pass a parameter to the app when starting it so you can jump into the level.
like
python cuboid.py 8
will start at level 8.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby ThomasEgi » Mon Oct 19, 2009 5:10 pm

and more additions: another sound, another animation. some fixes for a poor windows-user with unfortunate opengl-drivers.
and..*drumroll*
the new "level19"
Code: Select all
0010000000
0011111100
1111111000
1100011000
1112101000
0001111000
0001111000
0000010000
0000011130


which is propably one of the hardest to solve maps generated by my mapgenerator. unless you have th right idea it will take you some time to solve it, it IS solveable btw.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Hypnos » Mon Oct 19, 2009 6:31 pm

to create a good level generator (for complex levels) i'd try to store the positions the block was upright, and prevent the generator from moving to positions at upright state where it already was upright. this could possibly increase complexity by preventing mutiple ways the level can be solved. (could also be that it doesnt change anything at all)

another, more complex method would be to first generate the level and later have a pathfinding mechanism that searches the fastest path. if it's too short it can be discarded.

edit: i think when you reach the final position the tile and the block move a bit away in the x or y coodinate (while moving down).

edit2: after i've reached the end of the level (in the generated levels) i can still continue to move, together with the save function this gets a bit curious.

a skip function could be nice as well. if i know the solution but walked 3 times in a row wrong i can get fed up.


the levels i liked while playing:
http://www.nouser.org/WD/tmp/panda-cuboid-levels.zip



great work :-)
Hypnos
 
Posts: 585
Joined: Sat Sep 11, 2004 8:07 am
Location: Zürich, Switzerland

Postby Craig » Mon Oct 19, 2009 7:17 pm

19 was not very hard for me. The backwards path from the end goes very far before forking significantly. 15 was much more annoying, but thats probably because it crashed more more often than usual on that one. I'm getting no audio, but I still get audio errors and crashes quite a bit.

:audio(error): corruption in stream queue
Bus error


Mac OSX 10.5
Craig
 
Posts: 330
Joined: Thu Jul 02, 2009 8:55 pm

Postby FenrirWolf » Mon Oct 19, 2009 11:54 pm

Never played the original, but just from checking out the video, you got your clone behaving very similarly. I agree that all it needs is some artwork and more levels, and it's a game. :)
User avatar
FenrirWolf
 
Posts: 267
Joined: Mon Jun 08, 2009 3:24 pm
Location: Mississippi, US

Postby ThomasEgi » Tue Oct 20, 2009 2:23 am

@Craig: the game is not supposed to crash at all.if you have sound issues try to comment out line 23, or change the audio system to something more OSX friendly. maybe fmod

@FenrirWolf. thx :) thought the tile-movement idea is pro-rsoft's idea

@Hypnos. i had the same idea about optimizing the generator last night. recording the blocks "current Tile" values. if one matches. dischard the entire path between the 2 matches. and thx for the levels. have to go to university now, but i'll play them later on :)

i guess next up is new gameplay elements. editor fixes and maybe new grafics (if i can get some)
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby ThomasEgi » Tue Oct 20, 2009 3:48 pm

iiiit's tuesday, and time for another update.
this time i want to introduce a new cuboid (say hello mr cuboid) which was made by Nemesis13 , it includes gloss ,spec, normal and diffusive textures. (since i havent added lights you dont see all its beauty but you can check it in pview, looks cool)
more contributions are highly welcome. especially a nice 3d background.

on the gameplay side we have green tiles, they break if you put the whole weight of the block on a single one of them. so be careful.
there also are a few new sounds for the new tiles.
unfortunately, the mapgenerator doesnt know about those new tiles yet.

the codeside didnt change much, thought it's propably the last version i release before doing a code-cleanup. seperating files and stuff. i'm close to 600 lines now and this really starts to get neccessary.

for everyone who likes to add some levels manually. i found this nice youtube playlist which makes a perfect reference for writing your own levels. http://www.youtube.com/view_play_list?p=5A05A77A4A2DB4C1
i already added a few of them with the new type of tiles.

[EDIT] and if you know some suited CC-licensed background music. let me know about it :)
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby ThomasEgi » Wed Oct 21, 2009 9:04 am

despite my previous announcement. nemesis13 provided me with another tile model. which i added, while fixing the sound-volumes a bit. and adding a 3d-background which i threw together in blender in a hurry. so.. enjoy :) *we'll be back after some code maintainance*
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Hypnos » Wed Oct 21, 2009 9:44 am

trying to save gives me a error in the last version currently available:

Code: Select all
Traceback (most recent call last):
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/EventManager.py", line 61, in eventLoopTask
    self.doEvents()
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/EventManager.py", line 55, in doEvents
    processFunc(self.eventQueue.dequeueEvent())
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/EventManager.py", line 122, in processEvent
    messenger.send(eventName, paramList)
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/Messenger.py", line 325, in send
    self.__dispatch(acceptorDict, event, sentArgs, foundWatch)
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/Messenger.py", line 410, in __dispatch
    method (*(extraArgs + sentArgs))
  File "/Applications/Panda3D/1.7.0/lib/direct/gui/DirectButton.py", line 103, in commandFunc
    apply(self['command'], self['extraArgs'])
  File "/Users/rspoerri/Downloads/Cuboid-Clone 3/cuboid.py", line 226, in savemap
    if i < xmin:
UnboundLocalError: local variable 'xmin' referenced before assignment
:task(error): Exception occurred in PythonTask eventManager
Traceback (most recent call last):
  File "/Users/rspoerri/Downloads/Cuboid-Clone 3/cuboid.py", line 620, in <module>
    run()
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/ShowBase.py", line 2478, in run
    self.taskMgr.run()
  File "/Applications/Panda3D/1.7.0/lib/direct/task/Task.py", line 482, in run
    self.step()
  File "/Applications/Panda3D/1.7.0/lib/direct/task/Task.py", line 440, in step
    self.mgr.poll()
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/EventManager.py", line 61, in eventLoopTask
    self.doEvents()
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/EventManager.py", line 55, in doEvents
    processFunc(self.eventQueue.dequeueEvent())
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/EventManager.py", line 122, in processEvent
    messenger.send(eventName, paramList)
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/Messenger.py", line 325, in send
    self.__dispatch(acceptorDict, event, sentArgs, foundWatch)
  File "/Applications/Panda3D/1.7.0/lib/direct/showbase/Messenger.py", line 410, in __dispatch
    method (*(extraArgs + sentArgs))
  File "/Applications/Panda3D/1.7.0/lib/direct/gui/DirectButton.py", line 103, in commandFunc
    apply(self['command'], self['extraArgs'])
  File "/Users/rspoerri/Downloads/Cuboid-Clone 3/cuboid.py", line 226, in savemap
    if i < xmin:
UnboundLocalError: local variable 'xmin' referenced before assignment
Wed Oct 21 16:43:23 Reto-Spoerris-MacBook-Pro.local pythonw[4357] <Error>: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 4659
Wed Oct 21 16:43:23 Reto-Spoerris-MacBook-Pro.local pythonw[4357] <Error>: kCGErrorIllegalArgument: CGSRemoveSurface: Invalid window 0x1233
Hypnos
 
Posts: 585
Joined: Sat Sep 11, 2004 8:07 am
Location: Zürich, Switzerland

Postby ThomasEgi » Wed Oct 21, 2009 11:02 am

whupsie. looks like i introduced quite some errors when adding boundary checks for the maps.
i'll just found more "once in a blue moon errors".

for now you can just add the following before line 226
Code: Select all
xmin,ymin = 60,60

i'll cut out the level generation code in a seperate file and clean it up later on.

[edit] more whupsie ... totaly broke the level saving code.. i tried to fix it. download link is upadted
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby ThomasEgi » Sun Oct 25, 2009 10:59 am

small update:
code rewrite is going along somewhat ok. the logic-flow is still a bit strange but it already is an big improvment over the last version.
functionality is almost the same. the levelgenerator is still missing. but i added something like a main menu in exchange.
the mapfiles and the level-loader, aswell as the game-rule-checking are now a bit more flexible.

next thing on my todo:
-clean the code further up,
-add bridges and switches and other new gameplay elements,
-recode the level generator,
-add ingame info like number of moves and time

download link is still the same from the first post
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Re: Cuboid Clone

Postby astelix » Fri Dec 11, 2009 11:22 am

ThomasEgi wrote:
for the ones who dont want to download it...

...I call'em FOOLS :D
really amazing game Thomas
by the way I modded your loader to use a much simpler (to me) ang more easy to read level file format, so to have a quick idea on how will be the map, as much as, i.e. this:

Code: Select all
     ttt
stttttgt
     ttt
for the level 0, where the letters intuitively tells what is that tile (t for simple tile, s for start and so on).
If you are interested snatch all my mods here and if you like it I'll make a file converter from actual file format to this.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby ThomasEgi » Fri Dec 11, 2009 12:11 pm

as you can see in the posts above. the original levelformat was like this.
but it has certain limits. it's not really suited to set up linked tiles such as switches which filp or move tiles(i intended to add those features later on). that's why i decided for a rather complex format.

right now i have a rather well modulized version which have not released yet. the level-generator is still broken thought. if you want to i can upload it later today. new one would also use rigidbodycombiner for better performance . less cpu usage on slower machines.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby astelix » Fri Dec 11, 2009 3:00 pm

ah I missed that, but I guess I'd done anyhow, cos I wanted an easier way to make my levels so never mind Thomas - I'll wait the next 'official' release and maybe I'll make the opposite, an exporter from ascii format to the actual ingame.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby ThomasEgi » Fri Dec 11, 2009 4:27 pm

well i wrote converters from my old to the new level format myself (when i migrated to the new map format)

when i did that i planend to rewrite the levelgenerator and add an ingame level-editor. both tasks are still un-touched :P

http://home.arcor.de/positiveelectron/files/project-files/Cuboid-Clone%20rewrite1.zip
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby ambyra » Sat Dec 12, 2009 12:06 am

Really nice job! Thanks for the game (and the source!)
ambyra
 
Posts: 130
Joined: Sat Sep 20, 2008 5:47 pm

Postby Anon » Sun Dec 13, 2009 9:28 am

Nice
Last edited by Anon on Sat Apr 17, 2010 3:38 am, edited 1 time in total.
Anon
 
Posts: 1559
Joined: Thu Oct 29, 2009 3:07 am

I played

Postby jbskaggs » Wed Dec 16, 2009 10:42 pm

I have played this and I love it. Im stuck on one level though- can you solve all the levels?
That's the last time I use peanut butter nougat for the neuron processors in my robot!

JB Skaggs
User avatar
jbskaggs
 
Posts: 235
Joined: Thu May 07, 2009 11:10 pm
Location: kansas

Postby ThomasEgi » Thu Dec 17, 2009 3:10 am

jeah. all levels which come with the game are solveable. some are quite tricky. others are not.
in case you use the level-generator. that one is broken and produces unplayable levels sometimes but by defautl the levelgenerator is not active.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

I beat

Postby jbskaggs » Sat Dec 19, 2009 3:04 am

I beat all the levels on standard! That is a very addicting game.

You need a save progress option and more levels:)
That's the last time I use peanut butter nougat for the neuron processors in my robot!

JB Skaggs
User avatar
jbskaggs
 
Posts: 235
Joined: Thu May 07, 2009 11:10 pm
Location: kansas

Postby ThomasEgi » Sat Dec 19, 2009 5:42 am

you can specify the level-number as commandline parameter on application start. you could aswell load such a value from a file on HDD.
feel free to make additions :)
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Anon » Thu Feb 04, 2010 5:34 am

Could you please reupload it?
I wanted to look at the source and learn a thing or two from it...
Anon
 
Posts: 1559
Joined: Thu Oct 29, 2009 3:07 am

Postby ThomasEgi » Thu Feb 04, 2010 8:06 am

oh. i'm sorry. had removed it temporarily to upload other stuff. but forgot to reupload it again.
http://home.arcor.de/positiveelectron/files/project-files/Cuboid-Clone%20rewrite1.zip
there ya go^
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Anon » Thu Feb 04, 2010 9:21 am

Downloaded, thanks.
This deserves some screenshots in the gallery
Anon
 
Posts: 1559
Joined: Thu Oct 29, 2009 3:07 am

Postby qubodup » Mon Feb 08, 2010 2:07 am

How swell, my first time to peak in this forum and I find a nice game clone. :) The background looks really great too, perhaps it would be better fitting to the foreground with more sand-yellow-ish color tones though. And I *love* the player brick texture! The little ivy detail is perfect on the dark stone!

Three things:
1. I think the delay between falling and restarting is too long.
2. There should be a fall sound added (I might come up with one later maybe)
3. Making the game open source and putting it on http://code.google.com/hosting/ or https://github.com/ for example will ensure that it won't disappear thanks to arcor :)

PS: I recorded a video of me playing the first few levels: http://www.youtube.com/watch?v=RH1vhttDTXc
User avatar
qubodup
 
Posts: 5
Joined: Mon Feb 08, 2010 1:28 am

Next

Return to Showcase

Who is online

Users browsing this forum: No registered users and 1 guest