Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
GNE Library / Re: HELP: redirect GNE console in/output elsewhere
« Last post by Gillius on February 19, 2009, 02:35:12 PM »
You could try to replace the underlying streambuf to redirect the output somewhere else, but the original intent of the GNE console library was to support things like servers that run without any GUI at all, not for clients. The example programs use it just because it's quick and easy.

Even if you find a way to redirect it to SDL, you still need to handle the fact that the text comes in as a stream. GNE adds the additional concept of moving the cursor location, which could map to the SDL world, but you still need to support a concept like "addChar" or "addText" to incrementally add more text.

If you've implemented a sort of "graphical console" similar to what games like Valve Source engine might do, then you might already have some API capable of accepting the streaming input. In that case, the ConsoleStreambuf or a layer above that you might just want to switch in your own streambuf.
GNE Library / HELP: redirect GNE console in/output elsewhere
« Last post by andwan0 on February 19, 2009, 11:27:33 AM »
Is it possible to use the GNE console... but output somewhere else?

I like to use it mixed with a SDL GUI. I managed to build a SDL GUI sample with exhello running together, but the GNE console shows no text (however it accepts keyboard input). Also need to get input from the SDL GUI if possible....
Programming Questions / Multiplayer Solitaire
« Last post by andwan0 on February 19, 2009, 08:01:10 AM »
I like to create a 2-4 player solitaire game. I never done network programming before so wondering if I can get help with ideas on the client/server infrastructure & network protocol. Then hopefully someone can start off some sample code to help me get started.

My current idea is that the server waits for client connections. All players in some chat lobby. The server has a "Start Game" button.

The server must shuffle each players' pack of cards and deal them out solitaire style. Each player has their own independent pack of cards so there's no duplicates.

The solitaire 4 ace base slots is multiplied by the number of players. So if there's 2 players, there are 4x2 ace base slots. If there's 4 players, there are 4x4 ace base slots. The ace base slots are public, shared among the players.

Aim of game is to solitaire throw away all your cards onto the ace base slots.

Upon game start, server allocates cards to all players. Am not sure whether to send out the entire card piles of just the top up-facing cards.

During game, clients will drag their top up-facing cards on top of each other according to solitaire rules (black - red - black, card on top must be 1 number less). I guess all this logic should be done on client-side. As soon as a player drags a valid card onto the ace base slot, the server gets notified, checks if valid move (incase another player got a card there first) and broadcasts to all other players. looks like a good starting point. The confusing bit is how to integrate with the network library and do the client/server logic above?
Programming Questions / need your help
« Last post by bob53 on February 10, 2009, 09:41:12 AM »
I have some troubles keeping my site updates... i have a new job and it's consuming all my time, i can't program as i used to do. i don't know what to do, a friend recommended this site, he said they do Joomla programming, but as i've never used one of these services i don't know what to expect.
Have any of you used this kind of services?
What do you think i should do?
I really appreciate your answers

Off-Topic Discussion / 9th BME International 24-hour Programming Contest!
« Last post by challenge24 on January 08, 2009, 12:20:30 AM »
Do you like programming? Can you take challenges? Would you match yourself with others?

Here is your chance! Grab it!

The Electrical Engineering Students' Hungarian Association and the Károly Simonyi College for Advanced Studies are proud to present the

9th BME International 24-hour Programming Contest!

If you have missed the previous eight occasions, it is now time to join the adventure!

This contest is a real test of creativity, knowledge, endurance and team-work, an EXTREME CHALLENGE! Sponsors and the offered prizes worth 5000 euros contribute to the high standards of the contest. The team which gaines the utmost points can take home the award and the cup.

Those teams which will have finished registration until 21st February 2009, must do their best during the online preliminary quailifier on 28th February 2009. The best performing thirty teams can participate onsite at the Finals in Budapest Hungary, between 1st and 3rd of May 2009. During the 24-hour advanturous round, the contestants will have to solve one, but extremely complicated and interesting task. They will need all of their knowledge in the field of algorithms theory, artificial intelligence and program design, and also well-used team work competence is desired.

The contestants will be allowed to use their own computers. Technical background and catering will be provided. There are no restrictions on the hardware, software and support they use, but communication with the outside world is strictly forbidden.

For further information and for tasks from the previous years please visit the official homepage of the Challenge where future occurrents will also be available for everyone.

If you are not afraid of eXtreme challenges, you do not have anything else to do just to establish a team of 3 members and register at! Participation is completely free of charge.

Have fun and good luck!
The Organizers

Deadline for registration: 21st February 2009
For further information please check our website, or contact us by email
GNE Library / Re: Compiling Error version 0.70 and 0.75
« Last post by Gillius on November 24, 2008, 09:40:54 PM »
Well, if you are using version 0.75, try out the SVN version and it won't use the INT_MAX anymore (but it does use <limits>).

Thank you for not only finding this problem but helping me debug it. I wonder how long this issue has gone on. I will also probably work a little bit on the build documentation, because when I built this I pretty much had to start from scratch on remembering how to do it. Although, the build process is a lot easier with CMake... If anyone out there is still using the 0.70 release, try the SVN one.
GNE Library / Re: Compiling Error version 0.70 and 0.75
« Last post by rdesgagn on November 24, 2008, 05:15:32 PM »
Hi Gillius,

             I know why I got the warning.  I added the #define INT_MAX 2147483647 which is not really good programming practise when I didn't know about <limits> and <climits> .  However, I noticed that Thread, PacketStream and EventThread include gneintern.h so I modified it (gneintern.h) to include <limits> which now works.   When recompiling, INT_MAX from <limits> is redefined in EventThread.cpp by my #define INT_MAX 2147483647.  To fix it, I removed the #define and that's it.  Thanks for your cooperation.

GNE Library / Re: Compiling Error version 0.70 and 0.75
« Last post by Gillius on November 24, 2008, 05:00:03 PM »
I should note that the current code compiles with the stock GCC 4.2.4 compiler in Ubuntu 8.04. I do think that my code is wrong for not including <climits>, but I also think that GCC 4.3 is broken in saying that the symbol is redefined if you do include climits. However, I ought not use C symbols in a C++ application anyway.

I'm also not sure why you didn't get warnings for PacketStream and Thread, which also used INT_MAX.

I've made a commit to SVN that still compiles for me on 4.2.4. I need to test it with visual studio. It should compile fine in 4.3 that you are using. Let me know how it goes.

I also need to update links on the GNE site.
GNE Library / Re: Compiling Error version 0.70 and 0.75
« Last post by Gillius on November 24, 2008, 11:58:15 AM »
Is that an issue with GCC? limits is a C++ header, right? And climits is the C header normally for limits.h but for written for C++, I think. Man I've been doing Java for 4 years so my C++ is starting to get rusty.

I should also check on using std::numeric_limits<int> instead. I will work on this and do a commit today.
GNE Library / Re: Compiling Error version 0.70 and 0.75
« Last post by rdesgagn on November 24, 2008, 11:48:25 AM »
Hi Gillius,

              I tried both ways and it's by adding
Code: [Select]
#include <limits> to gneintern.h that works best.  By that, I mean no warning/error at all.  If you add
Code: [Select]
#include <climits> instead, you'll get a warning but it still works.  Here is the warning just in case you want it :

Code: [Select]
In file included from /home/rdesgagn/gne/gnelib0.75/src/ServerConnection.cpp:28:                                                                                                                                                             
/home/rdesgagn/gne/gnelib0.75/include/gnelib/EventThread.h:31:1: warning: "INT_MAX" redefined                                                                                                                                               
In file included from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/climits:48,                                                                                                                                         
                 from /home/rdesgagn/gne/gnelib0.75/src/gneintern.h:51,                                                                                                                                                                     
                 from /home/rdesgagn/gne/gnelib0.75/src/ServerConnection.cpp:20:                                                                                                                                                             
/usr/lib/gcc/i386-redhat-linux/4.3.0/include/limits.h:74:1: warning: this is the location of the previous definition                 


Pages: 1 ... 3 4 [5] 6 7 ... 10