Hi,
does anybody here have to the intention to initialize a Smalltalk RoboCode project? Günther |
Guenther Schmidt schrieb:
> Hi, > > does anybody here have to the intention to initialize a Smalltalk > RoboCode project? > > Günther Hello Günther, sounds interesting. Do you want to create a RoboCode-Clone or something which is similar to RoboCode? cu, Yogi |
Marc Michael wrote:
> Guenther Schmidt schrieb: > >> Hi, >> >> does anybody here have to the intention to initialize a Smalltalk >> RoboCode project? >> >> Günther > > > Hello Günther, > > sounds interesting. Do you want to create a RoboCode-Clone or something > which is similar to RoboCode? > > cu, Yogi Hi Marc (Yogi?), I myself am quite unable to create either (yet). I just thought it was a most interessting aproach for teaching (and learning) java. Well ok, as for me not interessting enough to learn java. But I browsed through it and thought it would help getting started with Dolphin in a quite interessting way. It's a pitty that you have been the only one replying sofar, I thought it was a rather good idea. Regards Günther |
Guenther Schmidt wrote:
> It's a pitty that you have been the only one replying sofar, I thought > it was a rather good idea. Perhaps because not many people know what RoboCode is ? I haven't heard it mentioned outside the Java community (and not often there); in fact I only remembered at all when you mentioned Java. But creating a Smalltalk version looks like quite a fun project to learn from, though it might be a bit ambitious. -- chris |
In reply to this post by Günther Schmidt
Guenther Schmidt schrieb:
> Marc Michael wrote: > >> Guenther Schmidt schrieb: >> >>> Hi, >>> >>> does anybody here have to the intention to initialize a Smalltalk >>> RoboCode project? >>> >>> Günther >> >> >> >> Hello Günther, >> >> sounds interesting. Do you want to create a RoboCode-Clone or >> something which is similar to RoboCode? >> >> cu, Yogi > > > Hi Marc (Yogi?), > > I myself am quite unable to create either (yet). I just thought it was a > most interessting aproach for teaching (and learning) java. > > Well ok, as for me not interessting enough to learn java. But I browsed > through it and thought it would help getting started with Dolphin in a > quite interessting way. Yes, it reminds me to my first experience with Dolphin. I've created a class Warrior, created to instances and leted them fight against. In a FlipperInpector I was able to look how the lifeenergy decreases. This was very funny to me, because it looked like Diablo or Command&Conquer to me. And it shows me nice things about Dolphin: I was able to look inside the objects without to write debugcode; I've extended my class Warrior with the attribute strength, and my two instances simply use it. This was an amazing observation to me. > > It's a pitty that you have been the only one replying sofar, I thought > it was a rather good idea. But I don't know if it's easy to create a game such RoboCode in Smalltalk, because of the advantage of Smalltalk: Every object is able to explore the system and search e.g. for the position of the enemy. I think, a good solution is a client/server based system. At the start of the development, the World and the Bot can be set in the same image, connected through a special ConnectionObject. If the framework is stabilisized, the World can be pulled out into a seperate image and the special ConnectionObject will be extended to establish a connection to another ConnectionObject through a socket, for example. But, as Chris has written, after I've looked through the web, it's not realy an easy project. But it's worth to think about it. cu, Yogi > > Regards > > Günther |
Marc Michael wrote:
> Yes, it reminds me to my first experience with Dolphin. I've created a > class Warrior, created to instances and leted them fight against. In a > FlipperInpector I was able to look how the lifeenergy decreases. This > was very funny to me, because it looked like Diablo or Command&Conquer > to me. And it shows me nice things about Dolphin: I was able to look > inside the objects without to write debugcode; I've extended my class > Warrior with the attribute strength, and my two instances simply use it. > This was an amazing observation to me. This is /exactly/ what I think is so wonderful about Smalltalk IDEs (and not just for beginners either). The objects are real, they are alive, and you can interact with them right from the start. There's nothing to beat that. > I think, a good solution is a client/server based system. [...] Myself, I'd approach it the other way around. Start with everything in one image (world and robots) controlling them from a workspace. If that worked to your liking, then you could create a GUI for controlling the world. You might even get into rendering the robot world as graphics. Later on (maybe much later on) you could think about networking and creating some sort of shared server. (One reason for that ordering is that its nice to be able to /see/ your robots -- much more satisfying than messing around with networking code) -- chris |
Chris Uppal wrote:
> Marc Michael wrote: >>I think, a good solution is a client/server based system. [...] > > > Myself, I'd approach it the other way around. Start with everything in one > image (world and robots) controlling them from a workspace. If that worked to > your liking, then you could create a GUI for controlling the world. You might > even get into rendering the robot world as graphics. Later on (maybe much > later on) you could think about networking and creating some sort of shared > server. (One reason for that ordering is that its nice to be able to /see/ > your robots -- much more satisfying than messing around with networking code) Yes, this is the way I would go. The difference in my idea is, that the robots and the world doesn't talk directly to each other, but through a connector. This connector simply moves the messages to the receiver. The advantages on this is, that you later change the connector to move this messages through a socket. If there's no connector, the internals of the robots and worlds must be changed to move the messages through a socket, I think. I've tested it: I've started two images and send an object from one image to the other through a socket connection. Dolphin provides methods in the classes ServerSocket and Socket to simply send objects through a socket. Not only strings. Nice, nice. But for now, I've created a class Robot. The public methods are: speed: speed bodyDirection: bodyDirection position No WorldClass yet. The speed is given in units/serconds, bodyDirection in degrees and position in units. All is calculated in realtime. The position will be only calculated as needed: if the speed changes, if the bodyDirection changes or if the position is requested. The problem which arises is: collision detection. If I have 2 robots, the world could poll their position every second and compare their position. But this doesn't work, because, if one robots drive fast, like 100 units/sercond, he simply drives through the other robot. So, how is this done in games like Command&Conquer? I think there's the same problem. The tanks are driving automaticaly. They are driving around obstacles or react to enemy tanks. Just in this moment I have a flash in my head: no realtime! The time is measured in ticks. The world gives the speed of the time. At every tick, which is a message from the world to the robots, the robots recalculate their states. The fastest possible speed of a robot is less than 1 unit/tick. If the world doesn't send ticks, the game is paused. Nothing happens. Is this the reality? cu, Yogi |
"Marc Michael" <[hidden email]> wrote in message
news:chc4iq$l6u$[hidden email]... ... > The problem which arises is: collision detection. If I have 2 robots, > the world could poll their position every second and compare their > position. But this doesn't work, because, if one robots drive fast, like > 100 units/sercond, he simply drives through the other robot. So, how is > this done in games like Command&Conquer? I think there's the same > problem. The tanks are driving automaticaly. They are driving around > obstacles or react to enemy tanks. > > Just in this moment I have a flash in my head: no realtime! The time is > measured in ticks. The world gives the speed of the time. At every tick, > which is a message from the world to the robots, the robots recalculate > their states. The fastest possible speed of a robot is less than 1 > unit/tick. If the world doesn't send ticks, the game is paused. Nothing > happens. Is this the reality? You may wish to have a look at a little game I wrote in Dolphin a while ago. It was a lot of fun to write. You can find it with source code here: http://www.mitsci.com/smalltalk/CJDSimpleGame.htm Chris |
Free forum by Nabble | Edit this page |