Level editing

  • 8 Replies
  • 7263 Views
*

Offline Nifflas

  • 1532
  • 61
    • View Profile
Level editing
« on: January 28, 2013, 20:14:28 »
The Great Work is a bit unusual in the way that I didn't make a developer editor for it. All the level designing was done in Notepad, and except creating graphics and music (those are .png and .ogg files), Notepad is all you need to design your own levels.

If it happens that somebody creates a third party level, I'll add support for loading additional levels into the game.

*

Offline Qqwy

  • 17
  • 6
    • View Profile
Re: Level editing
« Reply #1 on: January 28, 2013, 21:18:12 »
I have been looking a little into the folder and file structure. It seems to me very simple and flexible. I am SO going to develop a level.

A small question. Is there any way to add new background graphics for in the game?

Congrats on the release today  :D!

~Qqwy

*

Offline Nifflas

  • 1532
  • 61
    • View Profile
Re: Level editing
« Reply #2 on: January 28, 2013, 21:59:43 »
Hi! It's unfortunately a bit tricky. You can edit Sprites.dat (Mathias may be able to help with instructions to how to do that) but when I release an update which has a the level selector menu, the filenames will unfortunately change.

On the other hand, when the version with a level selector is released, the Sprites.dat should stay the same from that point.

It's a bit of work to add the feature in, which is why I want to see if there's an interest in creating nice levels for the game first.
« Last Edit: January 28, 2013, 22:01:46 by Nifflas »

*

Offline Qqwy

  • 17
  • 6
    • View Profile
Re: Level editing
« Reply #3 on: January 29, 2013, 15:37:16 »
I have walked through the level files and experimented a lot, and I think I now have a more or less complete list of the room file and tiles structure. They might be of some use for anyone wanting to create their own level:

The only thing I haven't been able to figure out yet is the way the color values work. I expected they would be RRRGGGBBB values between 0 and 255 each, but it turns out that the number of digits in the color values can change.
Nifflas, maybe you can give us a hint?  :^^:


This brings me to an important observation: The graphics that belong to the different containers seem to be hard-coded. I am not entirely sure, but the same seems also to be true for the names of the different containers. This might be an obstacle for quite a few people that want to create their own level, because I think that part of the originality comes from the people you can interact with.

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Level editing
« Reply #4 on: January 29, 2013, 17:29:09 »
I bet the color is a Long/int value instead of an RGB value.

To calculate it, you'll have to do this: http://www.shodor.org/stella2java/rgbint.html

if my memory serves me right from my VB programming its something like (blue * 64) + (green * 64 * 64) + (red * 64 * 64 * 64).

But that link will calculate it for you. :)
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: Level editing
« Reply #5 on: January 29, 2013, 18:40:41 »
This is the formula:

R + (G * 256) + (B * 256 * 256)

I tried it out in the game to make sure. The website LPChip pointed to calculates it with red and blue switched. The third party tools for KS will calculate it for you when you change skin or clothing color, then you have to look in the World.ini to see the number value. It's probably most convenient to use a calculator.

*

Offline AA

  • 510
  • 23
  • Was ITA84
    • View Profile
    • Insight on Videogames
Re: Level editing
« Reply #6 on: January 29, 2013, 19:18:00 »
Knytt Stories, Knytt Underground and The Great Work all use 24-bit int BGR colour notation (which is obtained with egomassive's formula).

Impressive work, Qqwy, by the way!
Videogames are for everyone, by everyone

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Level editing
« Reply #7 on: January 29, 2013, 19:41:32 »
Ah, I was on the right track...

So basically, you can use the website I used, but instead you have to fill the blue value at the red value and visa versa.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: Level editing
« Reply #8 on: January 29, 2013, 20:51:47 »
So basically, you can use the website I used, but instead you have to fill the blue value at the red value and visa versa.
Yes, that's probably the easiest way to do it. I wish I'd thought of it.

Impressive work, Qqwy, by the way!
I agree. *star for Qqwy*
« Last Edit: January 29, 2013, 20:53:25 by egomassive »