SFML community forums

General => SFML projects => Topic started by: AniCator on February 04, 2013, 09:29:37 pm

Title: GravNav - simple glitchy planet simulation prototype
Post 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:

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.
Title: Re: GravNav - simple glitchy planet simulation prototype
Post by: Nexus on February 04, 2013, 10:08:34 pm
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 ;)
Title: Re: GravNav - simple glitchy planet simulation prototype
Post by: Sui on February 05, 2013, 09:27:27 am
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.