Sign in to follow this  
  • entries
    16
  • comments
    20
  • views
    4906

Working away.. phew!

Sign in to follow this  
Nahrix

176 views

Whether it's training in the art of thrust and parry in the ages where kingdoms warred each other, or studying the mathematical art of coding a game, one truth stands its ground: nobody said learning is easy.

I've spent the better end of yesterday perfecting the display of the map in what I now call 'CivSim'. Basically all it does is take values in an integer array, reference those values to a bitmap, and display it to the screen. Needless to say, that was the easy part.

What I wanted to do is be able to have a very large map where you can scroll using the arrow keys. And I wanted it done not per-tile, but per-pixel. Obviously, I needed to mipmap the edges of each tile on the edge of the screen that weren't displayed. That definitely proved to be more code and logic than originally anticipated, since I had to account for any humanly imaginable resolution (the window will be able to be any size by any size). It's done now, however, and life is good, so rejoice!

I will definitely post some screenshots as soon as I've completed the map editor. Since this is my first time coding anything other than example programs from a C++ book, I am proud to announce that I have, as well, properly implemented reading and writing to files so far, so I may store the maps. It feels great when such simple victories hold so much value.

Edit: Thank you, Rob, for your helpful comment. Your tutorial site looks quite intriguing.
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