tordyvel

Members
  • Content count

    92
  • Joined

  • Last visited

Community Reputation

128 Neutral

About tordyvel

  • Rank
    Member
  1. The Space Age Game 2001

    Background Me and my friend bought this board game called the space age game 2001 on a flee market a store a couple of years ago. It was quite fun so I decided to make a computer version of it that is playable over the net. Download the game here Screenshot How to run the game As the game plays in network you have to run the game on two computers. To start a server and a local client run Space Age Game 2001 DX.exe To connect to the server start a command prompt and run Space Age Game 2001 DX.exe IPNUMBER and replace IPNUMBER is the servers IP Instructions Each player takes turns in placing a piece on the board. The player with the blue border around the board is the current active player. If you place a piece next to an opponent's piece you will get that piece. If a player can't place a piece he looses his turn. The player with most squares on the board wins. Controls Left mouse button selects a piece Right mouse button rotates a selected piece Left mouse button places a selected piece on the board Other stuff As I'm a lazy bum I don't really clean up everything in the game so I hope windows does that for me. I'm not sure if it's illegal or not to distribute arial.ttf but my game needs it. Is it possible to link everything statically except SDL in MSVC++8.0? You can't seem to run programs on other computes unless they have some sort of .net framework installed. I had to compile it in MSVC++6.0 instead.
  2. Problem with my first Stack-Class

    Just a little bug in your final version. storage = new T[theSize]; should be deleted with [] delete [] storage;
  3. Tree node and leaf

    Hi there! I want to make a tree structure where only the leaf has data but can't figure out a cool way to do it. The tutorials I've found use some kind of node ID like: class CTree { public: struct _Node { bool isLeaf; Data *data; _Node *children; } Node; private: Node *root; // and so on }; But mixing the leaf data and children nodes is a bit ugly. Is there no cleaner way?
  4. Keyboard input too slow.

    Hmm. It should work the way you've done it. Are you maybe reseting the key array or maybe creating it in the message handle function? Try making it global. You've probably got something like this: handleMsg(....) { bool key[255]; switch(msg) { case WM_KEYDOWN ... } } This will reset the key array each time the function is called. If you make it gobal it will stay true untill you set it to false and that is what you want.
  5. Network messages

    Thank you very much for your reply. That was exactly the kind of answer I was looking for.
  6. Network messages

    I've read trough a lot of articles, forum posts and tried to google on it, but haven't really found any good information about it. What I want to know is how to build your network message packages. Let's for example say that I want to send a player position of 2 bytes (x and y). To send this i would have to manualy build some sort of byte array and probably put in another byte to identyfy the message. To me this seems realy ugly because then my code would be like: recieveMsg(msg); unsigned char id = msg[0]; switch(id) case 0: unsigned char x = msg[1]; unsigned char y = msg[2]; doStuff(x,y); case 1: .... Are there any sweet programming patterns or any higer level network lib that helps you with these things? Something like the class stream in java would be a bit sweet.
  7. Hello! I need to do some threading on a project for both win and linux. I was thinking of using pthreads but I can't find it in visual studio. Is there maybe something that i need to download? Thanks for your help!
  8. oh 81... yeah. Next time I'll think i bit before i write :)
  9. oh goth my math wrong :) 3^4 is ofcourse 64
  10. 4^3 = 4000 ??? 4^3 = 48 ! try returnVal += ((int)val.at(0) - 48); for(int i = 1; i < (int)(val.size()); ++i){ returnVal += ((int)val.at(i) - 48) * 10*i; } or something less ugly :p
  11. [4E4] Post yer Screenshots

    Wow! That looks alot like system shock 2. Great work!
  12. IOTD problem?

    But how come i see "Todays Featured Image By malCanDo"? That image was posted weeks ago. Or is there maybe something wrong with my browser? I'm just using explorer.
  13. Should it really be the last commented iotd thread that shows up as "Todays Featured Image"? It just seems a bit unfair if someone just got their image approved and then get's pushed out of the front page.
  14. Maybe i'm wrong, but can .bmp really store Alpha channels?