• 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
ntwiles

Vector Based 2D Mapping

2 posts in this topic

I'm interested in creating a 2D sidescrolling game with map design based on convex vectors instead of tiles (See "Type #4" in this article). This will be a challenge for me, and I have a few questions.

 

My first issue is with level design. The way I see it I'll need to do the following:

 

1. Design each level as a series of convex shapes for collision, overlaid with an image.

2. Save each convex shape as an array of points.

 

This would be very tedious, are there any map editors available that already do something like this? 

 

My second question has to do with moving the player up and down slopes:

 

Collision detection and response should be no problem, but I'm not 100% sure about how a player would move up and down a slope. Currently, I would do it like this:

 

1. Determine if player collides with a polygon.

2. Determine between which two points of the polygon the player is colliding.

3. Modify player's Y-value based on the slope of that line segment.

 

Am I on the right track, or is there a better way to do this?

 

Would love any insight or links to articles on the topic. Thanks guys!

 

0

Share this post


Link to post
Share on other sites

Couple things.

 

You may want to think about going 100% vector based graphics, ie something similar to SVG (Scalable Vector Graphics).  I've been wanting to do something along those lines for a while now, it just hasn't made it to the top of the want-todo list.

 

If I were to do so, with regards to players (or any moving objects, for that matter) moving up/down slopes, I would just compute a vector perpendicular to the slope the object was moving on, and use that as the base movement vector for that object.  I've also thought about applying speed modifies based on those slopes.  Move faster downhill, slower uphill.  The potential beauty there is that the uphill speed modified could inherently become the factor for the steepest incline you can move up.

0

Share this post


Link to post
Share on other sites

I'm not aware of any that do this. Its a bit unclear to me; are you wanting to do tile-based graphics with vector-based collision (a combination of #2 and #4), or free-form graphics with vector-based collision (just #4, like Braid)?

 

There are few, if any, map editors for games with free-form graphics as far as I know of. But actually a decent substitute, at least for laying out the map, would be to use a 3D modelling program constrained to a plane (or perhaps a few planes, for parallax). You can layout axis-aligned textured quads for the main background, and then instances of other "decorative" objects with arbitrary scale/rotation. The "models" for the background and decorative objects would just be textured quads, or I suppose other shapes as appropriate. You could even layout the collision data as a collection of line segments, where each collection is again a model. You'd just need to parse out which models are for rendering and which are for collision when you load the map file. You probably want to transform the 3D modelling file into a better format for distribution anyways, so you can do this step then, but its an implementation detail. Some collision data might have other uses -- for example, a lantern on a wall may not collide with entities, but it still might need a hit-box so that you can smash it for power-ups. You'll need a way to sort that too. Typically each model in a 3D scene file has a unique ID, so you can use it as a key or encode it to have different meanings.

 

If you want Tiles + vector collision, then you probably need to write a simple tool that displays the map and allows you to define the collision segments, or alternatively, each tile can have predefined collision boundaries and they can be automatically linked to neighboring tiles (you'll still need a tool to define them in the first place). Another option is to create a tool that exports your tile-based map as a 3D-scene (each tile is a textured quad model, these arranged in a grid to form the map), and then you can use a workflow like I described before to define collision and whatnot. You can also have your conversion tool export "default" collision data as I described at the beginning of this paragraph, so that it can be modified in the 3D modeler,

 

If you do not have access to high-end, often expensive, 3D modelling tools like Max or Maya, Blender is very powerful if not as polished as the others, or you could try Google Sketch-up for something a little lighter weight. If you're familiar with Ruby, Sketch-up offers a scripting interface that you might even be able to use to import tile-based maps so that you can manipulate them.

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