Programming a new game

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
steaky1212
Posts: 1
Joined: Thu Sep 03, 2009 11:21 am

Programming a new game

Post by steaky1212 »

Hi,

I've searched the forums, and read the FAQ but I am still confused.

The FAQ suggests using SDL and LUA/Python for writing new games - I am looking at a way of delivering episodic content to a large amount of people and since ScummVM is ported to almost every console needed, this would be an ideal platform to do it on.

Would writing a game to run in ScummVM be possible/doable, and how would I go about doing it? Otherwise, what do you suggest I do instead?

Many thanks in advance.

Stephen
billwashere
Posts: 63
Joined: Sat Feb 14, 2009 8:43 am
Location: Australia

Post by billwashere »

1) Learn the programing language C++
2) Read all of http://wiki.scummvm.org/index.php/Developer_Central
3) Download the sourcecode to lua or use the lua engine from Residual http://sourceforge.net/projects/residual
4) Using the steps from 1,2 and 3 write the engine.
User avatar
maximus
Posts: 102
Joined: Sun Jan 06, 2008 4:17 pm
Location: Toronto, Ontario

Post by maximus »

billwashere wrote:1) Learn the programing language C++
2) Read all of http://wiki.scummvm.org/index.php/Developer_Central
3) Download the sourcecode to lua or use the lua engine from Residual http://sourceforge.net/projects/residual
4) Using the steps from 1,2 and 3 write the engine.
Um, being a good programmer isn't really enough to make a decent game. Though I would agree that ScummVM is an excellent toolkit to facilitate game development, if you're not a programmer, something like AGS may make a bit more sense ;)
KuroShiro
Posts: 473
Joined: Thu May 15, 2008 7:42 am
Location: Somewhere Out There

Re: Programming a new game

Post by KuroShiro »

steaky1212 wrote:Hi,

I've searched the forums, and read the FAQ but I am still confused.

The FAQ suggests using SDL and LUA/Python for writing new games - I am looking at a way of delivering episodic content to a large amount of people and since ScummVM is ported to almost every console needed, this would be an ideal platform to do it on.

Would writing a game to run in ScummVM be possible/doable, and how would I go about doing it? Otherwise, what do you suggest I do instead?

Many thanks in advance.

Stephen
ScummVM isn't really meant to be something to develop new games on; it is a virtual machine to run various old games on multiple platforms. I'm sure they'd always appreciate someone working on a new engine to run an already existing game, but as maximus said if you are looking for something to facilitate actually making a new game, I would suggest AGS for adventure games and RPG Maker (there are many versions) for jRPG style games.
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Re: Programming a new game

Post by bobdevis »

steaky1212 wrote: The FAQ suggests using SDL and LUA/Python for writing new games - I am looking at a way of delivering episodic content to a large amount of people and since ScummVM is ported to almost every console needed, this would be an ideal platform to do it on.
Stephen
The most robust way to make a multi platform game is probably the C++ and libSDL combo. This covers Win/Mac/Linux and various smartphones.

You are saying that ScummVM would be nice to use because it runs on consoles too. However you need a HACKED Wii, a HACKED Xbox or a PS3 classic with Linux installed to run ScummVM on those.
If you want to destribute your stuff to the console gamers in an easy and legal way. You will have to use the (expensive!) development tools of the console manufacturers. ScummVM can not be mixed with those due to legal reasons and the console manufacturers terms.
Last edited by bobdevis on Fri Sep 04, 2009 2:00 am, edited 1 time in total.
User avatar
maximus
Posts: 102
Joined: Sun Jan 06, 2008 4:17 pm
Location: Toronto, Ontario

Re: Programming a new game

Post by maximus »

KuroShiro wrote: ScummVM isn't really meant to be something to develop new games on; it is a virtual machine to run various old games on multiple platforms. I'm sure they'd always appreciate someone working on a new engine to run an already existing game, but as maximus said if you are looking for something to facilitate actually making a new game, I would suggest AGS for adventure games and RPG Maker (there are many versions) for jRPG style games.
ScummVM isn't a VM, it's basically a replacement for the original executable ;)

The reason ScummVM is awesome for engine re-implementation is that it provides a solid framework for handling common functions in a platform-independant fashion; tasks such as string handling, list manipulation, audio/video processing .. etc.

If you're making a new game, you've gotta worry about writing the script, generating the game assets (graphics, video, audio ... etc). The games being re-implemented already have all this done, so the programmers are just writing the engine to run all this content on different systems without the need to create it themselves.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

ScummVM is a VM (Virtual Machine) it can also be called an interpreter. (The original EXE or executable is also a VM)

A virtual machine is just a software layer that you program for, meaning you create a program once for this virtual platform and leave the interpreter or virtual machine program to make it run on whatever system you want.

Other examples are Java & Z-Machine.

(This is my understanding feel free to correct me if I have misunderstood something.)
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis »

Eugh..... semantics.....

ScummVM can be called a vm, simply because how (most) games it supports run. There is a machine code part that interprets the script part. ScummVM replaces the machine code part with what is suitable for your processor but the script (game files) part stays the same. This definition of vm is here like the Java VM.
This is fast, but you need to redo (recompile) the machine code part for every hardware/OS combo.

An other distinct meaning for vm is running something inside a wrapper that originally wasn't meant to be run in a wrapper. This is like Xen/VirtualBox/VMWare operate. The machine code stays the same but the environment the machine code runs in is faked.
This is reasonably fast but the processor needs to stay of the same type as needed for the application or this wont work.

There is a third meaning. This is usually called an emulator and is like Dosbox/Boches operate.
The whole computer, including processor type, get faked.
This is slow, but will work on any hardware and OS.
Last edited by bobdevis on Fri Sep 04, 2009 1:54 am, edited 1 time in total.
User avatar
maximus
Posts: 102
Joined: Sun Jan 06, 2008 4:17 pm
Location: Toronto, Ontario

Post by maximus »

Wouldn't a VM assume that the content it's running is platform agnostic in that it's compiled to a custom form of bytecode that the VM runs? The VM itself is compiled against a number of platforms, whereas the bytecode package could be ported as-is and assumed to run exactly the same.

The engines in scummvm are compiled on for the platform in question, not run "on" the VM. The libraries scummvm provides are what is cross-compatible, not the application itself.

Either way, we've derailed this thread nicely ;)
seubz
Posts: 41
Joined: Sat Aug 11, 2007 1:24 am

Post by seubz »

ScummVM is a VM in the sense that it reads bytecode from different games. As a simple example, we can mention the SCUMM engine which reads compiled scripts (bytecode) from resource files.
User avatar
maximus
Posts: 102
Joined: Sun Jan 06, 2008 4:17 pm
Location: Toronto, Ontario

Post by maximus »

seubz wrote:ScummVM is a VM in the sense that it reads bytecode from different games. As a simple example, we can mention the SCUMM engine which reads compiled scripts (bytecode) from resource files.
Ah, but that would make the scumm engine the vm, not scummvm itself the vm ... and now we are in fact arguing semantics :P

Anyhoo, check here for some game creation resources ... and I apologize for being needlessly difficult :P
zorbid
Posts: 66
Joined: Sun Nov 27, 2005 6:41 pm

Post by zorbid »

ScummVM has a three tiered software architecture.

The frontends, a collection of VMs that each run a subset of the supported games bytecode and handle game specific logistics like pathfinding, rendering, effects/, and build upon the middle-end.

The middle end is composed of
* an API for graphics, sound, event/timings, and other programming facilities as described above.
* the implementation of some of this API when it is possible to write true cross-platform code.
* Code that is commone to several original engines and doesn't need to be replicated in every frontends.

The backends are the ports, the platform specific code. They implement the rest of the API mentioned above, as well as game/port specific features (eg how to implement keyboard based fight in Indy3 on an Iphone).

-

Billywashere is right, one could actually build a cross-platform game engine by discarding the frontends, then plugging a portable VM (Lua is an excellent choice), on top of the last two layers.

This will require a fair amount of skills and time though. The added code will have to be memory aligned and endian independant in order to run on all supported devices, and the coder will have to set up the compiler environment for each targetted platforms (look for info about the buildbot for some of these).

-

Another option would be to use an existing front-end and create 1) a custom compiler to target it 2) a custom development environment (to convert the resources to the proper graphics and sound formats). There are two Scumm compilers (ScummC and another one, search this forum), but, since Scumm is at least partly patent encumbered, it is probably not a good idea to build any with commercial or large scale project on it, it's just begging for a lawsuit.

There is an AGI developement environment that could be used to create games that run on ScummVM out of the box, but the features of the engine are very limited (160*200*16colors resolution, poor sound etc).
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

To anybody who wants to create an original new game, I can only say one thing: Don't use ScummVM. It will just encumber you and gain little to nothing that you can't also achieve by using SDL, an existing emedable scripting language (e.g. Lua, some Scheme dialect, Python, ...), plus careful portable coding. In fact, the latter is highly important even if you use ScummVM -- high portability doesn't come for free, not even in the ScummVM "framework".

Really, ScummVM doesn't provide a shortcut to you, it's an illusion to think that.
User avatar
lazylazyjoe
Posts: 131
Joined: Mon Oct 01, 2007 4:14 pm

Post by lazylazyjoe »

Sci Studio creates SCI0 games which Scummvm handles very well now. There are lots of tools to help development at The Ultimate AGI & SCI Web Site. That would be the ideal engine to use if one really wants to distribute their game with Scummvm. It might make sense to distribute your game w/ a version that disables the other engines for some platforms. Ofcourse you could make any changes you need since the code is gpl'd.
Action Script for Flash could also be used. Almost everyone has flash and its on a lot of OSes.
See http://en.wikipedia.org/wiki/Category:A ... me_engines for other scripting choices.
The idea has been brought up before http://forums.scummvm.org/viewtopic.php ... ght=sludge
Post Reply