Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Jun 2012
Offline Last Active Nov 22 2014 10:26 AM

#5172865 Ideas to make racing through a futuristic city interesting?

Posted by on 11 August 2014 - 12:46 PM



I've been working on a game for some time. In short, it is a "sci-fi airplane racing game", set in the far-future, but I'm trying to make the game at least slightly realistic.


It's a huge, oversized project, that I'm completely crazy to start on my own. My current goal is to see if I can at least create a very rough version of it on my own, and maybe team up if that turns out good. It's more a hobby than anything else.


Many things are already in place, but I'm short on ideas for track design, and I'm asking myself: "What are interesting things to race through that actually make sense from a story point of view". It is set in a rather large coastal city that hosts a racing event (anually or something?).


How I see the track before me:

  • Players start out in some kind of stadium that is open on two ends (not shure how that's called) that is located on a cliff, between to higher areas.
  • They then turn and follow the coastline, the "racing area" is limited by floating "beacons".
  • They follow this coastline towards the estuary of a large river that flows through the city,.
  • The players then follow the river into the city, with spectators lining the river banks.


Aaand I'm out of ideas. What would be interesting features of this city that racers can fly through that would make sense? I was thinking about making the river go underground or something, so they fly through a tunnel, but then I'm not shure how to make them exit again.


I'm posting this here in the hope that you might have some cool ideas for this track or maybe the game in general. I'll post some screenshots later (don't expect too much, it's mostly empty terrain).


Here's the starting area: Schermafbeelding%202014-08-11%20om%2020.


And the famous (empty) coastline. Maybe I'll add some buildings at the top of the cliffs, and maybe some beaches: coastline.jpg


Another shot of the coastline, a small peninsula that you can fly through. This thing needs a bridge.


#5004583 Does the projection of a point onto a plane belong to a triangle in that plan...

Posted by on 27 November 2012 - 11:45 AM

I took your second solution, it works excellently!

Here's the resulting code:
[source lang="cpp"]Ogre::Vector3 vectorOA = wallStrip[itr-2]; Ogre::Vector3 vectorOB = wallStrip[itr-1]; Ogre::Vector3 vectorOC = wallStrip[itr]; Ogre::Vector3 vectorAB(vectorOB - vectorOA); Ogre::Vector3 vectorBC(vectorOC - vectorOB); Ogre::Vector3 vectorCA(vectorOA - vectorOC); Ogre::Vector3 faceNormal = vectorAB.crossProduct(vectorCA) * (itr%2==0 ? 1.0 : -1.0); // It's a triangle strip if (vectorOA.dotProduct(faceNormal) > 0){ Ogre::Vector3 ABNormal = vectorAB.crossProduct(faceNormal); if (vectorOA.dotProduct(ABNormal) > 0) continue; Ogre::Vector3 BCNormal = vectorBC.crossProduct(faceNormal); if (vectorOB.dotProduct(BCNormal) > 0) continue; Ogre::Vector3 CANormal = vectorCA.crossProduct(faceNormal); if (vectorOA.dotProduct(CANormal) > 0) continue; // The projection falls within the triangle }[/source]

It also checks wether the point is on a specific side of the triangle, it's also inside a loop iterating through a vector of these triangles.
The point that I'm testing is actually the origin in this case, that's why you don't actually see it in the code.

It actually even worked the first time! (That was very unlikely, I'm a champion at typos Posted Image)