Jump to content

March 2017 »

S M T W T F S
   1234
567891011
12131415161718
1920212223 24 25
262728293031 

Recent Entries

Recent Comments

- - - - -

Online map editor - review/planning



2: Adsense

Online map editor - review/planning I'm getting ready to combine and improve some HTML5 Canvas stuff I prototyped two years ago - Ocean Melee / Great Guns and the 2D character animation modeler for the future "Cult RPG" (crude demo here). My ultimate goal is to create complete online editors for both games, and other games... a separate editor app for each game, and some shared core libraries.

For starters, I want an online map editor for OMGG so I can start recreating historic naval battles. The old map+ship graphics are Inkscape SVG... it kinda works, and I've written SVG load/render code in both JS and C++, but I never felt right about any of it. I vaguely remember a major WTF about certain "modern" browsers failing to parse SVG (XML) correctly. Anyway, I only need to display scanned map images, scale/rotate them into position (rubber-sheet orthocorrection not necessary), and trace over them with polygons and splines. Ships will just be splines, with hidden collision polygons. No need to import the old graphics - it was just rapid prototype stuff.

The character modeler lets you draw spline shapes, choose fill/outline colors, and edit some metadata. There's also a bunch of skeleton animation stuff tied into it. It saves/loads JSON files via a tiny PHP backend.

I've also ported the cultRPG spline renderer (used in modeler & demo) to C++, which forced me to use "primitive" data structures... namely lots of interleaved [x0,y0, x1,y1, ...] point arrays like OpenGL requires, which I'll need in JS if I port any of this stuff to WebGL. It goes against a lot of compsci theory and best practices, but this is definitely a change for the better.

Server stack constraints: assume only PHP 5.4+ and MySQL. NodeJS should also be available for some build scripts.

Well, that's what I've got to work with, so here's the plan:
- Rewrite the modeler.
- Animation stuff as a separate library. Don't need it cluttering up the OMGG editor. Need it for cultRPG, so do implement & test it - don't kick it down the road.
- Shape editing library - splines (existing), polygons, images/textures.
- Save to MySQL instead of JSON files. Versioned structures TBD. For now, KISS.
- Incorporate OMGG build scripts into the PHP backend. One-button test build & launch game in new tab.
- Incorporate cultRPG model format exporter (because C++ + JSON = headache).
- PHP+MySQL user account system.
- Access control, just enough so I can let a few artists into the system. Posted Image
- Deploy to a public server and get crackin'...

P.S. - those dashed red and green lines you can see if you click the map thumbnail - I don't even want those anymore. Just the shoreline. I had an idea of tracing 5-foot and 20-foot depth contours and LERPing between them to see if you've run aground. That way a Navy frigate could wreck on a reef while a shallow-draft pirate schooner escapes, for example. But it just makes the gameplay confusing, so forget it! :D

Note: GameDev.net moderates comments.