Hi there,
Since my last topic in this forum on openGL, my game project progressed quite far. It didn’t have any… well, game mechanics, as such, but you could place and destroy buildings, and character placed on the map could path find around the place fairly efficently. The problem is, as I didn’t really have any kind of plan when I started the project, the code is pretty hacked up. I decided to start again from scratch, this time with a much better design and a better idea of what I wanted the game to do. I also decided to make it 3d.
The game is a city builder game, so the “3d” aspect is going to be purely visual, the mechanics are going to be more or less the same. I might have a pop at doing interesting fractal generated terrain, but there is essentially only going to be one Z level for the purpose of game mechanics. I think I’ll be able to handle the graphical side of it with a bit of work, but there is one problem to which I have no solution: How to deal with mouse input.
More precisely, how to work out where the cursor is relative to the map. It was pretty easy with the isometric system I had before - I just added the mouse position to a couple of variables that represented the view area’s relation to the map. For a 3d map though, where the user is going to be able to rotate, zoom in and out (etc) the view, I don’t really have any idea how to get the mouse’s position, and thus I won’t be able to have the player manipulate stuff with the mouse.
Could anyone give a hint on this subject?