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.


Topics - programmer47

Pages: [1]
1
General / Pre-compiled Mac libraries?
« on: April 14, 2012, 04:32:30 pm »
The Mac download on the download page only has framework files for use with Xcode and templates for an old version.  I have the new Xcode so I can't use the templates, and I can't figure out how to set it up manually.  What I want to do is use a different IDE like Eclipse or Code::Blocks but I think they need the proper library files (dylib?) instead of the frameworks.  I tried building the libraries from the latest source code of SFML 2 but I don't have a lot of the header files it needs, which is probably because of the new Xcode version not installing them.  Does anyone have, or can compile, the native Mac libraries that I can use in different IDEs?

2
General / Sprite moving speed same on all computers
« on: November 13, 2011, 05:22:47 pm »
I have a player that is moved when the left or right arrows is pressed, and on my computer making him move by 0.5 (pixels?) every update looks OK.  But on other, faster computers there will be faster updates so the player will move faster, and slower on slower computers.  I've tried using a clock and moving the player using this alogarithm:
Code: [Select]
sprite.Move(speed / (1 / clock.GetElapsedTime()));
The clock will measure it in how many seconds it takes for an update to come (let's call it SPF for seconds per frame) so I've converted it to FPS (frames per second) by dividing 1 by it.  I've used this number to divide the speed by so the speed should, by my calculations, be how many pixels it moves every second.  But even having the speed at a high number like 200, the player moves very slowly.  I'm not sure I'm managing the fps very well.  Does anyone know how to make sure the sprite is moving the same speed on all computers?[/code]

3
Window / Stack around the variable 'app' was corrupted
« on: September 01, 2010, 12:27:16 pm »
I'm trying to make a program, with Box2D for the physics, and SFML for the graphics.  However, I get a runtime error after I initialize sf::Window.  Here is my source code: (I'm not including the Box2D part)
Code: [Select]

#include "SFML/System.hpp"
#include "SFML/Window.hpp"
#include "SFML/Graphics.hpp"
#include <cstdio>
int main()
{
sf::Window app(sf::VideoMode(800, 600, 32), "Box2D SFML");
                for (int32 i = 0; i < 60; ++i)
{
app.Display();
}
return 0;
}

I get this runtime error:
Code: [Select]

Run-Time Check Failure #2 - Stack around the variable 'app' was corrupted.

What's happened?  I've got this working before...[/code]

4
Graphics / sf::Sprite error
« on: August 29, 2010, 07:05:35 pm »
programmer47 (12)     Aug 29, 2010 at 4:35pm
Hi all,

I'm trying to display an image on the screen with SFML (using Dev-C++). An error occurs when I try to declare a sprite with sf::Sprite. This is my code:
Code: [Select]

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    sf::Image image;
    if (!image.LoadFromFile("image.tga"))
    {
       std::cout << "Error loading image!" << std::endl;
    }
    sf::Sprite sprite;
    sprite.SetImage(image);
    return 0;
}

This is the error:
Code: [Select]

variable 'vtable for sf::Sprite' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.

 


I have followed the tutorials on SFML-Dev.org, can anyone help prevent this error?
Code: [Select]

Pages: [1]