Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualMr. Big

Posted 26 April 2013 - 12:36 AM

The plan was to draw a 256x256 map, and have a "portal" somewhere on the map that leads to another map. So loading all the maps when the game loads is out of the question.

 

My plan was to have a text file for each map with a whole bunch of vertices, followed by objects on the map with a position to draw it at.

 

map1.map, "Home Town";

0,1,0,3,1,0,0,4,3,5,6,2,0,2,3,8,4,2,0,28,169,474,935,742,42,36;

"House.obj", 56,0,56;
"Car.obj", 56,0,80;


 

 

I have absolutely no idea how XNA loads objects, but this was my thought on how to do it.

 

Edit: Oh, and didn't need collision detection as I was just going to define each tile as walkable or not-walkable.

 

Does this sound like a reasonable, efficient way to draw a map?

 

Edit2: Actually, since the maps will all be 256x256, there's really no point in storing the x and z vertices in a text file since they will all be quads (tiles). The only thing that needs to be stored is the height of each group of 3 vertices. Which I suppose could be done with a height map image?


#2Mr. Big

Posted 25 April 2013 - 11:58 PM

The plan was to draw a 256x256 map, and have a "portal" somewhere on the map that leads to another map. So loading all the maps when the game loads is out of the question.

 

My plan was to have a text file for each map with a whole bunch of vertices, followed by objects on the map with a position to draw it at.

 

map1.map, "Home Town";

0,1,0,3,1,0,0,4,3,5,6,2,0,2,3,8,4,2,0,28,169,474,935,742,42,36;

"House.obj", 56,0,56;
"Car.obj", 56,0,80;


 

 

I have absolutely no idea how XNA loads objects, but this was my thought on how to do it.

 

Edit: Oh, and didn't need collision detection as I was just going to define each tile as walkable or not-walkable.

 

Does this sound like a reasonable, efficient way to draw a map?


#1Mr. Big

Posted 25 April 2013 - 11:50 PM

The plan was to draw a 256x256 map, and have a "portal" somewhere on the map that leads to another map. So loading all the maps when the game loads is out of the question.

 

My plan was to have a text file for each map with a whole bunch of vertices, followed by objects on the map with a position to draw it at.

 

map1.map, "Home Town";

0,1,0,3,1,0,0,4,3,5,6,2,0,2,3,8,4,2,0,28,169,474,935,742,42,36;

"House.obj", 56,0,56;
"Car.obj", 56,0,80;


 

 

I have absolutely no idea how XNA loads objects, but this was my thought on how to do it.


PARTNERS