SFML community forums
General => SFML projects => Topic started by: AniCator on February 04, 2013, 09:29:37 pm
-
Hey guys,
My first post here on the forums after having lurked for a bit.
I started messing with SFML a few days ago and I have to say that I'm liking it so far.
After familiarizing myself with SFML for a bit I setup this little project.
Right now it's pretty glitchy and when the player crashes into a planet it actually crashes the game right now. :3
It runs in windowed mode @ 720p
(http://anicator.com/downloads/GravNav.jpg)
Download | Public build (http://anicator.com/downloads/GravNav_Game.zip)
Issues I'm trying to work out:
- Make new planet adjust velocity based on distance from closest planet to get into an orbit
- Fix player crash (once I got going the code got rather messy so this pretty much equals a cleanup)
- Drawing the trajectories (past or maybe even future) of the planets
It would be great if you guys could give me some hints as to how I can make it so a trail is drawn behind the planets to show where they have been. To sort of visualize the trajectories.
-
There are multiple possibilities for a trail, what do you want it to look like?
If it's just a line, you can use sf::Vertex with sf::Lines. For a trace of the planet, you can use multiple sprites with different brightness or alpha value (the overlaps might be visible). For something very elaborated, you could use a particle system or even shaders, but it's probably not a good idea if you have just begun to use SFML.
Also, you should fix your crash first before thinking about such things ;)
-
Right now it's pretty glitchy and when the player crashes into a planet it actually crashes the game right now. :3
Perhaps this could be a feature. :-)
Kinda like permadeath, particularly if you can manage to cause a kernel fault and blue screen Windows. (Joking!)
Lines for future position and a faded sprite trail might look nice.