Rubicon Forum
Welcome, Guest. Please login or register.
August 20, 2008, 10:46:43 AM

Login with username, password and session length
Search:     Advanced search
Undeletable components are now shaded blue when loading a level in.
3793 Posts in 194 Topics by 2307 Members
Latest Member: assaulkNosque
* Home Help Search Login Register
+  Rubicon Forum
|-+  Playing the Game
| |-+  Design Discussion (Moderator: Bucky)
| | |-+  Rubicon level data
« previous next »
Pages: [1] Print
Author Topic: Rubicon level data  (Read 1985 times)
ddsdiur
Operator
**
Posts: 17


View Profile
Rubicon level data
« on: March 16, 2008, 09:06:51 AM »

I hope I put this in the right forum, but I decompiled Rubicon's JAR file, and it has the data for saving/loading Rubicon levels. So far, I figured out the URL for loading levels. If you go to http://kevan.org/rubicon/rubiload.php?filename=[[INSERT LEVEL CODENAME]], adding the level name, you will get a page with the raw code of the level. I'm working on figuring out the format, and examining the PHP script. I'll edit this topic when I've made more progress. I've already posted the full source file in http://www.mediafire.com/?1je4jggkgb2. I know this may seem pointless, but it might save space on the database if people could save their creations on their own computer while they are creating them.

EDIT: I built a Processing applet that can download the raw level code from a Rubicon level, and save it to a file on your computer. It's at http://www.mediafire.com/?j24q23yl9z2.

PS: How do you make a link be descriptive text, instead of a URL?
« Last Edit: March 16, 2008, 10:21:41 AM by ddsdiur » Logged

Werbad
Engineer
****
Posts: 143

jonas_88_rehn@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #1 on: March 16, 2008, 10:25:54 AM »

I figured out the level format not too long ago...
The file starts with a couple of info lines containing info about the level (physics version, level name, etc.)
Info lines has the format:
* Tag:Value

After the info lines comes the actual level data. Each line consists of 50 characters corresponding to a tile on the current line in the grid.
Here is the piece data I used in my OpenGL version of rubicon:
http://www.mediafire.com/?cbcw32xnwyy

Hope this helped.

Btw, it was only thanks to you uploading the source that I could actually make my version. I could never had figured out the exact execution order without it.

Edit:
Does anyone want my version of the game? The only thing not supported is uploading files to the server...
Logged
ddsdiur
Operator
**
Posts: 17


View Profile
Re: Rubicon level data
« Reply #2 on: March 16, 2008, 10:30:09 PM »

Werbad, I'm very happy that me uploading the source was helpful to someone. It'd be great if you could put a ZIP file of the OpenGL version's source on MediaFire or some other filehosting site. I would use the source code to compile it since I have a Mac. If the file(s) are too big for media fire, then please tell me what size they are. I'll try and find a hosting site that can host the file. Thanks for posting the file format! I'm working on an applet that can save local files to the database, but it might take a while.

I've got the Processing code for level upload, but can anyone figure out why the server isn't accepting the data? It creates the level just fine, but it doesn't upload the actual level. http://www.mediafire.com/?g0ann38nw3o
« Last Edit: March 17, 2008, 12:04:32 AM by ddsdiur » Logged

Werbad
Engineer
****
Posts: 143

jonas_88_rehn@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #3 on: March 17, 2008, 10:15:37 AM »

The problem with my OpenGL version is that it uses windows api for a lot of things, the rubicon part is stand alone though... I used Dev C++ to make this since I didn't have visual at the moment, so I cannot guarantee that it will be 100% compatible with other compilers.

I will look through the code and might upload it later, it was not originally intended to be released so it is kind of messy at the moment.

Edit:
OK, I uploaded my source, but you'll probably have to rewrite a lot of it in order to compile it on a mac. The main engine works with wrapper functions, so hopefully most of it should work as it is.
http://www.mediafire.com/?u9lcjmm2isi

I included a compiled version of the game as well, if anyone wants to try it out without bothering to compile it.
« Last Edit: March 17, 2008, 11:00:10 AM by Werbad » Logged
immibis
Engineer
****
Posts: 113

computer-dude@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #4 on: April 18, 2008, 09:00:41 AM »

Code in header files....  Angry Angry Angry
Perspective view....  Huh Huh Huh
Oh, and the graphics need to be changed a little bit - in the 'real' rubicon, empty spaces have a few grey dots in them.
« Last Edit: April 18, 2008, 09:03:54 AM by immibis » Logged

while(is_computer_on() && !is_computer_on_fire()) do_stuff();

If money grew on trees...the global economy would collapse.
Windows systems need reinstalling as often as Linux systems need rebooting.
Werbad
Engineer
****
Posts: 143

jonas_88_rehn@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #5 on: April 18, 2008, 02:08:14 PM »

If you are talking about my game, the code is very messy. I made this for fun and never intended to release it. About the code in headers, it's just to get rid of some of the code from the .cpp file... Feel free to change it if you like.
The OpenGL view is originally a 3D render, so some old 3D code such as Perspective corrections might still be in there.
And empty squares do have gray dots in them...
Logged
immibis
Engineer
****
Posts: 113

computer-dude@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #6 on: April 18, 2008, 09:49:57 PM »

...I see now...they are very dark though.
Oops, I meant to post this level as well. It's a puzzle for Werbad's version. (See attached file).
You may use any of the additional pieces in your solution, though you will need to be in the sandbox to use them.

Edit: oops, it seems boulders and super furnaces disappear when you save. Just add a boulder above the copier that has nothing above it, and a super furnace at the very bottom right corner, before attempting to solve.

Another edit: It also seems that the extra parts added do not work in the old physics.

* boulder.rub.txt (1.59 KB - downloaded 3 times.)
« Last Edit: April 18, 2008, 09:56:20 PM by immibis » Logged

while(is_computer_on() && !is_computer_on_fire()) do_stuff();

If money grew on trees...the global economy would collapse.
Windows systems need reinstalling as often as Linux systems need rebooting.
Werbad
Engineer
****
Posts: 143

jonas_88_rehn@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #7 on: April 18, 2008, 10:41:36 PM »

No, and the old physics might be incorrect in some cases as I have not tested it.
Logged
immibis
Engineer
****
Posts: 113

computer-dude@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #8 on: April 19, 2008, 08:37:07 AM »

I am modifying the Rubicon source code to create my own version.
It has the following extra parts: Super furnace, super copier, backwards packer/unpacker/gate, boulder, movable furnace, crate-gate (crates go left, barrels go right), left/right/upward/downward gun and target (transports crates and barrels across vast distances without conveyors or others, Yes-signs (opposite of anti-sign, allow you to use some sandbox parts)

See puzzle 'lebezaf' for a demonstration (must be opened in this version).
Download the game from http://www.mediafire.com/?o1s2dmys1bi (it runs standalone or as an applet, just like the original Rubicon. Did you know Rubicon could run standalone?)

Edit: bugfix
« Last Edit: April 19, 2008, 09:04:26 AM by immibis » Logged

while(is_computer_on() && !is_computer_on_fire()) do_stuff();

If money grew on trees...the global economy would collapse.
Windows systems need reinstalling as often as Linux systems need rebooting.
ddsdiur
Operator
**
Posts: 17


View Profile
Re: Rubicon level data
« Reply #9 on: April 19, 2008, 09:44:21 AM »

immibis, thank you for adding those objects! They enable so many new
puzzles/solutions! Maybe you could add a reflector for the crate-shooter,
and the ability to use the new parts in levels. Maybe a NOTGATE(gate appears when opposite square is empty).
Did you use the source code I posted, or did you decompile it yourself? Just curious.
Logged

immibis
Engineer
****
Posts: 113

computer-dude@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #10 on: April 19, 2008, 10:11:37 AM »

ddsduir: I decompiled it myself, and you can make a reflector out of a gun and a target (and maybe a girder).

An explanation of guns and targets for anyone who doesn't get it: When a crate/barrel/boulder/movable furnace goes next to the green line of the gun, the program looks in the appropriate direction for a target. If a target is found, the object is transferred next to the target's red line. If not, nothing happens. Yes, they can go through walls.

It's compatible with normal Rubicon, except that the additional parts will not be loaded properly into rubicon and instead you will get a mess. Rubicon was running out of characters to store the stuff with, so the additional parts are three-character combinations: a backquote (`) and two other characters.

If you want to use the new parts in levels, use a Yes-Sign (it's the opposite of an anti-sign). You probably shouldn't use them in normal Rubicon puzzles as they will be considered cheating most of the time.
Logged

while(is_computer_on() && !is_computer_on_fire()) do_stuff();

If money grew on trees...the global economy would collapse.
Windows systems need reinstalling as often as Linux systems need rebooting.
immibis
Engineer
****
Posts: 113

computer-dude@hotmail.com
View Profile Email
Re: Rubicon level data
« Reply #11 on: April 20, 2008, 02:29:53 AM »

Sorry for the double post but i've optimized the physicsv2 function (the slowest function that is not part of Processing) and it now runs at about 5fps on my laptop, with the CPU scaled to 662 MHz - much faster than it was.
Kevan, maybe you should include it in the next release of rubicon (of course after removing the additional parts processing) - the source is included in the jar file.

Latest release of mine: http://www.mediafire.com/?0d9bdcrcog0. I also changed the maximum fps to 20, so it should be more responsive and run levels faster.

Edit: Another optimization, not sure if it works though.
Another edit: Now interfaces with...*drum roll*...jnz's Warehouse Search! Woohoo!
Edit number three: Ultra-dozers (which turn when they hit a wall, and ignore turn signals), and Bugs (blue Bugs can push crates, and turn 90o clockwise when they hit a wall, red Bugs are a combination of blue Bugs and Super Furnaces). See vifavim and logihyn. Even upward-facing bugs can push crates (so can downward-facing ones, but it's not really obvious unless one rescues a crate from a furnace).
Edit #4: Will be posting a bugfix for the flickering behaviour soon.
Edit #5: Will be posting a bugfix for the upward-facing-red-bugs-turn-into-ultradozers bug (get it, bugfix?) at the same time.
« Last Edit: May 03, 2008, 11:46:34 PM by immibis » Logged

while(is_computer_on() && !is_computer_on_fire()) do_stuff();

If money grew on trees...the global economy would collapse.
Windows systems need reinstalling as often as Linux systems need rebooting.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Rubicon Forum | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!