Jump to content

  • Log In with Google      Sign In   
  • Create Account

Chris Burrows

Member Since 17 Sep 2012
Offline Last Active Jul 06 2016 03:09 AM

#5293524 OpenGL Paid Work

Posted by on 26 May 2016 - 02:06 AM

I'm after somebody to re-write two C++ OpenGL examples in C# OpenTK. They're pretty basic and I'm sure it'd take under an hour for somebody who knew how. $50 (AUD) up for grabs. They are deferred rendering and deferred rendering shadow mapping from Marco Alamia's website. The problem is my knowledge of C++ is limited, I've been programming for years, but almost exclusively in C#. Basically, I look at his code and can't discern the program flow. To speed up the process, I've thrown together a basic OpenTK project to work atop of, unless you'd rather go from scratch that is. The code is pretty clean, and should be easy to navigate. I'll email it upon request.

 

screen.png




#4981971 Representing an iso map in a 2d array?

Posted by on 20 September 2012 - 03:36 AM

no need for negative array indices; not sure where you got that idea


As I said originally, I require the entire visible map to be covered with tiles. Using a traditional square grid on a tilted on a 30 degree angle means that there are going to be tiles with negative array indices, shown in black.

Posted Image

Unless however, the (0,0) index is far off to the left somewhere, seemingly the preferred method. In the image below, the green rectangle depicts the desired visible map, it also shows the array co-ordinates within the map using the staggered approach. The giant blue rhombus, demonstrates the size of a tilted array required to cover the same size map with tiles.

Posted Image

As you can see, using the staggered approach cuts the size of the array in half, but as FLeBlanc mentioned, this is unlikely to have any impact on performance. Personally, I prefer the staggered approach for it's elegance. Positioning the tiles on screen is simple:

X co-ordinate: (X index * Tile width) + ((Y index mod 2) * ( Tile width / 2))
Y co-ordinate: Y index * (Tile height / 2)

I've already coded the pathfinding and movement with a staggered grid (here is a demo if anybody is interested), but I haven't come much further than that. I think I'll head the advice and re-write with the (0,0) offset method. Thanks for the help.

But your world representation does not have to be an array.


What other choices do I have? Hash table? My pathfinding code is pretty dependant on arrays, but I'm always open to suggestions...


PARTNERS