Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Requirement for a Programming Language for Games

0 views
Skip to first unread message

Shakti

unread,
Feb 28, 2008, 3:56:31 AM2/28/08
to
Hi All,
This is a general thread I am starting to discuss the issue of
existing programming languages for games and also what more is needed
in a language. So suppose I ask like this "Given a choice for a Game
programming language, what all features would all like in that.". I
know it depends on the type of game that people are using. So lets
make it more specific, like Strategic games. This i need as a study
for the programming language features that still needs to be enhanced.

Ron AF Greve

unread,
Mar 15, 2008, 9:17:02 AM3/15/08
to
Hi,

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...

0 new messages