Forum Logo Welcome, Guest. Please login or register.
Did you miss your activation email?
November 16, 2018, 14:28:41 | See new unread posts
Home Help Search Arcade Chat Login Register

nifflas.ni2.se  |  Nifflas' Support Forum  |  Released Games  |  The Great Work  |  Topic: Level editing « previous next »
Pages: [1] Print
Author Topic: Level editing  (Read 5340 times)
Nifflas
Game designer


Total My honestly gotten stars: 58
Offline Offline



View Profile
« on: January 28, 2013, 20:14:28 »

Notice: This is the first post in a sticky topic, and will repeat on every page.
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.
Logged
Qqwy


Total My honestly gotten stars: 6
Offline Offline


View Profile
« 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
Logged
Nifflas
Game designer


Total My honestly gotten stars: 58
Offline Offline



View Profile
« 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 » Logged
Qqwy


Total My honestly gotten stars: 6
Offline Offline


View Profile
« 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.
Logged
LPChip
You can only truly help other people by allowing them to fail.
Administrator


Total My honestly gotten stars: 120
Offline Offline


Excel at the thing you're the best at!


View Profile WWW
« 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. :)
Logged

If this post was helpful to you, please consider giving it a shorter hidden star code by pressing the 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
egomassive


Total My honestly gotten stars: 232
Offline Offline



View Profile WWW
« 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.
Logged
AA
Global Moderator


Total My honestly gotten stars: 23
Offline Offline


Was ITA84


View Profile WWW
« 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!
Logged

Videogames are for everyone, by everyone
LPChip
You can only truly help other people by allowing them to fail.
Administrator


Total My honestly gotten stars: 120
Offline Offline


Excel at the thing you're the best at!


View Profile WWW
« 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.
Logged

If this post was helpful to you, please consider giving it a shorter hidden star code by pressing the 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
egomassive


Total My honestly gotten stars: 232
Offline Offline



View Profile WWW
« 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 » Logged
Pages: [1] Print 
nifflas.ni2.se  |  Nifflas' Support Forum  |  Released Games  |  The Great Work  |  Topic: Level editing « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines