This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-04-14 11:00:53

Mitmat
Scratcher
Registered: 2010-01-17
Posts: 7

Use Scratch to program units of a real time strategy game

Hello,

During my PhD, I've worked on serious games for programming practice. I've developed two serious games based on Kernel Panic (an existing RTS: http://springrts.com/wiki/Kernel_Panic) and the Prog&Play library (I designed several interfaces in C, Ada, Java, OCaml and Scratch).

I have designed a patch for Scratch (v1.4) in order to add my new Prog&Play category and its corresponding blocks. This patch will allow you to program RTS units' AI using Scratch.

If someone is interested by this work, you will find more informations at http://www.irit.fr/ProgAndPlay/index_en.php

Last edited by Mitmat (2011-10-17 06:31:50)

Offline

 

#2 2011-04-14 12:35:19

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Use Scratch to program units of a real time strategy game

I've downloaded it and opened the .image file. It looks pretty interesting but I can't seem to get the example to run. When I try each of the 'ProgAndPlay' blocks individually, I always end up with 'Error!' or the block ends up obsolete.

Any ideas why that might be?

Offline

 

#3 2011-04-19 07:20:21

Mitmat
Scratcher
Registered: 2010-01-17
Posts: 7

Re: Use Scratch to program units of a real time strategy game

In order to use Scratch with "ProgAndPlay's blocks", you have to install a game compatible with Prog&Play. Perhaps it is disturbing for Scratcher, but the consequences of the execution of Prog&Play's blocks are not abservable into the Scratch window but into an other program, the video game.

So, you can't execute Prog&Play's blocks when the game is not running

Some additional news : Prog&Play is a software library that provides commands to interact with an RTS (http://en.wikipedia.org/wiki/Real-time_strategy). Prog&Play is currently compatible with all games stemming from "Spring engine" (http://springrts.com/). In my experimentations, I used one of them : "Kernel Panic" (http://springrts.com/wiki/Kernel_Panic). From this game, I designed two serious games : "Kernel Panic Campaign" and "Byte Battle".
1 - The first (Kernel Panic Campaign) immerses the player into an original scenario where s/he must program Bits, Bytes and Assemblers  in order to raise an army and topple enemy. The game scenario is divided into missions that take him/her around the story and bring him/her toward the final objective.
2 - The second(Byte Battle) puts the player in competition with an other player (that can be played by computer). Each player controls the same number of Bytes. The objective consists in destroying all enemy Bytes. The end of the game depends on the strategy planned and its implementation.
So, with Prog&Play's blocks you can access game data like map size, units position, units health, ... and give order to units like move to a position, attack an enemy, ...

So, if you want test the game, you need :
1 - the video game compatible with Prog&Play, you will find it at the following address : http://www.irit.fr/ProgAndPlay/ressources/jeux_2.3.zip. You will find informations to start it in the following address : http://www.irit.fr/ProgAndPlay/progAndP … ion_en.php
2 - the Prog&Play patch for Scratch that includes ".image" and some ".dll", you will find the patch at the following address, unzip it and read the README.txt file to know how to proceed : http://www.irit.fr/ProgAndPlay/ressourc … ch_2.3.zip

Last edited by Mitmat (2011-10-17 06:34:03)

Offline

 

Board footer