Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Side Scroller level design

This thread is locked; no one can reply to it. rss feed Print
Side Scroller level design
Neil Roy
Member #2,229
April 2002
avatar

I was thinking about creating a side scroller as it is something I have never done, but I am not quite certain about a good way to go about designing and editing levels.

For normal 2D games like my Deluxe Pacman games it's straight forward, you have a single screen. but for a side scroller the screen is potentially much larger, horizontally and vertically. I am wondering how has anyone else approached this? Do you create several screens and put them together? Create a level editor that scrolls etc...

Any thoughts or ideas on this or other things I need to keep in mind are welcome.

---
“I love you too.” - last words of Wanda Roy

Chris Katko
Member #1,881
January 2002
avatar

I made a scrolling level editor. It's not that big of a deal.

You have tiles. Each tile is TILE_WIDTH/TILE_HEIGHT. You draw two for loops. You subtract the viewport's OFFSET_X and OFFSET_Y from all drawing routines to "scroll" and you keep track of what "is" in the viewport (OFFSET_X + SCREEN_W, et al) and don't draw the rest.

You tend to draw one tile MORE than the screen width/height so that you always have at least a full screen of tiles (otherwise, the last row/column clips away to blackness.)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Neil Roy
Member #2,229
April 2002
avatar

That makes sense. I had a feeling it would be something like that. I figure it is high time I made one. With a female character I think. Call it "quest for clothing", she starts out nekkid and has to find her clothes... ;D Could sell... :P

I don't know about ideas yet... but... I done the required tetris clone (with a twist, each line reveals part of a background image), done the pacman to death... I just need a side scroller, a shoot-em-up and maybe a strategy. ;)

There's a good read on designing one here...

http://devmag.org.za/2011/07/04/how-to-design-levels-for-a-platformer/

---
“I love you too.” - last words of Wanda Roy

Kris Asick
Member #1,424
July 2001

In the not-too-distant future I'm going to be doing a side scrolling game for my current project, however, it's actually going to be single-screens which connect together and instantly transition when you go from one to the next, similar to games such as VVVVVV or I Wanna Be The Guy.

In most cases though, you'll want to make a scrolling platformer. Your level editor should likely be designed to either show really small tiles, or scroll as well, and if you go for scrolling it always helps to have some way of viewing the level as a whole in a smaller scale.

However, designing levels in this manner can be extremely time consuming if you're taking a tile-based approach. Some modern platformers instead have large graphical assets loaded in and placed in various spots while the actual collision is done with polygons, thus allowing for a much more fluid and artistic design than you couldn't get away with using tiles (at least, not easily).

Either way you slice it, make sure the things you design for your editor are able to be carried over into your actual gameplay to help save time. Heck, some games actually use the EXACT same code for both the editor and gameplay, with the editor simply dummied out upon release! :o

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Audric
Member #907
January 2001

I have sometime drawn the maps as large bitmaps (More than 4000 pixel wide for a game displaying 320 pixels wide), in a tile-friendly graphic program, ie. one which provides snap-to-grid, to easily cut and copy tiles and blocks of tiles.
Then a "compressor" program determines unique tiles and builds the tileset (image) and tilemap (array of indices). I can even have GNU make determine which files are outdated and require a rebuild.

For inter-connected maps like a Castlevania/Metroid, a straightforward approach is to design the entire world as a single (large) tile map anyway, and then use rectangles to design the places that the scrolling is limited to. It ensures that the "links" between rooms work ok, and your collision system doesn't need special cases to handle out-of-screen areas. But it's only possible if the world is Euclidian, and if there are gigantic "holes" that are not meant to be visitable, it will be wasteful.

I think polygons should be generated automatically from tiles, if you need them : A block of 3x2 solid tiles becomes a single rectangle.

Neil Roy
Member #2,229
April 2002
avatar

I always design my level editor first for a game before the game itself. This way I can determine exactly how the level data will be stored and needs to be handled once I create the actual game. The level editor for my Deluxe Pacman games are both way different than the game itself though. Other that the obvious loading functions and graphics, there's not much similarities.

---
“I love you too.” - last words of Wanda Roy

Mark Oates
Member #1,146
March 2001
avatar

this is really good; just make sure to read the section on "rhythm groups".

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Neil Roy
Member #2,229
April 2002
avatar

I just found this write up on platformers that is REALLY good! He covers how to handle various types, jumps, you name it... and in a way that is easy to comprehend with examples from popular games.

http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/

this [games.soe.ucsc.edu] is really good; just make sure to read the section on "rhythm groups".

Wow, yeah, just a quick glance at that look impressive, thanks!

---
“I love you too.” - last words of Wanda Roy

Go to: