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

Pages: [1]
1
General / 2 Problems
« on: July 01, 2008, 11:54:40 am »
Hm Why sou are link to the ending "-s" ?
Try it normal with "SFML-...lib" without ending "-*"

2
Network / Multithread Server
« on: July 01, 2008, 11:28:48 am »
Hi,

I wanted to ask if there is any Code Example for a MultiThread Server?
I know SFML has the Selector Function but it is more comfortable with a MultiThread Server...

Best regards,
lohr

3
Network / Packet Send and Receive
« on: June 30, 2008, 02:08:45 pm »
So it is working...
I forgot to run the Clear() Method for the RegularPacket ^^

Do you have any tips on the fixing of latency problems?

4
Network / Packet Send and Receive
« on: June 30, 2008, 12:24:19 pm »
Quote from: "Laurent"
Quote
but it isnt working...

Can you give more details please ? ;)


Okay sorry ^^
The first pos and rot info that i am sending always is received by the server, all others after that get lost.

Quote
Well, you are sending the packet twice... that may be a problem.


Hm i tried it with one sending operation as well and it didnĀ“t work.

5
Network / Packet Send and Receive
« on: June 30, 2008, 11:38:57 am »
Hello,

I want to send and receive a packet with the following structure:

Code: [Select]
struct Position
{
    int     x;
    int y;
int rot;
};


now thats my server Init:

Code: [Select]
sf::SocketTCP Server;

    if (!Server.Listen(1000))
        return EXIT_FAILURE;

    sf::IPAddress ClientAddress;
    sf::SocketTCP Client;
    Server.Accept(Client, &ClientAddress);

sf::Packet RegularPacket;
Position P;


and thats my client Init:

Code: [Select]
sf::IPAddress ServerAddress = sf::IPAddress::GetLocalAddress();

    sf::SocketTCP Client;

    if (!Client.Connect(1000, ServerAddress))
        return EXIT_FAILURE;

sf::Packet RegularPacket;
Position P;



Here is the Receive Part of the Server:

Code: [Select]
if (Client.Receive(RegularPacket) != sf::Socket::Done)
return EXIT_FAILURE;
if (RegularPacket >> P)
{
s_auto.SetPosition(P.x,P.y);
s_auto.SetRotation(P.rot);
}


Here is the Send Part of the Client:

Code: [Select]
P.x = pos.x;
P.y = pos.x;
P.rot = rot;

if (RegularPacket << P)
{
if (Client.Send(RegularPacket) != sf::Socket::Done)
return EXIT_FAILURE;
}

if (Client.Send(RegularPacket) != sf::Socket::Done)
return EXIT_FAILURE;


Its a litte Car Racing game where i am trying to send the position of the client car to the server, but it isnt working...
The Connection is established betweeen them.

Do you find anything wrong?

Best regards,
lohr

6
General / [Solved] Executable isnt running on other systems
« on: June 26, 2008, 04:49:58 pm »
Thank you very much :)

7
General / [Solved] Executable isnt running on other systems
« on: June 26, 2008, 09:54:25 am »
Hello,

I am using VS Prof 2005 and i have built a little game.
Now I compiled and linked it, and it runs nice on my developer machine.

But if I show it to a friend on a different PC there comes an error msg "...Application could not be started, because the applicationconfiguration failed...".

How could i fix this?
I read very much at google but nothing really helped (which dll, i need on the target machine or static linking?)

Thank you very much!

8
Graphics / [Solved] Opacity for Sprites?!
« on: June 26, 2008, 09:40:16 am »
Okay, so i have to work with Gimp ^^
I think Paint in windows cant do that, right? ^^

9
Graphics / [Solved] Opacity for Sprites?!
« on: June 26, 2008, 09:13:56 am »
What do you mean with "transparent", white?

10
Graphics / [Solved] Opacity for Sprites?!
« on: June 26, 2008, 07:48:30 am »
Hm I think my problem goes in this direction...
I have a PNG format and want to draw this, but the sprite is then a rectangle, if i have a more complex building in it (like a circle), how could i make it that all around the circle is splitted away from the rectangle?

Is there any method?

11
Graphics / Intersection
« on: June 26, 2008, 07:35:44 am »
Hm ive done it now with the contains-method from rect :) and i calculate the 3 other edges every time...

12
Graphics / Intersection
« on: June 25, 2008, 12:01:29 pm »
Hm i cant find this function...in which class is it?

EDIT:
I will do it now with an invisible Rect Object and the contains() method.
If you have better solutions, let me know ;)

13
Graphics / Intersection
« on: June 25, 2008, 11:32:30 am »
Hello,

I am want to program a little racer game, so i have to check for the border of my race circuit.
Now I was wondering about, that the Sprite class has no function "intersects" but rectangle has it?

How could I solve my problem best, because my car sure has to move :) Could i use a Rect instead of Sprite or are there other possibilities?

Best regards,
Alex "lohr"

14
Graphics / [Solved] Problems with Sprite and Shapes
« on: June 24, 2008, 10:03:26 am »
Thank you very much :)
All is working fine now!

15
Graphics / [Solved] Problems with Sprite and Shapes
« on: June 24, 2008, 08:59:48 am »
Hello,

I have 2 different problems...I am actually working me through the different tutorials and now i have my first problems.
I am using the Microsoft VC 2005 Full.

If I do this(same with sprites and images):
Code: [Select]
if (!BackgroundImage.LoadFromFile("background.jpg"))
        return EXIT_FAILURE;

i get following error:
Quote
Unbehandelte Ausnahme bei 0x7c43eba2 in SFML.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00133000.

the picture is at the right place...

If i want to run the shape tutorial, i am getting this:
Quote
Unbehandelte Ausnahme bei 0x104817fd (msvcp80d.dll) in SFML.exe: 0xC0000005: Zugriffsverletzung beim Schreiben an Position 0xcccccccc.

and he is jumping to debuging in "xutility"...

Any tips here?
Thank you very much!

Regards,
Alex "lohr"

Pages: [1]
anything