Jump to content

  • Log In with Google      Sign In   
  • Create Account


Help me chose a performant 2D framework / engine for a tile based game


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
4 replies to this topic

#1 astronaute   Members   -  Reputation: 105

Like
0Likes
Like

Posted 25 October 2012 - 09:46 AM

Hello there :)

I would like to start developing a 2D game and already done a fairly amount of research but there is a particalar point I need help with.

The game I imagined should contain a very large amount of tiles, similar to Terraria, performance is very important,but UNLIKE Terraria, the game will not be player centric, the camera should be able to move everywhere at any moment, zooming in/out, so it will be impossible to load only world chunks around player. This is the main difference and the crucial one compared to other minecraft / terraria like games.

How would you approach a similar project and which tools would you use, especially performance wise?

I know how to code in many languages not necessarily game related (as3, java, ruby...) but can learn another one if needed.

At the moment I'm looking at XNA but would like to hear more opinions from the community in case there is something better suited for this kind of game. Also, XNA is still not available for VS2012, maybe Microsoft want to push C++ only ?

Thank you for your help!

Sponsor:

#2 Mekuri   Members   -  Reputation: 299

Like
0Likes
Like

Posted 25 October 2012 - 02:16 PM

I am currently making a game in the style of Terraria. I honestly don't know if Terraria is using chunks, but I have my doubts. A few weeks ago I came to the step where I wanted to save/load my world. Before I did that I made a world equal to the size of the large world in terraria, and loaded it all into memory. I wanted to see how much memory I spent compared to Terraria. As it turns out there wasn't much of a difference. I can't remember the numbers atm. but I started up Terraria and made a map of each size, and then loaded them while watching how much memory terraria took. The game took considerably more memory when I loaded a large map, compared to a small.

I just tested. Starting Terraria it uses about 450MB RAM. After loading a large map it uses about 860MB of RAM. Where a small map totals at about 500MB of ram. In comparison my game currently takes about 895MB of RAM with the large size map.
I have a larger size map, roughly 20% bigger than the Large terraria map, and my game runs smoothly (on a high-mid end pc).

So unless you're planning on making maps much bigger than terraria, the only other option I see is creating multiple worlds, and have somekind of "zoning" when changing world.

As for the language, I use XNA, and I am very happy about it. I started my project in Unity, but I ran into performance issues very early on.

So in short- based on my experiences I'd say:
- Go with XNA.
- Just keep your level in memory, unless it's going to be very large.
- Remember to keep variables in your tiles (if any) as small as possible. With so many tiles, it adds up extremely quickly. (My game used to take up about twice as much RAM).

Good luck Posted Image

Edited by Mekuri, 25 October 2012 - 02:17 PM.

Check out the game I am making here - http://www.youtube.com/user/NasarethMekuri


#3 astronaute   Members   -  Reputation: 105

Like
0Likes
Like

Posted 25 October 2012 - 02:49 PM

Thank you for the advice, I just saw few videos on Phantobra, you've done good work in it, it looks nice and not laggy :)

If the world size is not a problem for large maps like yours, then I'll try to do it like that. I'll probably make a prototype in both Actionscript 3 with Starling (GPU rendering) and XNA and then stick with the one that gives better results.

What you think about XNA not being compatible with Visual Studio 2012, do you think Microsoft is abandoning C# ?

#4 Mekuri   Members   -  Reputation: 299

Like
1Likes
Like

Posted 25 October 2012 - 04:35 PM

Thanks. Phantobra is the project I've learned most of what I know now. It's like a learning by doing project, which has grown to be much more than I initially thougth possible Posted Image

Is Microsoft abandoning C#?
In short - I don't think so. I think XNA will continue. I've read around on the internet and although there's a lot of people who believes it won't, I found an article with a bit more optimistic view, and he does a good job explaining why.. This article is from 2011 though, but check it out:
http://andrewrussell...a-in-windows-8/

Good luck with your project - I'm curious to know what your choice will be, so drop me a line, once you do Posted Image

Edited by Mekuri, 25 October 2012 - 04:35 PM.

Check out the game I am making here - http://www.youtube.com/user/NasarethMekuri


#5 Debunez   Members   -  Reputation: 160

Like
0Likes
Like

Posted 26 October 2012 - 01:02 PM

just go with DirectX 9. Once you have the hang of rendering sprites you can create pretty nice applications. Plus DirectX 9 isn't going anywhere anytime soon..




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