Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [Ann / Help Requested] A nerdy multiplayer game "ants".

Reply
Thread Tools

[Ann / Help Requested] A nerdy multiplayer game "ants".

 
 
Brian Schröder
Guest
Posts: n/a
 
      09-29-2004
Hello Group,

I hate to put something into the open before it is completely finished,
but time is running out for me.

I'll give a course on ruby for CS students next week. The program I want
to have finished at the end of the course is a kind of a multiplayer
game. It simulates a simple ants world, and the clients have to
implement some kind of AI to steer the ants through their life.

Because I'm not a ruby guru, and I want to teach them "the real ruby
way" I ask you to donate a bit of your time to look at the source and
make improvement suggestions.

I aim on having a compact but readable implementation, that I will be
able to explain.

One thing on which is not too clear to me is how secure my
implementation is.

The source and more information can be found at:

http://ruby.brian-schroeder.de/ants/

Everybody who helps and makes it to Freiburg will be invited on a good
german beer

kind regards,

Brian


PS: Maybe we could elaborate the ants theme to a ruby-quiz?
--
Brian Schröder
http://ruby.brian-schroeder.de/


 
Reply With Quote
 
 
 
 
Gavin Kistner
Guest
Posts: n/a
 
      09-29-2004
On Sep 28, 2004, at 6:32 PM, Brian Schröder wrote:
> Because I'm not a ruby guru, and I want to teach them "the real ruby
> way" I ask you to donate a bit of your time to look at the source and
> make improvement suggestions.
> [...]
> http://ruby.brian-schroeder.de/ants/


I don't have either the time or expertise to fully investigate what
you've done here, but I wanted to comment on how similar are your
Observable module:
http://ruby.brian-schroeder.de/ants/...rvable-rb.html
and my EventTarget module:
http://phrogz.net/RubyLibs/EventTarget.rb

I changed mine to use symbols rather than strings after I saw yours,
since it's more Ruby-ish. (I had already decided yesterday morning to
use blocks by default and force &foo for existing method passing.)

I like how yours allows for 'forwarding along' arbitrary parameters,
although I feel like I prefer more structure in my life. (Said
structure being a discrete Event object with specified methods which is
used to shuttle data between the signal and the receiver.) It feels
like it provides a bit more de-coupling between the sender and the
receiver.

Your names are cleaner; mine are sort of ugly and confusing for the
sake of consistency with the DOM 2 Events model.

Oh, and BTW, you have two typos in your Usage example:

> observed.register(:foo) do | obeserved, *args |

I'm guessing that shouldn't be "obeserved"...should it be 'observed'
(to match your usage in the string?) or something else (is there a name
collision with the parameter passed to the initialize method)?

> puts "Observered object #{observed} signalled foo with arguments

#{args.inspect}
I'm guessing 'Observered' should be 'Observer' or 'Observed'.
--
(-, /\ \/ / /\/




 
Reply With Quote
 
 
 
 
James Edward Gray II
Guest
Posts: n/a
 
      09-29-2004
On Sep 28, 2004, at 7:32 PM, Brian Schröder wrote:

> Hello Group,
>
> I hate to put something into the open before it is completely
> finished, but time is running out for me.


This is a fun project. Was it inspired by this year's ICFP contest?

I've been browsing through your source and it looks very nice to me.
Naturally, some docs would help a lot.

As far as the game goes, I would like to see more complicated boards.
Even the ICFP simulator had obstacles (rocky terrain) and the
programming environment there was far more restricted. You have a full
programming language to play with, so problems like pathfinding are
much more reasonable. Might as well take advantage of that, I say,
opening up the possibility for some clever ant creations.

> PS: Maybe we could elaborate the ants theme to a ruby-quiz?


As a died-hard gamer, I'll be very sad if you don't submit this idea,
when it's ready.

James Edward Gray II




 
Reply With Quote
 
Brian Schröder
Guest
Posts: n/a
 
      09-29-2004
Gavin Kistner wrote:

> On Sep 28, 2004, at 6:32 PM, Brian Schröder wrote:
>
>> Because I'm not a ruby guru, and I want to teach them "the real ruby
>> way" I ask you to donate a bit of your time to look at the source and
>> make improvement suggestions.
>> [...]
>> http://ruby.brian-schroeder.de/ants/

>
>
> I don't have either the time or expertise to fully investigate what
> you've done here, but I wanted to comment on how similar are your
> Observable module:
> http://ruby.brian-schroeder.de/ants/...rvable-rb.html
> and my EventTarget module:
> http://phrogz.net/RubyLibs/EventTarget.rb
>
> I changed mine to use symbols rather than strings after I saw yours,
> since it's more Ruby-ish. (I had already decided yesterday morning to
> use blocks by default and force &foo for existing method passing.)
>
> I like how yours allows for 'forwarding along' arbitrary parameters,
> although I feel like I prefer more structure in my life. (Said
> structure being a discrete Event object with specified methods which
> is used to shuttle data between the signal and the receiver.) It feels
> like it provides a bit more de-coupling between the sender and the
> receiver.
>
> Your names are cleaner; mine are sort of ugly and confusing for the
> sake of consistency with the DOM 2 Events model.
>
> Oh, and BTW, you have two typos in your Usage example:
>
> > observed.register(:foo) do | obeserved, *args |

> I'm guessing that shouldn't be "obeserved"...should it be 'observed'
> (to match your usage in the string?) or something else (is there a
> name collision with the parameter passed to the initialize method)?
>
> > puts "Observered object #{observed} signalled foo with arguments

> #{args.inspect}
> I'm guessing 'Observered' should be 'Observer' or 'Observed'.
> --
> (-, /\ \/ / /\/
>
>

Thank you for looking into it. As written in the header, most of the
observable stuff is taken from a source I don't recall at the moment.
One problem with the implementation is, that it is quite difficult to
deregister, if you don't save the original proc somewhere.

Thanks also for the corrections. Things like this are always slipping,
and I'm not a native english speaker (obviously .

Regards,.

Brian


 
Reply With Quote
 
Brian Schröder
Guest
Posts: n/a
 
      09-29-2004
James Edward Gray II wrote:

> On Sep 28, 2004, at 7:32 PM, Brian Schröder wrote:
>
>> Hello Group,
>>
>> I hate to put something into the open before it is completely
>> finished, but time is running out for me.

>
>
> This is a fun project. Was it inspired by this year's ICFP contest?
>
> I've been browsing through your source and it looks very nice to me.
> Naturally, some docs would help a lot.
>
> As far as the game goes, I would like to see more complicated boards.
> Even the ICFP simulator had obstacles (rocky terrain) and the
> programming environment there was far more restricted. You have a
> full programming language to play with, so problems like pathfinding
> are much more reasonable. Might as well take advantage of that, I
> say, opening up the possibility for some clever ant creations.
>
>> PS: Maybe we could elaborate the ants theme to a ruby-quiz?

>
>
> As a died-hard gamer, I'll be very sad if you don't submit this idea,
> when it's ready.
>
> James Edward Gray II
>
>

Thanks for looking at the source.
Missing docs shure are a problem. I have to take some more time, the
problem is that I'm graduating and I`'m in the middle of my finals. So
it now seems like a stupid idea to give the course, because it is much
more fun than learning my stuff

I chose a really simple environment, because I did not want it to get
too complicated. People who have been in contact with ruby only four
days should understand it. But it is shure that I'd really like to dive
deeper into this. Only that there is no time for that.

regards,

Brian


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiplayer web game in Java dydo Gaming 2 02-09-2013 09:21 AM
j2me multiplayer mobile 2d racing game vish_dude Java 1 11-01-2007 02:28 AM
new multiplayer game (made with pygame) platform maxime_phan@hotmail.com Python 0 10-20-2006 08:35 AM
my first 3D Multiplayer game using directplay (troubles with AppWizard's code) Lt C++ 5 10-23-2004 01:08 PM
multiplayer online quizz game - can python help me? Tlo Python 5 01-08-2004 07:17 AM



Advertisments