Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm googling around for some weeks but I've some difficulties to figure out where to begin my project and which part of the available Geo stacks are mandatory for my needs.

I have a strong Java background, some interest for Python and totally open to learn some new technologies.

As an hobby and because it is close related to my job, I plan to develop a web MMO strategic wargame heavily based on an interactive maps (basically to display the tactical situation and give orders to units).

Here is what I was thinking about :

  • Geoserver to serve maps and layers.
  • PostGIS to store geodatas.
  • GeoExt to display in a browser
  • Apache Click as the Java application server (combat resolution, unit management)

I managed to deploy a GeoServer (war in tomcat, easier is difficult) I managed to install PostGreSQL I run some tutorials about GeoExt. I need to experience Javascript a little bit. I played with Apache Click to serve pages and forms.

Here is the flow I was thinking of :

  • GeoServer serves the map backgrounds and layers constructed from PostGIS data for static objects (Cities, Victory Points, Territories, ...)
  • Apache Click generates HTML+GeoExt pages in the client browser.
  • Apache Click sends CRUD commands to PostGIS in response of user's action.
  • [something] updates regularly PostGIS (movements, combat resolution, unit characteristics management...)
  • Apache Click generates dynamically KML files to live update the browser (KML NetworkLink ?) for units display with icons, zones (range, detection...)...

And now, the missing brick in my little wall :

  • How can I implement a "sea/land" layer. For example, to invalidate a ship movement passing on land ? GeoServer layer ? Zones defined in PostGIS ?
  • Is the following flow reactive enough to update the map after a user action : HTML/GeoExt event -> Apache Click process -> PostGIS update -> GeoServer layer update -> HTML/GeoExt display

The main point is : where are the data if I want to use it for calculation and update ? GeoServer static layer or PostGIS tables ?

share|improve this question
2  
Welcome to GIS SE! Interesting project you have there. Btw, please limit your thread to one question. You can ask the second question on another thread. That way, it would be easier to answer your question and vote on the answers. Otherwise you risk answers that are right and wrong at the same time. –  R.K. Nov 15 '12 at 9:58
    
As for your second question, I think they've been answered already gis.stackexchange.com/questions/30119/… gis.stackexchange.com/questions/30491/… gis.stackexchange.com/questions/22700/… –  R.K. Nov 15 '12 at 10:02
1  
OpenLayers might be another JavaScript library to consider as part of the workflow. –  djq Dec 15 '12 at 18:30
    
Update : I went for Ninja Framework (instead of Apache Click), Leaflet (instead of GeoExt), GeoJSON (instead of KML. The only missing brick is the raw data provider. I can get routes from public API like Mapquest. But I still miss a layer provider to deal with terrain types, cities, ... –  Zofren Sep 23 at 12:55

2 Answers 2

To answer the How can I implement a "sea/land" layer question.

You can get coastline and sea layer from the recently released Nature Earth v2.

It might be too accurate for your needs but with some generalisation you will be able to load this into postgis and define it as sea or land. Then your ship movement can be contained (http://www.postgis.org/docs/ST_Contains.html) an vice-versa with tank movement. Air would be a different path and more complex as you would need to know the current location and work out a nearest land airfield or aircraft carrier for re-fueling (unless air-to-air re-fuelling is allowed..)

Good luck with developing the game.

http://www.naturalearthdata.com/blog/miscellaneous/natural-earth-v2-0-0-release-notes/

Download area http://www.naturalearthdata.com/downloads/

share|improve this answer
    
Thank you. I'll take a look for this. So you confirm that the GeoServer map layers are not "computable" and I need to enter data to PostGIS ? –  Zofren Nov 15 '12 at 22:32
    
Postgis is the spatial side to postgres (controls geometry) –  Mapperz Nov 16 '12 at 14:55

You would likely update the post gis through proceedure calls from your server. For one thing all the geography stuff is not necessary and introduces a lot of compllexity and it would be very laggy and processor intensive for even one user. You could have a land and sea polygon within a layer and add say a +1 column in the table for sea rows and a -1 column for land. if the lat lon returned from a location event was a plus or minus it would trigger a rule that would invalidate the move for sea or land unit. You could use a digital elevation model as well with z level as a plus or minus. Games commonly have terrains but that does not mean they are built using GIS! I would study how a popular game engine handles terrains and how developers create those terrains, choose your favorite open source game. In my case it is BZFlag ; )

share|improve this answer
    
I wanted a little more than just sea/land layer. I would like to use heights for visibility and range, rivers and bridges, road types etc etc ... Land/Sea layer is (beautifully) used in AtWar for example, but with only straight line moves. Not enough for the concepts I try to implement. –  Zofren Feb 5 '13 at 9:18
    
Bzflag impliments water layers that cannot be passed, as it uses opengl in the engine it has vr, heights, 3d modeling. Just not geographic though, although I have converted gis for game terrain maps –  lewis Feb 5 '13 at 14:01
1  
Here is a link that supports my view and may be helpfull. vterrain.org/Games –  lewis Feb 6 '13 at 19:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.