pytohn interpreter - yea or nay ?

pytohn interpreter - yea or nay ?

Postby paul424 » 03 Jun 2016, 16:39

pytohn interpreter - yea or nay ?

Some code could be moved to python and load as script during program run .
Also think about editor : we could directly type expresssions to get something on editor map :
like
foreach ( ii =0 ; ii < mapSizeX() ; ii++)
foreach (jj =0 ; jj < mapSizeY() ; jj++)
if(ii + jj %= 0 )
setTile[ii][jj] = gold
else if
setTile[ii][jj] = dirt



etc.
Does anyone have other ideas for python usage ?
User avatar
paul424
OD Moderator
 
Posts: 638
Joined: 24 Jan 2012, 13:54

Re: pytohn interpreter - yea or nay ?

Postby hwoarangmy » 07 Jun 2016, 16:15

having a scripting language may be interesting but I'm not sure if it is worth the work to add it.
Your example seems pretty bad to me as defining a map such as you did will only create awfull maps. From what I've seen, widelands (another open source game) more or less uses it and I think that their editor most likely handle it but that's not our case.
IMHO, the most common use for such things will be the campaign. That would allow to define custom events (creature spawn when something happens, ...), camera behaviours (moving the camera somewhere when a certain tile is dug, ...), displaying some popup explaining something in the story at some point...
To do such things we only have 2 ways:
- Using a scripting language such as AS, LUA or python (From what I've seen, most open source games seem to use LUA - at least UFO AI and widelands so I would go for it).
- Hardcode some commands in the level file just like we did for the other things (goals, seats, ...)
hwoarangmy
 
Posts: 565
Joined: 16 Apr 2014, 19:13

Re: pytohn interpreter - yea or nay ?

Postby Loobinex » 07 Jun 2016, 22:17

Personally I feel that levels without scripting are only useful for multiplayer. And even multiplayer maps can be significantly enhanced by a level script.
Without it, all levels are kinda samey, as can be seen by the many hundreds of completely uninteresting maps released by random people who could not script for the DK games.

A script allows a mapmaker to turn a map into a level, to give it structure, progress, goals or surprises. It allows enemies to appear on complex conditions, or it allows the player to be rewarded when specific conditions are met. "When only one wizard lives, dwarves will attack from the hero gate, when all of them are defeated the player can build a crypt."
Multiplayer maps get flavor the same way, where a few simple conditions on a map can make a game play out completely different from other levels, requiring other strategies.
Loobinex
 
Posts: 14
Joined: 30 Mar 2016, 22:29

Who is online

Users browsing this forum: No registered users and 1 guest