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

Pages: [1]
1
Graphics / sf::Texture bind
« on: October 11, 2011, 10:46:59 pm »
Is this function slow and should not be used? I just switched over a little texture manager over I made that used GLuints to store the textures and what not to use sf::Texture and now instead of doing glBindTexture I do texture->Bind();

I see about a 10% increase in my CPU usage, before about 8-12% now 22-28%.

I may have done something wrong , I'm going to look over everything once again. I'll edit this post with updates.

2
Network / UDP and send AND receiving?
« on: June 28, 2011, 01:51:35 am »
I am trying to receive and send with a UDP socket, but it never works.. I can either just send, or receive. I have tried non blocking, I have tried more than one thread.. It just seems that I can only send and receive if I use 2 sockets..? Any input on this? :c

if I have a loop like so:

Code: [Select]
while(running)
{
     receive();
     sendAPacket();
}

and receive is like so:
Code: [Select]

sf::Socket::Status socketStatus = recvSocket.Receive(recvPacket, serverIP, port);
if(socketStatus == sf::Socket::Done)
{
if(recvPacket >> receivePacket)
{
                }
         }
}

No packets will be received by the server, whether the socket is blocking or not....... if I comment out receive, the server gets all packets.. but the client no longer can receive...

What is happening!??!

Should I switch to something else? I really enjoy the whole packet thing though :|!

3
Network / Tile based network game
« on: June 10, 2011, 10:58:11 pm »
I'm going to be making a networked top down tile based game, and I will have many questions [hopefully not too many] so I want to open a thread to ask them in so I don't have to make 100 threads.
Anyway, I'll start with my first question...
Would it be more sensible to have text files of all the maps in the game, for both the client AND server or the server to send map information whenever they move to new areas, etc?
I see the upside of the both client and server for less network work on the server.
This may also show all the areas of the world to the client if they found the files.. and they would be able to edit them, although the server would always check with its copy and it wouldn't matter.
Any input appreciated.

4
General / [Solved] Moving from 1.6 to 2.0
« on: June 10, 2011, 02:04:54 am »
So I compiled 2.0 and I get lots of errors using it with my 1.6 code, yay.
I fixed most, such as string to text.. but I was using ::Shape.SetOutline etc to make a nice little textbox wrapper

How do I go about doing this now? It seems they are not part of ::Text now
Code: [Select]
outline.EnableOutline(true);
outline.EnableFill(false);
outline.SetOutlineWidth(1);

:C[/size]

-- Nevermind, did not look closely enough. :x sorry! Will not make a useless thread again. -.-

5
Graphics / Tile based theory
« on: June 09, 2011, 05:47:56 pm »
I'm going to start working on a tile based game, but I would like to run some questions by to get some input on how to do this correctly and efficiently.

I assume I would use.. a vector of tiles? where tile would be a struct

Code: [Select]
enum tileType
{
   grass,
   water
};

struct tile
{
    sf::Sprite tileSprite;
    tileType type;
};

vector<tile> tiles;

An image manager would make sure only one copy of an image was loaded and a reference was passed to each tileSprite.
And I would loop through a text file / string and grab each character and make it into a tile with a nested for loop.
I would later loop through it to draw.

Does any of this seem to be incorrect, or a simple/superior way of doing it?

6
General discussions / radeon xxxx
« on: June 05, 2011, 02:46:03 am »
has sfml been fixed for ati radeons yet? Just curious as my friend can not see anything I send him or build his own sfml applications and I searched and found that it was being worked on. any updates?

Pages: [1]