Background: I am writing my own game language for my own engine. I think in
general the game language should contain short functions for things that are
used often. Things that don't happen too often might be assembled from more
basic functions. Like if you often need a random X, Y coordinate together
something like RandomLocation( 10 ) should exist. While if it only used
rarely it could be assembled like Location.X = Random( 10 ) Location.Y =
Random( 10 )
Some (random) ideas:
Preferably it shouldn't allow one to make fatal mistakes (like free store
management and freeing allocating pointer). A variant type would be nice.
It should be possible to create an object from the resources in the resource
file. i.e. Lets say there is a plane named 'plane1' then something like the
following should be possible.
Plane = new Plane1( SomeLocation )
Plane.Show()
Plane.Hide()
Plane = new Plane2( SomeLocation) //Plane1 is autodestructed since the last
reference is gone
Plane = 4 // Plane2 is destructed, Plane variable now just holds a value of
4
I would expect short functions for things that are used a lot. In a RTS I
think sending a message to objects near another objects should be possible.
// In an object
NearList = GetNearObjects( Self, 100 ) // Get all objects within 100 units
radius (whatever that is :-) )
foreach( NearList => Object )
{
Object.Send( Event Scatter )
}
// In affected objects
Object TankUnit
{
Scatter:
SetLocation( GetLocation() + RandomLocation() )
;
}
It should at any moment be possible to save the game on some event:
Main
{
KeyQuickSave:
QuickSaveGame() // Return from scripting language to save game then
continue with next line
Root.Display.Message( "Game Saved", 2 Seconds )
}
Regards, Ron AF Greve
http://www.InformationSuperHighway.eu
"Shakti" <shakti....@gmail.com> wrote in message
news:fc70fd15-c29d-429c...@e25g2000prg.googlegroups.com...