Jump to content

  • Log In with Google      Sign In   
  • Create Account


mcvitiesyum

Member Since 04 Feb 2013
Offline Last Active Feb 28 2013 12:20 PM
-----

Topics I've Started

Programming 2d games

27 February 2013 - 03:50 AM

Hello.

I just started out programming games and I've almost finished a simple space shooter game in c++ with the help

of the SFML 2.0 library. What I would like to know is if there is another  practical way of creating games. 

I'm asking this because before creating the actual game I had to set up the game engine and that took me quite some time.

What tools could I use to speed up programming 2d-side scrolling games in c++? 


SFML Missile Speed

23 February 2013 - 06:45 PM

Hello gamedev.

I'm currently programming a simple 2d space shooter  in sfml 2.0 .

Does anyone have any idea how will I make the missiles move at the same speed at any direction? (The problem is partially solved for vertical directions only).

Here is my code:

void World::updateMissiles(float refreshRate){
	std::list<Missile*>::iterator it = missiles.begin();
	while(it != missiles.end()){
		Missile* missile = *it;
		sf::Sprite& sprite = missile->getSprite();
		if(collide(missile)){
			it=missiles.erase(it);
			delete missile;
		}
		else{
			if(missile->getType() == Missile::Player){
                                // Missile angle of player is only vertical
				sprite.move(0,-missile->getVelY()*refreshRate); 
			}
			else{
                                // This part needs to change from vertical to angles of 45,90,135 degrees
			        //sprite.move(0,missile->getVelY()*refreshRate); 
			}
			it++;
		}
	}
}

Thruster graphics

06 February 2013 - 05:09 PM

Hello gamedev community!

Does anyone know what tools do I need to learn in order to make the thruster graphics of the spaceship in the first picture

of http://www.rockpapershotgun.com/2012/11/06/take-a-gamble-on-space-shmup-gimbal/

Do I need to learn openGL or can I achieve the same effect with just 2d animation?

Thanks!


PARTNERS