A little post to explain how I create levels in Run Away.
All the system is based on pixels.
Then I create on my paint editor a new image where 1 pixel is one tile in the game (classic).
To choose which tile to use, I work on the Red color, Grass will be 0, Water will be 100 …
Then I add foes, bonus, checkpoints and tuto points with Green color
And to conclude, the Blue allows me to select a specific one. For exemple I can chose the foeI want to spawn.
Here are my maps
For the last one, that’s what we have in game:
In the game, the loading is really static, I could have added information on the Alpha of the first pixel to store data on the level for exemple the set (if it’s forest or lava) and the id (to know the order).
My local values for each colors.
int GrassRed = 0;
int WaterRed = 100;
int PanelRed = 130;
int EndRed = 150;
int SpikeRed = 160;
int BossWallRed = 170;
int DefaultRed = 255;
int SpawnGreen = 100;
int CheckPointGreen = 200;
int FoeGreen = 150;
int BonusGreen = 160;
int TextGreen = 170;
int ShadowGreen = 180;
int FishBlue = 100;
int BirdBlue = 101;
int SawBlue = 102;
int HalfSawBlue = 103;
int HalfSawLeftBlue = 104;
int BirdNoCollideLeftBlue = 105;
int BirdNoCollideRightBlue = 106;
int SawNoCollideTopBlue = 107;
int BossBlue = 120;
int BossDamageBlue = 121;
//int SpawnSideRightBlue = 255;
int SpawnSideLeftBlue = 254;
int SpikeRightBlue = 254;
int SpikeBottomBlue = 253;
int SpikeLeftBlue = 252;
Thanks for reading, if you want some other little post on how my game works, please comment