Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

876932 Posts in 32840 Topics- by 24280 Members - Latest Member: varagtp

May 18, 2013, 05:01:16 AM
TIGSource ForumsDeveloperFeedbackDevLogsDomination: Remnants of the Past
Pages: 1 [2]
Print
Author Topic: Domination: Remnants of the Past  (Read 1689 times)
batiali
Level 0
**


View Profile Email
« Reply #15 on: October 23, 2012, 05:25:39 AM »

It can't cause slowness by itself alone. But these kind of small problems really bothers me when it feels it's the wrong way of doing it. 60~ is probably the MAX city a game should have which is not much. Even if every city checks their distance with every other city in every frame, it would be fine - which is not the case. But this is just a small part of the game. There's a lot of other things going on.

So, you are saying that whenever a city expands into a new land, I should check which cities has vision of that land? That would be really accurate solution, but it means a lot of update since cities expand all the time.
Logged
gears
Level 0
***


View Profile WWW
« Reply #16 on: October 23, 2012, 02:55:33 PM »

I'm intrigued by the map. Are those voronoi cells? How is distance calculated? Any interesting techniques in your map generation or rendering? Any thoughts on smooth cell transitions versus abrupt boundaries? If that's too many questions, feel free to skip some Smiley
Logged

batiali
Level 0
**


View Profile Email
« Reply #17 on: October 23, 2012, 11:46:59 PM »

@gears I'm glad those are asked Smiley

Yeah, those are voronoi cells.
amitp's famous post for polygonal map generation really helped me during the implementation. I used simple square based grid & hexagons before I tried polygons and I'm very happy with voronoi.

Distance between cities are calculated simply between two polygons (centers of the cities). But I needed a fast way to calculate distance between nearby polygons when I was working on pathfinding(for scouting). So in data structure every polygon (Land) keeps a list of neighbor polygons & a float array calculated on start for its distance to those neighbors.

Quote
Any interesting techniques in your map generation or rendering?
Voronoi generation for 10k polygons is slow. It takes around 2 seconds on my computer. (It takes a LOT in ipad 3) But the thing is random generation is not about voronoi generation. Same voronoi diagram is perfectly ok to be used in all the game sessions. What makes the randomness is the noise you use to generate heightmap. So, since I don't need to generate voronoi on the fly, I can only generate it on the start of the game once. I did more and made a tool that creates the polygonal map and saves it to an xml file. Reading a lot of data from xml takes around 0.5 seconds, but that's better than 2 sec.

This is my first 3D project so I'm still learning about rendering stuff. I really want to get the good feel and I know I'm not there yet. Here's a WIP screenshot with a smooth transition & simple textures. Please let me know your ideas about if it looks better than abrupt boundaries and how can I improve it more. (One limitation of the engine is I can only use 3 different textures - in my case, I used beach, grass, snow textures)






* Fog of War
Logged
batiali
Level 0
**


View Profile Email
« Reply #18 on: October 24, 2012, 12:43:39 AM »

It would be really nice to get feedback on some of the themes as well.

Theme 2
Theme 7
Theme 11
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic