• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
TheVirtualDragon

Making 2D-Platformer Levels

4 posts in this topic

Suppose you are making a 2D platform game. You are now at the stage where you need to design the levels. This game you are making can be tile based or have epic graphics. It also uses Box2D/Chipmunk/<Insert your favourite physics engine here> to manage the collisions and physics.

Well, I am doing exactly just that and until now, I have been drawing 50 by 50 tiles in Gimp, then loading them in to my game and drawing them according to a little text file which defines the level (e.g. a "2" means grass tile). But now, I have had a thought. Wouldn't it be easier if you just opened up Gimp/Photoshop and actually drew the level your self? This would be very easy to do: open a tile, copy it and paste it on to your level and then move it around depending on where you want it. Then you could save it as .png and load it in to your game. Then, you could tell the physics engine where the ground is etc. (basically creating bodies in the case of Box2D).

So, is this a better way to create levels in a game (like the one described)? You could easily move and edit the tiles around or even eliminate the need for tiles altogether and have a vectorial game. Then you could just load the saved image and display it and that would be it.
0

Share this post


Link to post
Share on other sites
You [i]can[/i] do that, but it raises some issues. Firstly, the levels are no longer dynamic. You can't edit them in a map editor, for instance...and that's one of the strengths of tile-based games. Also, you'd probably want to chunk the map, assuming it's the size of a level in a typical platformer, so that you could load and unload pieces of it at different times as the player progressed through the level.
0

Share this post


Link to post
Share on other sites
Good point, but I presume this is how vectorial levels as explained in the last part of this post:

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

Are made then?
0

Share this post


Link to post
Share on other sites
Yes, in general, you would want to break the level art into pieces and load them on an as-needed basis. You may even need to break it up anyway if it's sufficiently complex and difficult for your image editing program to handle (We've had this problem.) For a small level though, you can probably get away with loading a single image.
0

Share this post


Link to post
Share on other sites
Also, I had this other idea:

1. Use Gimp / Inkscape as a level editor and save the level as a png file
2. Use The Python Imaging Library to load the image and iterate through it
3. Compare each 50x50 portion of the file to the tiles in a tile set.
4. If a the images are the same (if the 50x50 area of the level is, for example, a grass tile) then write to a .json file (or something similar) which will be used to store data about the level.

This method isn't that useful for graphics, but if you are using something like Box2D, then you can easily save where the bodies are and where the collisions will happen, just by looking at a tile map.

So would this be a good way to do things? Edited by TheVirtualDragon
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0