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 - viz_fuerte

Pages: [1]
1
Graphics / Problems with rotation and direction
« on: June 20, 2010, 06:59:59 pm »
The truth, I have always used matrices to make that kind of thing, so the models (referring to 3D environments), rotated and followed a local position and rotation.

It would have to do something to continue the rotation and position local, not global, but it would create a matrix and more, more work.

I lose much by using 2D environments (and that some say is easier).  :lol:

Thanks for the help.  :wink:

2
Graphics / Problems with rotation and direction
« on: June 18, 2010, 01:38:16 am »
Hi!
I have a problem that is safe of mathematics , and not of SFML.

I'm doing a game ships(sprite), and bullets do not go according to the rotation of the ship, go up.
If the ship has a rotation of 90 degrees and the bullets too, but do not follow the direction of the ship. The bullets rotate the same but if the ship is moving at x: 10, the bullets continue straight y: 20+
Code: [Select]

CBullet::CBullet(float x,float y,float r,E_BULLET_TYPE t)
{
//# Carga la images
img_bullet.LoadFromFile("media/sprites/bullet.png");
img_bullet.SetSmooth(false);

//# Crea el sprite
spr_bullet.SetImage(img_bullet);

//# Posiciona el sprite
spr_bullet.SetPosition(x,y);

//# Centro del sprite
spr_bullet.SetCenter(spr_bullet.GetSize().x/2.f,
spr_bullet.GetSize().y/2.f);

//# Gira el sprite
spr_bullet.SetRotation(rot);

//# Variables
type = t;
rot = r;
}

void CBullet::Update(bool mov)
{
if(mov)
spr_bullet.Move(-400.f * App.GetFrameTime());

App.Draw(spr_bullet);
}


In other libraries have not had problems doing this, but this is not how.
I've searched the forum but there is no convincing answers.

3
General discussions / SFML headers for FreeBASIC
« on: May 20, 2010, 07:25:04 pm »
I have finished translating CSFML headers to FreeBASIC.

Now, you can use without problems, good, when you close the program displays an error (not to be expected.)

Also, I am creating the documentation to use it correctly in FreeBASIC.

BYe  :wink:

4
General discussions / SFML headers for FreeBASIC
« on: April 19, 2010, 11:19:52 am »
Hi :D
The first, to congratulate the creator of this API very complete, very simple and powerful.

I am developing a wrapper to use this library in the compiler FreeBASIC (do not know if other compilers BASIC work)
For now is costing enough, to recompile the libraries for use with the compiler, but now run several examples :)

I created this wrapper largely unchanged in the original names of the commands to use source codes created in other languages.

Official website: http://www.elcreadordavid.hostei.com/index.php?p=1_21

PD: I know that long ago, another person was also creating something similar, but not finished.

Pages: [1]
anything