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

Pages: 1 [2] 3
16
SFML projects / v0.8 released
« on: June 18, 2011, 06:19:04 pm »
Hello everyone!

I have been working on pesky build related problems and believe that I have finally nailed them all (for now).  You can now build GQE v0.8 against either Dynamic/Static versions of SFML.  Also I have provided prebuilt versions of SFML v1.6 and SFML v2.0 on the GQE Google Code project.  I have also provided SFML v1.6 with CMake support on the GQE Google Code project.

Now that my build related troubles are over for now, I will focus my attention on working on better example projects for using GQE.  Thanks again for all your support.

17
Graphics / Fonts not loading
« on: June 15, 2011, 01:42:48 pm »
I created a simple SFML 2.0 project with the example from the first page of the SFML documentation that loads the arial.ttf font and didn't repeat the problem.  At this point I think there must be something that happened during the linking of GQE and SFML 2.0 and my demo example.  Can you tell me what you were linking against?  Dynamic or Static Libraries for SFML and Dynamic or Static Libraries for GQE?  It might help me recreate the issue.

18
Graphics / Fonts not loading
« on: June 14, 2011, 02:25:32 pm »
I have reviewed the SFML 2.0 code and can't find anything obviously wrong with the LoadFromFile method in the Font class.  I will create a Visual Studio project that uses SFML 2.0 and this font and see if I can find out which line is causing the Access Violation I saw when calling this method.  If anything, its a problem with FreeType 2 that SFML is using, or its libraries.

Doing a Google search yielded an interesting comment on the Ogre forums where someone said the inability to load a font in FreeType 2 was related to having current Video Drivers, the person who posted the question was trying to run his program over a Remote Desktop connection and when he ran it locally everything was fine.  That's not the case with me, so I'm not sure yet what might be wrong yet.  I'll keep digging.

-Ryan

19
Graphics / Fonts not loading
« on: June 14, 2011, 05:49:08 am »
I had the same problem recently testing my GQE v0.7 update and discovered that it was related to SFML 2.0.  I need to investigate further to see if I can figure out why, I think there was something wrong with linking against the 2.0 libraries I made.  I'll see if I can figure it out over the next couple of days and get back to you.  The error I got was an Access Violation using Windows 7 and Visual Studio 2008 and shared libraries.

-Ryan

Quote from: "bucknasty189"
Sorry I took so long to reply. The path is definitely correct, I'm using the AssetManager from the GameEngine tutorial and it loads fonts and sounds fine, but fonts are giving me a problem. They load in a simple main() context, but it says it cannot find the resource when I use the LoadFont() function.

This error message is from SFML, not from in the AssetManager. You can view the source at
http://www.sfml-dev.org/wiki/en/sources/gqe_en#assetmanager.cpp

Here's the line that produces the error.
Code: [Select]

m_Game->m_AssetManager.AddFont("CheeseBurger", "../data/fonts/cheeseburger.tff", AssetLoadStyleImmediate);
[/url]

20
SFML projects / GatorQue Engine (GQE or Basic Game Engine) Updates
« on: June 12, 2011, 06:01:39 am »
Hello everyone!

I have really appreciated your encouragement on my GQE or Basic Game Engine project.  I have recently posted a new update (version 0.7) to the GQE project at its home http://code.google.com/p/gqe/.

The main feature that has been added is a new logging facility using Macros and C++ classes.  Please grab a new copy if your currently using GQE for your project.

My next objective is the begin working on a better example for using the GQE project.  The current plan is to create a Asteroids clone, but extend it to be multiplayer so I can show how networking can be incorporated into the GQE engine.  I will be creating the "Sprite Engine" I talked about in my recent "Basic Game Desing" tutorial.  If you haven't read this tutorial, I encourage you to go read it (I will finish the last 3 sections to it soon).

Please don't hesitate to post questions or comments about the GQE project or things you would like to see me work on next for the GQE project as a reply to this thread.

Here is the change log from the GQE project:
 Version 0.7
===========
- New logging technique using macros and C++ logger classes
- Static build CMake fixes

Version 0.6.1
=============
- Quick build issue fix

Version 0.6
===========
- Use system level include style
- Better CMake support for building code

Version 0.5
===========
- Added ConfigAsset class
- Added ReInit method to IState class
- Added InactivateActiveState and ResetActiveState methods to StateManager
- Call HandleCleanup from DoInit in IState for dropped active states

Version 0.4
===========
- First GoogleCode project posting
- CMake build scripts
- Documentation fixes and other fixes

Version 0.3
===========
- Bug fixes for Linux compiler

Version 0.2
===========
- Bug fixes for compiler problems
- Bug fixes for Active/Inactive states

Version 0.1
===========
- Initial release to SFML Tutorial Wiki
- Builds fine on Linux.
- Qt Modules detected and included.
- BUilds out of the box; packaging needs rework.
- Tested to work on Linux.

21
Network / Networking article
« on: June 04, 2011, 10:53:09 pm »
Hey,

I'm somewhat new to SFML as well, and I have found this article (see link below) to be very useful in terms of describing networking.  You might also enjoy looking at my Basic Game Engine Wiki Tutorial.  I'm working on a simple Asteroids game that I hope to expand into something bigger and I hope to include networking as part of the game as well.

http://gafferongames.com/networking-for-game-programmers/

22
SFML wiki / Basic Game Design tutorial posted
« on: May 31, 2011, 05:36:54 am »
Hey everyone!  I am writing to let you know about my new tutorial on the Wiki page entitled Basic Game Design.  I have been planning this tutorial for the past few months and would love to hear what you guys think.  I still have 3 more sections to add, hopefully by tomorrow.  Feel free to contribute your thoughts and experiences to this tutorial.  I think it makes a great precursor to my first tutorial: Basic Game Engine.

I'm working on some new additions to the Basic Game Engine source code that I also hope to have posted soon.  I will also be implementing at least the Sprite Engine mentioned in the Basic Game Design tutorial I posted today during this summer.  This will be one of the first Game Engine examples that will be added to the Basic Game Engine code base and serve as the example for the Basic Game Engine code base in the future until I can create other great game examples.

Thanks to everyone who has supported me in my efforts to make creating games more fun and enjoyable and perhaps less daunting.

23
Network / Thanks again
« on: May 18, 2011, 06:50:17 pm »
Thanks again for the clarification, I knew my answer was probably not quite right, I didn't have time to check the docs, perhaps the code that was pasted was slightly modified but not compiled before being posted.

24
Network / Possible explanation
« on: May 17, 2011, 03:55:49 pm »
I think I might have an explanation of what is wrong.  It appears that the client is trying to receive on a port that it hasn't bound.  Notice how the code below is trying to receive on port 1357, but earlier it was bound to port 0 (which amounts to an ephemeral, or random, port assigned by the OS).

Client:
Code: [Select]

...
if(!Client.Bind(0))
return 1;
...
Client.Send(Name, Server, 1357);
...
if(Client.Receive(Ser, Server, 1357) == sf::Socket::Done){
...
Client.Close();


Normally, when creating a network application your server has a fixed port and the client uses an ephemeral port like you have already shown above.  When the client wants to send data to the server is does so to the fixed port provided above.  But when the client wants to receive data from the server it must do so on the ephemeral port assigned by the OS.  I'm not sure how SFML handles returning ephemeral ports, there is probably some Client.GetPort() call that can be made to determine the ephemeral port assigned.  If that is the case, you should be able to do a Client.Receive using this port and prevent a socket not bound error.  Also, you must be careful to keep track of each clients ephemeral port as they connect on the server side of your code.  The connection packet received can be used to obtain the ephemeral port being used by the client so that all future server messages sent from the server to the clients will use the correct ephemeral port.

Hopefully this information was useful (and accurate), please let us know how it works out.

25
Network / Problems with server code
« on: May 11, 2011, 04:36:13 am »
I believe your problem is in the way your handing off your clients.  Usually, the server listens on port 1234 and your clients get spun off onto their own receiver ports.  In your code below you have the following:
Code: [Select]

int main()
...
        // Create the UDP socket
        sf::SocketUDP Socket;

        // Bind it (listen) to the port 4567
        if (!Socket.Bind(4444))
        {
            // Error...
        }

...

        Socket.Close();
...

Notice how your Opening your socket on port 4444 and closing it after your first client connects.  Then you spawn a thread that does the following:
Code: [Select]

void receiveInfo(void *userData)
{
    // Print something...
    while(true){
        // Create the UDP socket
        sf::SocketUDP Socket;

        // Bind it (listen) to the port 4567
        if (!Socket.Bind(4444))
        {
            // Error...
        }
...

Notice how it binds to the SAME port as the server, this means that all future clients will be writing to the "receiver" of the first client.  It also means that in your main loop when it gets back to the "bind" step this will fail to bind to the same port.  You can only bind one UDP receiver to the same port on the same network adapter.

In addition to the SFML tutorials (which are very good) you might find a few of these articles helpful in describing how to work with sockets in general.
http://gafferongames.com/networking-for-game-programmers/sending-and-receiving-packets/

I hope to have a few examples using networking by the end of the summer as well.

26
Network / Dropping TCP packets
« on: May 08, 2011, 03:54:04 pm »
My apologies, I have dealt with buggy TCP code at work and made an assumption that was wrong without trying it out, please forgive me.

27
Network / Dropping TCP packets
« on: May 08, 2011, 07:10:54 am »
Great catch, glad you were able to find the problem.

28
Network / Dropping TCP packets
« on: May 08, 2011, 05:02:50 am »
I think I might know the problem.  According to some internet notes, the recv() method will return -1 if you try to read a packet on a NON-BLOCKING socket when there is nothing to be read.  This will in turn cause the Socket class to return an Error status to the parent method call which will then abort the reading of the packet right then and there.

So what is the answer you might be asking?  It appears that the internet suggests using the "select" call to wait for the socket to be ready before performing the Read operation.  I would suggest you try looking at the "Select" tutorial and use the Socket.Wait(timeout) method before performing the Socket.Receive method to get the packet, otherwise your NON-BLOCKING connection might get half-way through reading the packet and run out of bytes and return without giving you the full packet.  This might be a bug in the way the SFML TCP Socket class handles NON-BLOCKING Receives, we may want to investigate a little more into the Receive method and determine what if anything can be done to make the Receive(Packet) method more robust when the socket is NON-BLOCKING.

Please let me know if you have any questions and good luck!

29
Network / Dropping TCP packets
« on: May 08, 2011, 01:00:47 am »
Would it be possible to post the relevant code where these packets are created and where they are processed?

30
Network / Dropping TCP packets
« on: May 07, 2011, 09:30:21 pm »
Not knowing a lot about your code I can only offer the following ideas:

- The connection was accidentally closed (unlikely if your only missing a few packets, likely if your missing a series of packets in a row)
- The packets were received in the wrong order (TCP tries to make sure that all packets are received in the right order)
- The packets being sent were larger than 1472 bytes in size and therefore were split into multiple smaller packets, but some of these smaller packets were lost.  This might explain the loss, but TCP is suppose to resend the packets if some were lost in transmission.
- The packets were dropped because your TCP buffer is FULL.  This can happen if your sending the packets faster than the other end can process them.  The operating system helps by buffering the packets up to a certain point, but after that there is no buffers available and the packets might get dropped.  Try to see if you can compute (with wireshark) how fast the packets are being sent and see if you can add some delay to your sender and see if your packets stop getting dropped.
- Some other issue that I don't know.

Ryan Lindeman

Pages: 1 [2] 3
anything