How to create custom versus levels?

How to create custom versus levels?

Postby Tim » Tue Aug 06, 2013 10:43 am

Awesome standalone level editor created by Andrew Start: https://dl.dropboxusercontent.com/u/330 ... Editor.air



------------------------------------------------------------------------------------------------------------
-How to make your own versus levels for megabyte Punch ( the old way )-


Index
- 1. Introduction
- 2. Drawing the level
- 3. Saving the level
- 4. Restrictions
- 5. Tips


1. -Introduction-

Creating levels for Megabyte Punch involves using a image editor and basically drawing it on a low resolution,
one pixel equaling one block. You can find the current custom levels in the game folder: Megabyte Punch >
MegabytePunch_Data > Resources > Level. They are labeled CustomLevel1.png, CustomLevel2.png and CustomLevel3.png.
These are the default custom levels, replacing one of these with your own will get it playable in the game via
the versus level select.


2. -Drawing the Level-

The color of the pixel determines which block gets placed. For example, black pixels (0 Red, 0 Green and 0 Blue values) are the
ground blocks from the Electro Caves. As for image editing software, we suggest using GIMP ( http://www.gimp.org/ ).
Unfortunately MS Paint (and a few other free packages) won't work correctly (due to exporting gamma information which ruins the
RGB values). Use the TileLegend.png in the level folder to pick the correct colors. Always use the pencil tool(no brushes). Then if you're
satisfied with the result use these colors to specify where to start and where to return after losing a life:

- Spawn points:
Yellow (255.255.0)

- Respawn point:
Magenta (255.0.255)

Know that unknown RGB Values, as in values not in the legend, will result in empty (air) blocks.


3. -Saving the level-

Open a new file and set the resolution of your image (keep in mind the size restrictions)
Use a pure white backgroud (255.255.255)

For Photoshop: Save as .png > Done!

For GIMP: Export as > select .png from the dropdown > export > Now a new screen pops up > Be sure to de-select "save gamma" (gamma information will destroy the RGB values and we don't want that)

> Done

Save as CustomLevel1.png CustomLevel2.png or CustomLevel3.png and store them in your game folder: Megabyte Punch >
MegabytePunch_Data > Resources > Level.


4. -Restrictions-

There are some restrictions the level must comply to. If one of these is not met, the level will not start and play an error
sound.

- The image size must be within 10 x 10 and 100 x 100 pixels
- The image size must be dividable by 10. For example: 20 x 80 will work fine while 34 x 87 will not.
- The level must include 4 spawn points (yellow) and one respawn point (magenta)


5. -Tips-

To make the level more fun to play, try leaving some room on the top and sides of the image. This makes it possible to return after
almost being knocked out the level. We found 40 pixels on the top and about 30 on the sides to be the most fun.

RGB Colors you can use:
Spawn point (You must include 4 of these in your level): 255.255.0
Respawn point (You must include 1 of these in your level): 255.0.255

Electro Cave:
Default: r0 g0 b0
Variation 1: 40 40 40
Variation 2: 80 80 80
Variation 3: 120 120 120
Variation 4: 160 160 160
Plant: 0 241 0
Platform: 0 255 0

Lost Megaclopolis:
Default: 1 1 1
Variation 1: 41 41 41
Variation 1: 81 81 81
Holoblocks: 0 243 0
Crate: 0 242 0
Platform: 0 254 0
Breakable Doors: 0 240 0

Ancient Tech:
Default: 2 2 2
Variation 1: 42 42 42
Variation 2: 82 82 82
Variation 3: 122 122 122
Variation 4: 162 162 162
Sandblock: 220 180 140
Plant: 0 239 0
Breakable Platform: 238 238 0

Subprogram Deadlands:
Default: r5 g5 b5
Variation 1: 45 45 45
Variation 2: 85 85 85
Variation 3: 125 125 125
Variation 4: 165 165 165
Unbreakable: r205 g205 b205
Breakable platform: 0 238 0
Grave with enemy in it: 0 237 0
Tombstone: 0 236 0

Frostbyte Deep:
Default: 6 6 6
Variation 1: 46 46 46
Variation 2: 86 86 86
Variation 3: 126 126 126
Variation 4: 166 166 166
Ice: 200 250 250
Platform: 0 230 200
Breakable Platform: 0 239 10
Frost Crystal: 0 228 200

Binary Fortress:
Default: 100 0 0
Variation 1: 50 0 0
Variation 2: 125 0 0
Platform: 130 0 0
Crates: 205 0 0

Tutorial Level:
Default: 4 4 4
Variation 1: 44 44 44
Variation 2: 84 84 84
Variation 3: 124 124 124
Platform: 0 253 0

Village:
Default: 7 7 7
Variation 1: 47 47 47
Variation 1: 67 67 67
Variation 1: 87 87 87
Variation 1: 127 127 127
Variation 1: 147 147 147
Variation 2: 207 207 207
Side fan: 52 20 0
Grass 1: 69 69 96
Grass 2: 69 96 69
Grass 3: 96 69 69

Hazards:
Bombs: 0 120 0
Virus cloud Green: 0 234 0
Virus cloud Red: 0 233 0
Hot Plate: 222 111 0
SteamblastNorth: 180 130 0
SteamblastSouth: 180 160 0
SteamblastEast: 180 145 0
SteamblastWest: 180 175 0


You can find the TileLegend.png in you game folder > Resources > Level. With this image you can color pick your blocks.
Last edited by Tim on Wed Aug 14, 2013 3:34 pm, edited 2 times in total.
User avatar
Tim
 
Posts: 65
Joined: Tue Apr 02, 2013 3:57 pm

Re: How to create custom versus levels?

Postby Sceaf » Sun Aug 11, 2013 1:50 am

So, currently you can only have three custom levels at a time?

If that is the case, would you consider greatly expanding the limit?
User avatar
Sceaf
 
Posts: 3
Joined: Tue Aug 06, 2013 2:08 am

Re: How to create custom versus levels?

Postby Reptile » Sun Aug 11, 2013 10:34 pm

You can make an unlimited amount of levels, however you can only load in 3 at once.
User avatar
Reptile
Site Admin
 
Posts: 11
Joined: Tue Apr 02, 2013 3:46 pm

Re: How to create custom versus levels?

Postby Muzze77 » Tue Aug 13, 2013 12:20 am

Hay Raptile Team,

If you want a easier way for your Level Editor massage me.
I have ideas for example with excel wich is 100 times easier than use gimp ;).
If you need an Example, write me a massage in Skype (xxmbaccxx) or here in your forum.

Nice to know you

Muzze77
Muzze77
 
Posts: 2
Joined: Tue Aug 13, 2013 12:17 am

Re: How to create custom versus levels?

Postby Tim » Tue Aug 13, 2013 11:17 am

Sup Muzze77,

Feel free to share your ways of level creating here in the forums! :)
User avatar
Tim
 
Posts: 65
Joined: Tue Apr 02, 2013 3:57 pm

Re: How to create custom versus levels?

Postby Shadow Wolf TJC » Tue Aug 13, 2013 4:33 pm

Muzze77 wrote:Hay Raptile Team,

If you want a easier way for your Level Editor massage me.
I have ideas for example with excel wich is 100 times easier than use gimp ;).
If you need an Example, write me a massage in Skype (xxmbaccxx) or here in your forum.

Nice to know you

Muzze77

I used to work with JavaScript while modding for a game called Warzone 2100, and from my impressions with JavaScript, I believe that it would be possible to design levels with both relative ease and a great amount of flexibility by parsing through an external text document as if it was your game's scripting language. I'll presume that your engine is capable of parsing through external files, as well as handling multidimensional arrays (which are basically arrays within arrays, such as so-called 2D and 3D arrays). :ugeek:

I'll give you an example later on, as I currently have some stuff to do in real-life. Later.

Edit: OK. Now that I have some free time on my hands, here's an example of what a level file might look like:
Code: Select all
var background = BINARY_FORTRESS; //This would tell the game which background to use for the level. I'm using a constant here as the value of this variable, and I'm assuming the value of BINARY_FORTRESS would be defined in your game's master script before it tries to access this file.

str music = "BinaryFortressBattle.wav"; //This would tell the game which music track, in your game's music directory, to play in the level. Would default to playing no music at all if left blank, undefined, or if the music track is not found.

var dimensions = [10,10,3]; //This would tell the game how big the stage should be. The 1st value would be the stage's width, while the 2nd value would be the stage's height. The 3rd value would be used for the stage's depth; although the game plays in a strictly 2D sense, this could be used to add background and foreground layers. Defaults to 1 layer if left undefined.

var playableLayer = 0; //This would tell the game which layer to use as the level's actual playing field, with every other layer serving as the stage's background and foreground layers respectively. Defaults to layer 0, or the frontmost layer, if left undefined.

var startPositions = [[2,2],[7,2],[4,3],[5,3]]; //These are the coordinate sets for all 4 players' starting positions.

var respawnPosition = [4,0]; //This is the coordinate set where all players would respawn from.

var levelLayout = [ //This is the data for the level layout. 0s would indicate empty space, as would undefined arrays (so that the game wouldn't break). Note that this is a 3-dimensional array.
  [ //As indicated by the playableLayer variable that we defined earlier, this 1st array would serve as the layer that the players would actually fight in. All other layers before it would be used as the foreground layers, while all other layers after it would be used as background layers.
    [], //These empty arrays would consist of undefined variables, which the game would treat as 1-block-thick horizontal lines full of empty spaces.
    [],
    [0, 0, BF_BLOCK1, BF_BLOCK2, 0, 0, BF_BLOCK2, BF_BLOCK1], //Although the actual stage dimensions are supposed to represent a 10x10 stage, the game would treat missing or undefined arrays as open space.
    [0, 0, BF_PLATFORM1, BF_PLATFORM1, BF_PLATFORM1, BF_PLATFORM1, BF_PLATFORM1, BF_PLATFORM1],
    [],
    [],
    [],
    [0, 0, GAS1, GAS1, GAS1, GAS1, GAS1, GAS1, 0, 0],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1]],
//Although we're missing a 10th array here, again, the game would treat missing arrays as open space, so there would be a 1-block thick line of empty space below the line of BF_BLOCK1s.
  [], //Our 2nd layer would consist of nothing but air, so we could leave this array empty.
  [ //Our 3rd layer would be composed entirely of BF_BLOCK1s, with the exception of a couple "windows" composed of open space.
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, 0, 0, BF_BLOCK1, BF_BLOCK1, 0, 0, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, 0, 0, BF_BLOCK1, BF_BLOCK1, 0, 0, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1],
    [BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1, BF_BLOCK1]]];


Although this example may not be in the cleanest format (if only I could've disabled word wrap, and added open spaces using the Tab key), the end result would be a 10x10 stage with the Binary Fortress background and music, with a line of green gas clouds, and a background with a couple windows to boot. :mrgreen:
Shadow Wolf TJC
 
Posts: 12
Joined: Fri Aug 09, 2013 3:18 pm

Re: How to create custom versus levels?

Postby BringerofBabies » Wed Aug 14, 2013 3:49 am

I made a level editor in Adobe AIR. It should work fine on OSX and Windows. Sorry Linux users, Adobe dropped support for AIR for Linux a while back. Sorry Reptile, I stole the game's icon for this, because I am bad at art.
https://dl.dropboxusercontent.com/u/3305712/MBPEditor.air
Image
BringerofBabies
 
Posts: 5
Joined: Wed Aug 14, 2013 3:19 am

Re: How to create custom versus levels?

Postby Luc » Wed Aug 14, 2013 9:08 am

Nice work all, but... may I ask what's wrong with GIMP? GIMP isn't that hard for easy editing, you just shouldn't touch the more advanced features. :P Optionally you can hide features you don't use by clicking this arrow in the right corner of a feature tab (Image), and select "close tab".
*I am not a representative of Reptile Games. All of my posts are on my own behalf.*
User avatar
Luc
 
Posts: 12
Joined: Wed Jul 24, 2013 12:19 pm

Re: How to create custom versus levels?

Postby Tim » Wed Aug 14, 2013 11:47 am

@BringerofBabies: That's awesome man! Well done, works like a charm!
User avatar
Tim
 
Posts: 65
Joined: Tue Apr 02, 2013 3:57 pm

Re: How to create custom versus levels?

Postby Dion » Wed Aug 14, 2013 1:38 pm

BringerofBabies wrote:I made a level editor in Adobe AIR. It should work fine on OSX and Windows. Sorry Linux users, Adobe dropped support for AIR for Linux a while back. Sorry Reptile, I stole the game's icon for this, because I am bad at art.
https://dl.dropboxusercontent.com/u/3305712/MBPEditor.air


I just had to pop in to say that this is really nice, good work! :redh
User avatar
Dion
 
Posts: 5
Joined: Tue Apr 02, 2013 4:09 pm

Next

Return to Megabyte Punch

Who is online

Users browsing this forum: No registered users and 1 guest