jhester / DistributedGA

A distributed Genetic Algorithm simulation.
http://josiahhester.com
5 stars 0 forks source link

Map files #10

Closed ghost closed 13 years ago

ghost commented 13 years ago

Having 5-10 maps as text files would be best I think, it cuts down on network traffic. The map files should still be really easy to parse so the clients could read the map data to get the "local" information. Then the server only has to send local player positions to the clients (and a map number/position to use), same goes for observers.

ghost commented 13 years ago

A quick list of what each tile id/layer is would be nice

anander commented 13 years ago

So we would have maps of different sizes. Maybe I can generate them using our program then make that information into lists. So id would be floor or wall and layer is ?

jhester commented 13 years ago

So basically a map is a list of lists of numbers 0-9. Each number corressponds to a tile, the only tiles that are hard defined is 0 is grass and 1 is empty / unpassable / transparent. We need wall sprites for tiles etc still.

If we realy wanted to decorate more and make the maps nice we can use letters as well as numbers.

Each map has two layers, the first layer is just the background floor, it could be grasslands, stone, dessert, snow. The second layer is decoration, plants, logs, swords, and other random stuff. This is all walkable things because these objects are just rendered onto the map.

Im thinking about adding another layer called the 'object sprite' layer which will be where sprites can be positioned. A sprite is anything bigger than a regular tile (32x32). So this could be trees, buildings etc.

anander commented 13 years ago

Since we need wall sprites I can make them and send them over.

Also a third layer on the maps would be good since we can see what is on the ground and what the sprites interact with. And in our map files each layer would be a list im guessing

jhester commented 13 years ago

The basic format for a 3x3 map would be this: layer1 layer2 0001 1411 0001 1211 0001 1131 1111 1111

Note that you have to add 1's around the edges of the map.

ghost commented 13 years ago

so there is an extra row and col of tiles? That might be why we get random out of index errors when spawning players, maploader_class.isWithin() needs to be updated...

jhester commented 13 years ago

oh that make sense. yeah theres an extra row and col at the end.

ghost commented 13 years ago

Condor is not being nice, and I can never seem to get more than 20 jobs at a time, so this map size might end up being the final size. Should we go ahead and make a couple extra maps? Or just use 1 map?

jhester commented 13 years ago

I've been making maps actually. I was gonna try for five and make them all a little different. Heres what I was thinking: 1 - The basic map we already have 2 - A huge map, plains like, not a lot of obstacles 3 - A small dense map, not a lot of room to run around etc. 4 - A Rectangular map (the map size would be the same but there would be large uncrossable blocks on the top and bottom) Kinda like a level progression. 5 - A maze map

What do you guys think? More? Less? I really want to at least try out a maze map and a rectangular map to see how they will react.

ghost commented 13 years ago

I like the maze map, try and make a map with lots of obstacles too. Right now the players seem to just run at each other and form a giant clump. I was trying to prevent players from never attacking... I guess I tried too hard.

ghost commented 13 years ago

6 maps seems like a good number

jhester commented 13 years ago

so as I was looking through all my tilesets I realized that we could have certain tiles that cause damage when walked on. what do you guys think? Im going to look at how hard that would be to implement with the time we have...

ghost commented 13 years ago

it should really only involve a function in the playermanager that the gamemaster calls at the same time that it tells each player to attack. The playermanager just checks each players position...

ghost commented 13 years ago

Map files are working, I like the verity. I'm not sure whats more important, adding features to make it seem cooler, or gathering data (like where players die the most often on a map).

Apparently we will be grading each others presentations, so looking cool will be fairly important :D

jhester commented 13 years ago

I can work on making things sexy if either of you guys want to try and gather data. I think one of us needs to go ask him today or tomorrow about performance profiling as per his email he sent earlier today.