O'Reilly logo

Going to War: Creating Computer War Games by Jason Darby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding Terrain Movement

Everything is now in place, ready for you to program the logic in the event editor. Click on the event editor button to see the events that have already been programmed. Everything should look familiar to you, with three dinosaur groups, which have replaced the two plane groups we had previously for the plane units. This is because we are using three units in this example rather than two.

If you run the application now, you will see that the three dinosaurs move across the map in the same way that the planes did. The only difference is that the first dinosaur has only three movement points, while the other two dinosaurs have five. The reason for this is that we want the first unit to only have three movement points because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required