Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    45
  • comments
    115
  • views
    54900

First development update

Sign in to follow this  
Kylotan

276 views

This would be a good point to state that I don't believe in big up-front design. No matter how much time you spend planning, you always end up redesigning and changing things anyway. Therefore I only do a little design on paper before hacking together a prototype. I think of it in similar terms to the optimisation debate, in that you can spend so long worrying about getting it right first time that you're spending too much time on micromanagement that would be better spent by diving in and seeing if the naive solution is actually more than adequate.

Therefore I follow this procedure:
1) Pick a feature or use case to implement.
2) Make it work.
3) Clean up the code.
4) Tweak for efficiency if necessary.
5) Rinse and repeat.

Today's 'feature' was a tiled map in OpenGL, just to get the ball rolling. After a few hours of playing around, I had it up and running. This basically just loads in some OpenGL textures, calls glOrtho, then draws some random tiles on the screen while you click to re-centre the map.

I had a preliminary version running in about 20 minutes but that drew tiles to the screen by calculating screen positions from the world and camera positions manually. I wanted to change this so that I just sent tile locations to OpenGL and it translated them for me, and that was harder than it looked; not in terms of complexity, but in terms of the number of different ways I could approach it, almost all of which were wrong. :)

Code line of the day:
glTranslatef(static_cast(-cameraX), static_cast(-cameraY), 0.0f);

And they say Java is verbose.
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
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!