Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - whitebeard86

Pages: [1]
1
General / Re: Multiple Dependencies
« on: July 12, 2014, 02:28:22 pm »
Thanks Laurent!

The problem was with the public headers, I just included a private header for the 3rd party libraries and it worked

2
General / Multiple Dependencies
« on: July 12, 2014, 12:31:16 pm »
Hello everyone,

I have 2 projects (a game project and a library project). In the library project I have a reference to an external library (static) which I don't want to reference in the game project (I want to make it transparent for the game project). The problem is that when I include a header file (in the game project) of the library project which includes a reference to the 3rd party static library, I get compiling errors because I'm not linking that 3rd party library in the game project.



Is there a way to get over this? Can I include the 3rd party library in my library project seamlessly? I don't have much experience in c++, any help is appreciated.

Btw, I'm using Visual Studio 2013

3
SFML projects / Re: Asteroids (My first experience with SFML)
« on: July 04, 2014, 09:29:15 am »
Seems good.  :)

I just don't like the movement with the WASD keys because they are not relative to the ship direction (I'm not sure if that's how it works in the original version but I don't like it).

4
General / Re: Waypoint movement.
« on: July 01, 2014, 01:05:14 pm »
Example:

* atan2, cos and sin are from math.h

// rotate to waypoint:
myObj.rotation = atan2(waypoint.y - myObj.y, waypoint.x - myObj.x);
// or just calculate this value into a variable if you don't want to rotate your object

// move forward (into the waypoint, based on the current object rotation)
myObj.position.x = cos(myObj.rotation) * SPEED * deltaTime;
myObj.position.y = sin(myObj.rotation) * SPEED * deltaTime;

Note that SFML uses degrees and the cos/sin/atan2 functions use radians. Make the conversion first.

If you want to stop/change waypoint using the distance between your object and the waypoint here is a simple distance function:

float distance(sf::Vector2f p1, sf::Vector2f p2) {
        float xb = p2.x - p1.x;
        float yb = p2.y - p1.y;
        return sqrt((xb * xb) + (yb * yb));
}

I'm not sure if SFML has built in functions for this (i'm new here), but this is how I do it in most game development environments.

5
SFML projects / Re: Anyone want to build a 2D game with me?
« on: July 01, 2014, 10:28:32 am »
Hello, I'm interested too.

I've started recently with SFML (after a large experience on game development on other environments) and this seems like a good way to keep up working.

As my experience goes, you can see my work gallery here:
http://john.gibbo2d.com/index.php/main/index/gallery ( see the games section )

I'm also the creator of the Gibbo2D Game Engine:
http://gibbo2d.com/

I will add you on skype

Pages: [1]
anything