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

Pages: [1]
1
General / universe using sf::view
« on: May 15, 2012, 09:10:13 am »
Hello,

I have for example a universe with a size of 10000 x 10000 pixel. If my ship is at a pos of 10000, 10000 and  goes on, my ship should move to 0,0. Is it possible to use sf::View?

I think if I reset the view to 0,0 and my ship is in the center of the screen, I see only the objects at 0,0 not the rest of 10000,10000.

If someone understand my weired explanations and has an example how to implement, let me know.

Best regards
Andreas

2
Graphics / GetFullscreenModes error
« on: July 09, 2011, 01:28:40 pm »
Hello,

if I do this:

Code: [Select]
std::vector<sf::VideoMode> vmvector;
vmvector = sf::VideoMode::GetFullscreenModes();


I became an error: "Speicherzugriffsfehler", it's german and I think in english it's "segmentionfault".

Can anyone tell me, whats wrong?

3
General / Problem at running programms!
« on: October 16, 2010, 02:08:41 am »
Hello,

i have sfml 1.6 installed on a computer using windows vista. I try to run the samples. Some samples are working: windows, ftp, sound, sound-capture. Some are not working: opengl, pong, w32

I have tried mingw and visualc 2005 version. It`s the same problem.

What`s wrong?

Andreas

4
Audio / Play the same sound twice
« on: September 01, 2009, 08:35:10 am »
I play a sound, while the sound plays, I will start it again to play. The playing sound should play on. Is this possible with one sound.?

5
General discussions / Resources sprites and tiles
« on: March 26, 2009, 12:38:33 pm »
Can somebody tell me good sources for free graphics?

Specialy I am searching tiles and sprites (tanks, bombers, infantry, etc...)

(I have searched with google, but the result wasn't good)

Andreas

6
Window / Fullscreen problem
« on: March 11, 2009, 08:02:38 am »
If I switch from windowed to fullscreen with this:

Code: [Select]

void CGameEngine::Init(const char* title, int width, int height, int bpp, bool fullscreen)
{
   App = new sf::RenderWindow (sf::VideoMode(width, height, bpp), title, sf::Style::Close);

   App->Close ();

   App->Create (sf::VideoMode(800, 600), "SFML Window", sf::Style::Fullscreen);

   App->SetFramerateLimit (60);
}


I get this message:

Quote

The requested video mode is not available, switching to a valid mode


Than the old resolution (not 800, 600 like wanted) is switched to fullscreen.

I have this problem only on linux. I have tested if 800, 600 is a valid mode.

What's my problem?

Andreas

7
Graphics / sprites movement stuttering
« on: March 06, 2009, 08:18:49 am »
If I move my sprites, it looks always like stuttering. What could be the problem?

How could I do smooth movement?

(The FPS of the program is 2000 or, the speed of my system couldn't be the problem)

The source is to find here:

http://code.google.com/p/sallb/source/browse/#svn/trunk

Bye
Andreas

8
General / Resources sound and music
« on: February 09, 2009, 09:53:59 am »
I know, this is not special for sfml but, can tell me someone a place where to get free sounds and music for games?

Andreas

9
Graphics / Font crashes
« on: January 12, 2009, 11:58:10 am »
If I do this:

Code: [Select]

sf::Font font;

    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Ballspiel");


// Load font file on disk
if (!font.LoadFromFile("font/Videophreak.ttf"))
return EXIT_FAILURE;

sf::String buftext ("Hello!", font, 15);


my program crashes.

What's wrong? (the fontfile is in the correct place for loading)

10
Graphics / White Rectangle
« on: November 27, 2008, 10:13:13 am »
When I do this the tank is drawn only
as a white rectangle in the top left.

What's wrong?

Here is my CTank.h:

Code: [Select]

#ifndef __CTANK_H__
#define __CTANK_H__

class CTank
{
public:
CTank ();
~CTank ();
int LoadImages ();

public:
sf::Sprite *tanksprite;
};

#endif


Here is my CTank.cpp
Code: [Select]

#include <SFML/Graphics.hpp>

#include "CTank.h"

CTank::CTank ()
{
tanksprite = new sf::Sprite;
}

CTank::~CTank ()
{
}

int CTank::LoadImages ()
{
sf::Image Image;
if (!Image.LoadFromFile("../graphic/tank2.png"))
return EXIT_FAILURE;

tanksprite->SetImage (Image);

return 0;
}


Here is my Main:
Code: [Select]

#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include "CTank.h"


int main()
{
CTank *tt = new CTank;

tt->LoadImages ();

// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600), "Test Tank");

// Start the game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close ();

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close ();
}

App.Draw (*tt->tanksprite);

// Update the window
App.Display ();
}

return EXIT_SUCCESS;
}

11
General discussions / collision detection
« on: March 02, 2008, 05:45:05 pm »
Hello,

has anyone a library with pixel-perfect-collision-detection, which can be used with SFML?

Andreas

Pages: [1]