Server and C++ client skeleton code -- BETA - Page 3
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 43

Thread: Server and C++ client skeleton code -- BETA

  1. #21
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: Another attempt...

    Originally posted by Kuruto
    But now I'm thinking: is this thread still active? Are people still interested in this project? So I'm NOT going to post the code yet, but wait until there is some response.
    Well...as Marina already said...basically the project is more or less ongoing...however, many of us are pretty busy these days and the project got somewhat fall asleep a little bit. I can only speak for myself...I do not see much chances that I will have much time the next days/weeks...
    Ciao, Andreas

    "Software is like sex, it's better when it's free." - Linus Torvalds


    Article(s): Allocators (STL) Function Objects (STL)

  2. #22
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    19

    Question State diagram wanted?

    Wassup developers,

    My server is accepting client connections (socket based) together with client registrations (a struct that is sent). The client may only send when the server says so (turn based).
    Now I'm trying to get a robot walk inside the arena (the arena is a vector of vectors; cf. the first framework). This is basicly sending a struct from the client to the server when the client gets a turn. So far so good. But now I'm kinda stuck.
    The server keeps track of the state the robot is in; state is in this case just the position and the heading on the grid. Every time the robot sends a command, that state needs to change.
    When the server gets a command from the client, that command is parsed and then a function is called which must change the state of the robot. That function should be pretty flexible, since more than walking in the arena will be allowed. I'm trying to find a way to make this easy and flexible. Perhaps an implementation of a state diagram might work. I don't know.
    Fact is that a lot of different commands are/will be possible, and the state should be changed occording to the command.

    In case of walking in the arena, it's not just changing the coordinates. It's also checking if a wall has been hit. Checking if you are being attacked by another robot. Checking if there is food where you are standing. Etc, ...
    And this is just for walking around.

    Anyone with an idea?

    regards,
    Kurt

    PS: I will post my code as soon as I have a working version. "Working" means in this case walking in the arena.
    "GOTO's make your co-workers laugh at you"

  3. #23
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    19

    Thumbs up Second version

    Hi,

    Here's my first attempt.
    I hope you will be able to read it.
    It's the server-side of the game.
    At the moment only moving forward is possible.
    If the wall is hit, then the client is notified of this event.

    If you want the client too, just let me know.
    But I think it's better to write one for yourself.

    May I ask to fill in this poll after you have look at the code?
    http://www.santele.be/codeguru/index.php

    If you are not able to connect to the website, then you are probably behind a firewall.
    The webserver is running on port 8080.
    And due to the extreme hot temperatures in Europe, the server is down at night.

    regards
    Kurt
    Attached Files Attached Files
    Last edited by Kuruto; November 7th, 2003 at 03:52 AM.
    "GOTO's make your co-workers laugh at you"

  4. #24
    Join Date
    Nov 2003
    Location
    Ontario Canada
    Posts
    5

    Rules

    Hi, this project sounds interesting.

    I have some ideas for a similar game.

    have as few rules as possible (hardly any) but:

    - load all of the competitors at one time at the start of the match and allow it to run on individual PC's, possibly by sending a file containing all the competitors for the current match.

    give the "creatures" time-slices to run within - every creature gets an equal sized time slice to do processing in. Possibly control this by using an interpreted language. This is the basic rule of the game. - perhaps based on the size of the creature

    allow the creatures to do almost anything. For instance, if you want your creature to be able to scan all surronding squares then it can. But that will take a lot more time than a creature that scans only a single square.

    So a creature that scans only a single square will be able to move a lot faster than a creature that scans a whole bunch, but the latter creature will be a lot smarter....

    have the creature move by replicating itself into the next square(s), and removing itself from the previous square(s)

    the "squares" are equal sized containers for code - say 1000 lines. So a large creature takes more square than a small one.

    the environment contains obstacles....

    the basic resource is time slices. the creature can get more time slices by consuming other creatures and food items in the environment.

    put markers (the heart) in the creatures. Once something has eaten the creatures marker, it's dead.

    a creature has to be right next to another one in order to take a bite out of it.

    (this might be too hard) when a creature take a bite out of the another one, it deletes some of the code of the creature it bit...

  5. #25
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    19

    Post Finally, another attempt

    Here's the server as promised a long time ago
    Just copy it into some dir.
    The client must be copied into the same dir, coz it shares the 'CodeWarCommon' directory.

    have phun
    Kurt

    PS: The few ppl who did take a look at the code, may still fill in this poll.
    http://www.santele.be/codeguru/index.php
    Attached Files Attached Files
    Last edited by Kuruto; November 7th, 2003 at 09:00 AM.
    "GOTO's make your co-workers laugh at you"

  6. #26
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    19

    Post And here comes the client...

    And here's the client as promised a long time ago also
    Just copy it into the same directory as the server, coz it shares the 'CodeWarCommon' directory.

    have phun
    Kurt
    Attached Files Attached Files
    "GOTO's make your co-workers laugh at you"

  7. #27
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: And here comes the client...

    Hey Guys,

    No one has posted anything since Nov. 2003 here, is nobody working on it now ?

    I am sorry if I am asking this in wrong place.

    thanks,
    K
    Regards,
    Ramkrishna Pawar

  8. #28
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    19

    Re: Server and C++ client skeleton code -- BETA

    Correctomundo. I'm the last one who posted, and then nobody ever replied.
    Are you interested?

    K.
    Last edited by Kuruto; June 5th, 2006 at 03:58 AM.
    "GOTO's make your co-workers laugh at you"

  9. #29
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Server and C++ client skeleton code -- BETA

    I would love to, but I don't think I am right guy for this type of project, I am not into game programming at all.
    Regards,
    Ramkrishna Pawar

  10. #30
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    19

    Re: Server and C++ client skeleton code -- BETA

    Quote Originally Posted by Krishnaa
    I am not into game programming at all.
    Me neither
    But it's interesting to learn.
    "GOTO's make your co-workers laugh at you"

Page 3 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center