Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Smoothening tile edges

  1. #11
    If you are designing your game to use hexagon tiles, then it might not be bad to check how Widelands (Settlers 2 clone) map is gnerated. While Widelands use triangles (vertex approach) for map representation you can always create hexagon tiles by combining 6 triangles.

    On link below you can see a bit more information about how it is done, including the way for calculating regions. I hoe it would come in handy to you:
    http://widelands.svn.sourceforge.net...ry/index.xhtml

  2. #12
    I could let you test this version (at least while i keep it online): https://docs.google.com/file/d/0B7FI...it?usp=sharing
    Actually i'd hope it to be tested just to verify there's no major bugs in nxPascal. The controls don't allow zooming, just drag-moving with mouse. F7 toggles for windowed fullscreen mode.

    Full earth screenshot was special case with no limiter. Smaller game view is rendering 41x41 area, which is propably much bigger than needed at the moment anyway. I should be fine without splitting optimizations. I get max 60+ fps with it, at 0-1% cpu use. I need to look closer to zooming levels when i get to playable stuff. Also 1 reason the FPS went slower on full planet view, was especially after i finalized the texture blending. It is calculating texture opacity for each vertex per frame, by adding and normalizing texture opacities of self+3 neighbouring tiles.

    And yes, i scrapped the hexagon idea and used squares and triangles with this. Because with triangles there are actually 8 different "sides" in use, which is smoother than hexagons 6. It calculates the corner cutting in planet generation phase at least, not realtime, and puts the angle in 1 shortint variable. Also there is no static vertex-array, but the triangles are queued same way as my renderer class does. There's hard cap of 1000 vertices and 1000 vertex indices for glDrawElements(). That is another thing new, so i don't have to do the heavy texture-opacity calculation so many times on CPU. So pretty much everything is reconstructed per frame.

    If someone was interested in joining the game project, you can send me a PM I'm working on it with 1 other person at the moment, with growing documentation and stuff in google docs. I don't want to reveal the game more in public yet, and i don't have any opinion yet on wether it will be free/opensource or anything else.

  3. #13
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    I'd love to work with people on projects but in terms of games there's only one game I have my heart set on and I code my engine with it in mind. It requires the rendering of at least one planet (and possibly a moon) from space, all the way down to walking on the surface. It involves time travel, a deep mystery, a planet wide search, a lovable AI companion and a shocking twist. I have my story and I know how it'll play just depends on how much of my ideas I can get into it on my own
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •