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

Pages: [1] 2
1
Network / Download text-file
« on: May 27, 2009, 10:47:18 pm »
VERY BIG THANK, GUY!!!

Soluted the Problem this way:

Code: [Select]

// Init HTTP Client
sf::Http Http;

// Set the Host
Http.SetHost("www.yourdomain.tld");

// Get the file
sf::Http::Response Response = Http.SendRequest(sf::Http::Request::Request(sf::Http::Request::Method::Get, "http://www.yourdomain.tld/dir/foo/bar.ext"));

// Save the downloaded text into a string
std::string Body = Response.GetBody();

// Save the file
FILE *fTextFile;
fTextFile = fopen("bar.ext", "w" );
fputs(Body.c_str(), fTextFile);
fclose(fTextFile);


^^Now the file is saved as bar.ext into the working directory of the project.

2
Network / Download text-file
« on: May 27, 2009, 10:27:41 pm »
Can anybody post the whole working code, because I'm too lazy now  to tinker the code snippets xD

3
SFML projects / [WIP] DevBo! (Searching translators)
« on: May 22, 2009, 10:48:58 pm »
This Game is a PC-Version of the Game Skip-Bo! Which concentrates mainly on the GameServer and the Multiplayer-Function.

Will be published in
    German
    English
    Netherlandish
    other Languages if I'll find a translator

http://en.wikipedia.org/wiki/SKIP-BO

First Screenshot of the Configuration Dialog (Made with .NET):


4
General / 1st Demo Using SFML - Only Get Console Window - HELP
« on: May 22, 2009, 07:40:47 pm »
Nobody knows that? I think its a really bad bug, because many useres have usb hids.

5
Window / CPU usage shoots up to 100 when generating a window
« on: May 22, 2009, 07:34:20 pm »
Also setting the FrameRateLimit is the nicer way to work with you cpu xD

6
Audio / Cant get Audio to work?
« on: May 22, 2009, 05:37:21 pm »
^^look at my edited post, please. Problem is solved now

7
Audio / Cant get Audio to work?
« on: May 22, 2009, 05:27:46 pm »
Already tried your tips...No result.

//EDIT: The file I'd use was broken

8
Audio / Cant get Audio to work?
« on: May 22, 2009, 04:37:57 pm »
Hi,

have the following error:

Failed to open "data\samba.ogg" for reading
Failed to play audio stream : sound parameters have not been initialized (call Initialize first)

what I've done wrong?

Code: [Select]

        sf::Music muHintergrund;
        std::cout << "[Audio]: Loading Media-File \"samba.ogg\"" << std::endl;
if (!muHintergrund.OpenFromFile("data\\samba.ogg"))
{
App.Close();
}


And in front of the main loop:

Code: [Select]
muHintergrund.Play();

File is existing...

9
Window / [SOLVED] How to change Videomode after Creating App
« on: May 22, 2009, 12:54:50 pm »
Hi,

can I change the Videomode after creating the Window?

//EDIT Solution:
App.Create(sf::VideoMode(iWidth, iHeight, iDepth), sTitle);

10
Window / [SOLVED] Runtime error after Closing the App with an Event
« on: May 22, 2009, 11:42:43 am »
Yeah, its the string! Because if I remove the lines of the string, it works properly!

Is there a way round it?
EDIT: http://www.sfml-dev.org/forum/viewtopic.php?t=956&postdays=0&postorder=asc&highlight=string+bug&start=15 Here is the solution ;)

But theres an Error with the Default charset...how do I declare it?

EDIT: Solution - Define SFML_DYNAMIC in Preprocessor defines. Then it works!

11
General / SFML Logo / Jingle
« on: May 22, 2009, 11:37:54 am »
Thanks, the logo already had. Thought I could speed up my Intro a bit xD

12
Window / [SOLVED] Runtime error after Closing the App with an Event
« on: May 22, 2009, 11:31:23 am »
Hey,

I have the following Problem:
I created a console Application. When I close the console, the App exits normally. But if I close the App with Events (sf::Event::Closed or (Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape) ) , then I get a runtime error...

Unbehandelte Ausnahme bei 0x69764ec0 in SkipBoD.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x01420654.

^^thats the german one...wait...I'll translate it:

Unhandled Exception at 0x69764ec0 in SkipBoD.exe: 0x0000005: Access violation while reading at position 0x01420654.

Anybody knows how to fix this?

Code: [Select]

while (App.IsOpened())
{


// Clear screen
App.Clear(sf::Color(255,255,255));

App.Draw(sprSfml_logo);
// Draw the string
            App.Draw(Text);

App.Display();
sf::Event Event;
while (App.GetEvent(Event))
{
// Window closed
if (Event.Type == sf::Event::Closed)
App.Close();

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

13
General / SFML Logo / Jingle
« on: May 22, 2009, 11:20:45 am »
Hey ladies and gentlemen,

has sfml something like a jingle or intro video I can put into the intro of my game?

14
Window / [SOLVED] Window Title
« on: May 21, 2009, 07:50:05 pm »
Thank you very much. It works now

15
Window / [SOLVED] Window Title
« on: May 21, 2009, 06:10:18 pm »
Hi,

switched from SDL to SFML. My first Problem is:

How do I remove the ÌÌÌÌ in front of my Window name?

Code:
Code: [Select]
int main(int argc, char** argv)
{
// Create the main window
int iWidth = 800;
int iHeight = 600;
int iDepth = 32;
char* sTitle = "SkipBo";

std::cout << "[Graphics]: Creating Window (" << iWidth << "x" << iHeight << "x" << iDepth << " - \"" << sTitle << "\")" << std::endl;
sf::Window App(sf::VideoMode(iWidth, iHeight, iDepth), sTitle);

std::cout << "[Graphics]: Opening this Window" << std::endl;
App.Create(sf::VideoMode(iWidth, iHeight, iDepth), sTitle);

// Start main loop
bool Running = true;
while (Running)
{
App.Display();
}

return EXIT_SUCCESS;

}



Pages: [1] 2
anything