Sign in to follow this  
  • entries
    4
  • comments
    4
  • views
    3670

Isometric rendering

Sign in to follow this  

1062 views

After having spent a month or so on my UDP server, I decided it was time to consider it good enough and move over to the client development. First item of business over there would be the creation of the renderer using an Isometric perspective. I was able to get one setup using some sample tiles I found online and a tutorial on Isometric rendering with XNA.

WIucT7R.png

The assets used in the screenshot are just sample assets. I think this tile size is a good fit for my game; I just need to create some assets that are more appropriate for what I'm developing.

I was originally planning on developing the game using Cocos2d-x, writing it all in C++. However, in order to prototype a quick client that could interact with my server I decided to build something simple using MonoGame and C#. After the exercise of creating the Isometric perspective and the math involved. I realized just how much I had to learn in regards to game development. While I've programmed now for nearly 20 years, none of it has really been game development. What I didn't want to do was learn both game development and C++ at the same time. Doing that felt like a huge learning curve that would potentially end up with me giving up in frustration and moving back to my non-game development projects. If I stuck with C# as my language for the game, then that would really help me focus on just learning game development, independent of the language. So MonoGame it is for this project. I would really like to build a game in C++, so perhaps I can take my experience with iMini and learn C++ on my next game.

While writing this code in MonoGame, I've learned a few things. The first thing is that it is extremely easy to just pile all your logic updates and rendering updates into the XNA Update() and Draw() methods within the Game subclass. My Draw method is a hideous monster of crap. The good news is that i know what needs to get refactored out of it and how, I just haven't done it yet.

The second thing I've learned is that there's a lot of math involved. A lot. I know 3d games have a ton of math; I guess I figured that a 2d game would just have really basic math. I didn't realize until I started building the Isometric perspective just how much math was involved. It is still basic math, but just a lot more of it than expected.

The third thing I didn't realize was that at 60fps, you only have 16ms to render the frame. At 30fps you have a bit more time (33ms) per frame but not much. So I'll have to be careful as I write my code. I had figured that a 2d game wouldn't need to worry about performance at all. I thought I'd just write my code in the easiest way possible and not worry about perf. If I only have 16ms per frame to render and update logic, there's a lot of optimizations I can see needing to be done over time. If this game wasn't a multiplayer game, where I'd have to update all the players locally, then I wouldn't be to concerned. The networking pieces will require some careful design when I get to it on the client.

EOF

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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