If it's used everywhere, make it global. Some people fight to the death to ensure there are no globals in the code... but sometimes, globals are necessary, and it keeps the code interface nice and tidy. (Don't use globals everywhere though, since they can be a pain to track when debugging)
Using inheritance isn't "bad" all of the time, only when it's abused, like any other tool.
At the moment, try focusing on implementing the game, and think less about the engine. You'll learn a lot about what you really need the engine to do from making a game.
The code above keeps spitting out error C2628: 'Projectile' followed by 'void' is illegal (did you forget a ';'?) for projectile.cpp Line 8 and error C2556: 'Projectile Projectile::setName(std::string)' : overloaded function differs only by return type from 'void Projectile::setName(std::string)' for projectile.cpp Line 8.
You've missed a colon ":" before setName().
Edit: Also, you've missed a semi-colon at the end of your class definition in Projectile.h (it happens to the best of us)
Also, also, seeing as you've made the member variables public in the class, you don't need getters/setters. Also, also, also, this is just a hunch, but should the UpdatePosition() really be taking time as an integer? I have no idea how your system works, but if time is in milliseconds, then m_speed would have to be incredible low...
I'm roughly familiar with epsilon comparison, but I was under the impression that it was a far smaller threshold than -1.5 (the value in question)? I'm also a bit confused as to how comparison relates to my problem when there are none taking place. If it was a smaller number (ie < 1), I'd understand...
The value -1.5308086E-15 actually represents something like -0.0000000000000153 - which is rather close to 0.
You can think of the "E-15" as a shift of the decimal point. Its a short hand notation for extremely large or small numbers.
The previous posters have linked some nice resources, especially rip-off's post.
Though I really enjoyed Metroid Prime (and Metroid Prime 2), I loved the atmosphere of the game - and the blend of platformer action with puzzles. The entire game, as an experience - has made it one of my most favourite games.
how do you read the position texture, read the velocity texture, and update the position in the same pass?
You could copy the position texture from the last frame into a current position texture which is sampled - whilst rendering to the original position texture - this would (sort of) remove flip flopping ( but not really ).
Render Position to texture A.
Copy texture A to texture B
Set texture A to as render target
Sample position from B
Though this doesn't minimize memory usage at all. Additionally, during step 2, the copy will need to have texture B set as a render target, while texture A is sampled - so the flip-flopping is still there.
I'm an atheist. ( It's not that scary, is it? I mean, have you played Amnesia? That's way scarier... )
Yet, I believe that "God" exists. The concept of God lives in the mind of the believers of "God", much like Father Christmas. There is no hard evidence of God, as we don't yet have the technology to prove the concept.
Interestingly, perhaps God exists in another sense; perhaps this world/universe is a prison or rehabilitation, or even a school. Imagine the possibility of there only being one concious life, "God", yet the universe is populated by uncountable lifeforms. Perhaps, in this situation, God is to live the full life of each lifeform in turn, which exists, will exist, and has existed, to better itself. Perhaps this is a simulation, inwhich all of this happens in the blink of an eye.
Or perhaps, it's just us, and despite being incredibly lucky, we managed to somehow survive the onslaught of chaos in the universe. Humans could be around for millions of years still, with technology beyond belief... yet everyone on this planet today will be dead in 150 years.