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

Pages: 1 2 3 [4]
46
Network / Bug in sf::SocketTCP::Connect()
« on: July 10, 2009, 12:21:45 am »
Hi,

I've discovered a bug in the Connect() function of the sf::SocketTCP class on Linux.

Steps to reproduce:
- Create an instance of sf::SocketTCP.
- Connect to a host and port where no socket is listening.
- Provide a timeout!

Connect() returns sf::Socket::Done even if the connection couldn't be made. This results in a broken pipe later when trying to receive or send from/to the socket.

Example code:
Code: [Select]
#include <iostream>
#include <SFML/Network.hpp>

int main( void ) {
sf::SocketTCP  socket;

if( socket.Connect( 33033, "localhost", 2.f ) == sf::Socket::Done ) {
std::cout << "Connected. Sending data..." << std::endl;
socket.Send( "Foobar", 6 );
}
else {
std::cout << "Failed to connect." << std::endl;
}

return 0;
}


SFML version: SVN (not latest trunk)
OS: Debian GNU/Linux Squeeze (Testing), kernel 2.6.26

47
General discussions / Release interval
« on: May 25, 2009, 09:24:34 am »
Hey,

what do you, especially Laurent, think of a shorter release interval? As far as I recognized, SFML releases are made only when bigger changes have been done. The good thing is, that it's mostly very stable, the bad thing is, that bugs which have been overseen (;)) are there for months (or weeks).

What about releasing revisions for things that have been fixed and are relevant for stability? For example, the USB joystick bug is in 1.4, but has already been fixed in 1.5. Why not release a bugfix release 1.4.1?

Greetings

48
SFML projects / SFML Community Contest (German forum)
« on: April 01, 2009, 07:02:48 pm »
Hi all!

We at the German forum recently had  a community contest. The task was to code a pong clone in ~2 weeks. 5 people took part in it and submitted cool versions of pong clones.

We thought that some of you are maybe interested in testing the submitted entries. So here's the link to all 5 submissions: Download (~13 MB)

By the way: The winner of that round is AlZe with his incredible space pong clone. ;)

49
Feature requests / Unicode utility function to create UTF32 strings
« on: February 17, 2009, 04:36:58 pm »
I'm currently changing all strings in my application to Unicode::UTF32String. The only way to properly create a new UTF32String is by using Unicode::Text, but it's not really a suitable solution, since you need to construct a temporary object to get an UTF32String. Example,  using a constant:

Code: [Select]
sf::Unicode::UTF32String  str( sf::Unicode::Text( L"Hello World!" ) );

Since Unicode::UTF32String is actually a basic_string<Uint32>, I don't really know how to make that beast more graceful. But I dislike the idea that I can't immediately construct an UTF32String with a value.

So my opinion is that there should be an utility function that builds an UTF32String, at least from well-known types like const char*, const wchar_t*, const std::string& etc.

If there's another possibility I didn't see yet, I'd be happy to hear from that. In this case, declare this request as a request for help. ;)

50
Graphics / Patch for Font class
« on: February 14, 2009, 09:56:55 pm »
I've recently found out that the Euro sign is not printed out. The reason is that some wrong codepoints are used for ourDefaultCharmap. I've corrected the failing values.

Also, I've implemented a replacement glyph for invalid codepoints. That means, when you try to print out a glyph that wasn't loaded through the charset, that glyph gets printed out instead of just nothing, like it is currently.

Patch: http://pitload.org/get/1628

51
Window / TextEvent.Unicode not using Encoding
« on: February 14, 2009, 03:00:52 am »
Hey,

I didn't really know where to put this thread in. But since it's event-related, I'll give it a go here.

The problem I have is that the Unicode member of TextEvent is not encoded, but just holding the pure Unicode value of the entered character. This is rather useless for use with SFML, since it uses UTF-32 everywhere. I couldn't find a helper method to encode a Unicode value to UTF-32, which makes it impossible to get the real character using only SFML.

I checked the sources and found out that you're doing an UTF8 to UTF32, so I thought this should work in general, but it doesn't. For example, if I hit 'ß' on my keyboard, TextEvent.Unicode is 223 or 0x00DF, which is the Unicode representation of 'ß', thus not encoded.

Any hints on this?

52
Feature requests / Tagging releases in the SVN repository
« on: January 22, 2009, 07:37:06 pm »
Hi.

I've just noticed that you don't seem to follow common SVN repository recommendations when it comes to the directory structure. I don't see a trunk and especially no tags directory. This way it's not possible to get an older SFML version, or am I missing something?

If not, it would be great when that could be changed.

53
General discussions / German forum
« on: January 09, 2009, 04:52:07 pm »
Hi,

I've been thinking of this for a couple of weeks and finally decided to give it a try:
SFML currently has forums for French- and English-speaking people. Since there're at least some German developers out there that I know of, it's maybe a good idea to have a place where you can ask your questions in your native language. So I created a small new forum for the German folks.

I don't know if there're really enough German guys out there so that a German forum pays off. But it's worth a try, I think.

The forum is currently reachable at http://sfml.boxbox.org . If there're enough users, I'd register a more recognizable domain like sfml-forum.de or something similar.

Feedback welcome -- also at the new forum. :)

54
SFML projects / Tanktris - a Tetris clone [RC2 & Sourcecode released]
« on: July 03, 2008, 11:34:13 am »
Hello,

I've written a small Tetris clone called "Tanktris" for university using SFML, which is indeed a very great library.

The game texts are in German, but I think the most things are self-explanatory. To start a new game in the menu, choose "Neues Spiel".
All sound effects and musics are CC-licensed, the graphics were done by a good friend of mine. It took me about 20 hours to finish the game.

I hope you like the game, feedback is always appreciated.

55
Audio / Weird segmentation fault
« on: June 12, 2008, 03:25:30 am »
Hi all,

today I discovered a really weird segmentation fault regarding the audio package (better say: OpenAL).

I'm currently writing a Tetris game which has a "state" mechanism. That means, the game is splitted into states, e.g. the menu, in-game, highscore table etc. This way I can load/unload resources and seperate everything in a clean way. These states are organized in classes.

Well, I've always been using musics in my menu and in-game states. Switching between them has never been a problem. When switching states, the following procedure is done:
- create the new state (i.e. an object of the proper state class)
- notify active state that we're about to leave it
- delete active state (means delete the class object)
- set active state to new created state

Of course, constructors and destructors get called correctly. And in my case, I do nothing in the constructors than initializing a reference to an sf::RenderWindow.

Today, I wrote a new highscore state, to display the highscores table. I haven't implemented any music yet -- other things were more important. Compiled, and chose "Highscores" from the menu state. Menu gets deleted, highscore state activated -- no problems here. But when switching from the highscore state back to the menu state (i.e. creating Menu object, deleting Highscore object, activate Menu object), a segmentation fault occures.

And it exactly happens when constructing the menu state object, where NOTHING is done besides initializing the sf::RenderWindow reference. After using gdb to debug a bit, its backtrace showed me a fault in one of the OpenAL libraries. I really wondered why that happened, and after playing around a bit, I just added a music to the highscore state. Then, when switching to the menu, the segmentation fault isn't there anymore.

Because this really is a VERY strange thing, I'm hoping that anybody has an idea. I neither deinitialize any audio stuff nor load/unload any other important stuff. The only thing I'm doing is delete a state and create a new one, which is highly non-SFML stuff. Only one reference gets initialized in the state contructors, nothing more.

Any ideas?

Pages: 1 2 3 [4]