If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Another attempt...

Hi,

The last post was done on 07-02-2003. Long time ago...

My love for this kind of game started when M$ introduced that .NET terrarium. But since .NET was new (and thus difficult), I just read what the purpose was.
In the mean time, RobotWars (that TV show with REAL robots) has been introduced in The Netherlands too, so I'm apparently not the only one who loves this kind of game.

Well back to software, I have read a lot of posts, and I must say that the first step should indeed be creating a working framework. The game should be turn-based, and the framework should be client-server. The client being the robot, and the server being the game where a client can register. The communication should be based on TCP/IP sockets.

Well, enough talk about concepts. I have only seen one post with a proposal for the framework and I thought: lemme post one too. So I started writing some OO code (C++) for the framework starting with the server, and two days later and a lot of sleep less I have a working multithreaded server accepting registrations from clients (read robots or creatures or whatever you would like to call them). The messages that are sent are structs (cf. the framework that was posted). The client starts with a connection and sends a registration command/struct. The server responds with an acknowledge command/struct.
The principle is that a client can send a command to the server only if the server sends a command first (except for the first registration command). You can interprete it like this: the server asks the client if he has something to send. This way, each client gets one turn and the server controls it.

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.

Also it would be too easy to look at the code and copy it. So I suggest you all start writing some code. Dig into threads and sockets and enjoy the trouble that comes along with it.
[Hmmm, I sound evil]

I'm interested. But when I posted the "before-the-last" message, I've been told that the project is still on, but people have a lot to do outside, and are not working much on this project yet.
Neither am I.
But yes, I'm interested, as beginner as I feel among you gurus.

I have another personal project on my heap of todo things, that have not moved forward a lot since 6 months... But I'll keep them on.

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

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.

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.

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.

Rules

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