Jump to content

  • Log In with Google      Sign In   
  • Create Account


Vectorial 2D Platformer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 kidaj12   Members   -  Reputation: 103

Like
0Likes
Like

Posted 29 July 2013 - 12:49 AM

Hello all, 

 

I'm very new to game development and I was interested in building a 2D Platformer. 

 

I have built a 2D game before but it was a tile based game. I want to create a game where I can have hills and different slopes that the user can climb on. Similar to what the game Braid has. 

 

I was doing my research and I have found that the technique is "vectorial". How would one start to look into creating a game like this? Most 2D tile games have a tile editor like Tiled that you can use. How would you build a map editor for such a game? What type of format should the data be in since it's probably going to be points connecting to paths. Also, how would one determine what sprite or image to use for a path?

 

I am really interested in this technique. If anyone could give me a good push in the right direction it would be greatly appreciated. 

 

I am most likely going to use SFML 2.1 or MonoGame to create it. Still trying to decide whether or not I want to do it in C++ or in C#.

 

Thank you in advance. 

 

Kidaj



Sponsor:

#2 ram64   Members   -  Reputation: 856

Like
2Likes
Like

Posted 29 July 2013 - 02:32 AM

There is a good tutorial on how to implement 2D platformers here on GameDev. Here http://www.gamedev.net/page/resources/_/technical/game-programming/the-guide-to-implementing-2d-platformers-r2936 you can find it, there is also explained the vectorial method that you speak of. 



#3 kidaj12   Members   -  Reputation: 103

Like
0Likes
Like

Posted 29 July 2013 - 09:31 PM

Thank you for the link to that article. 

 

I know have a better understanding of the higher-level design and what type of work I need to put in to get something like this working. 

 

What would be the best way to store and retrieve the data for map?

 

Like I mentioned earlier, in a tile editor, something like x == 'grass tile' would work. But with the vectorial technique, how would the data structure look like? Would it be something like:

{
     sprite: "path to sprite .png", 
     vectorPath: [{x: 1, y: 1}, {x: 2, y:2}]
}


#4 markr   Crossbones+   -  Reputation: 1653

Like
1Likes
Like

Posted 30 July 2013 - 06:23 AM

>>> How would one start to look into creating a game like this?

 

Probably you'd want to work out how the physics would work. You could use a physics engine such as the (hugely popular) Box2d (of Angry Birds fame)

 

>>> Most 2D tile games have a tile editor like Tiled that you can use. How would you build a map editor for such a game?

 

You'd use a SVG editor such as inkscape, or some other vector tool which exports into a convenient format.

 

>> What type of format should the data be in since it's probably going to be points connecting to paths.

 

It's going to be a number of polygons with some metadata attached (concerning behaviour, appearance etc).

 

>>> Also, how would one determine what sprite or image to use for a path?

 

That would have to be part of the metadata. Presumably you'd draw a texture-mapped polygon and set texture coords appropriately for its shape (I'm pretty sure that's what Angry Birds does).

 

- Mark



#5 MoradM   Members   -  Reputation: 136

Like
-2Likes
Like

Posted 30 July 2013 - 05:45 PM

A simple idea. 
Have you ever considered using the Unity engine?



#6 papulko   Members   -  Reputation: 861

Like
1Likes
Like

Posted 31 July 2013 - 02:57 AM

What does the Unity engine have to do with this? He was asking how to implement 2D vector math. Please don't answer specific questions with completely unrelated general advice.

 

Anyway, vector algebra is a huge subject and will take most people some time and effort to fully comprehend. The good news is that once you have a solid understanding of vector math, you've also covered most of the math concepts required for 3D applications.

 

This website contains tutorials on programming vectors, and it has interactive examples to clarify the different concepts: http://www.tonypa.pri.ee/vectors/tut01.html



#7 shadowisadog   Crossbones+   -  Reputation: 2443

Like
0Likes
Like

Posted 31 July 2013 - 08:20 PM

There are a number of options for generating the data. I second Markr's suggestion to use Inkscape or some other similar program to create the level data. You could then process the SVG to something more game specific through a script or XSLT . You could choose to store such data in a number of formats such as XML or JSON. There is even a commercial solution called Corona for the SVG approach.

 

You could alternatively develop a level editor using C#, PySide, Qt, Java, ect. This route would be significantly more time consuming then using an existing vector graphics program though.


Edited by shadowisadog, 31 July 2013 - 08:23 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS