Updates on virtual world
I have rewritten the whole tile system to use a dynamic array.
For those of you who are curious, here is something like what I did, only a lot simpler.
//this keeps track of the total number of tiles that exist int tile_num; class tile { //data } tile *tiles[];Now, let's say you want to draw all the tiles
//the number of tiles in a row and the next is the number of tiles in a column. These are set when the map is loaded. int tile_num_r; int tile_num_c; void draw_tiles(int WX, int WY) { int i; //loops through all the tiles for (int r = 0; r < tile_num_r; ++r) { for (int c = 0; c < tile_num_c; ++c) { //draws the tile tiles[i]->draw(); } } }
Anyway, I am just about done rewriting the new update code for the in-game objects.
It now uses the new tile system.
Which, by the way, is way easier to program with.
I also used a slightly modified version of this as a poorly designed method of dynamically creating objects.
Also, vote in the poll on whether or not you want me to start writing my own programming tutorials on subjects such as this.
Subjects I find no good help on on the internet.
0 Comments
Recommended Comments
There are no comments to display.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now