Extendable game

BlitzMax Forums/BlitzMax Programming/Extendable game

Jeroen(Posted 2005) [#1]
Hi!

I have a question: If you wanted to create, for example, three small games that is extendable with "add on packages" with other small games, how would you do this?

For example:
[Main executable]




extension 1:


extension 2:


etc


I was thinking about this, but making one exectutable (main file) that launches other executables (the games) is not very elegant, and not "intergrated". Each game must work as a "package".

Hard one!


AaronK(Posted 2005) [#2]
I'd possibly look at either DLL's, or some sort of alternative scripting language and write your games in that.

Aaron


ImaginaryHuman(Posted 2005) [#3]
What I'm doing is to create an application which offers an `environment` which is basically able to give you enough room for change that it can be configured to act as several seemingly different games. You can load in new graphics and sounds, load in new settings or prefs, new animation paths or sequences, new maps, that sort of thing. If you make your engine at least a little `generic` - or should I say, open to several different configurations - then it's not too difficult to get it to work with more than one `game` and easy to add extra stuff to it.

Think for example of a flash plugin for a web browser, the plugin doesn't just display a single fixed sequence of objects. It is more open-ended and can be reconfigured to load/display many unique sequences of objects - ie different flash animations.

So instead of thinking of your game as a very fixed, closed, hardwired, one structure only, think of it as more open ended, flexible, adjustable, reconfigurable, then you can have it `morph` into different configurations to present different games or extras.

Also when you move in that direction - toward openness rather than preconceived fixed form - your software starts to turn into a medium, a vessel for creative expression, rather than a solid lump of stubborn code-mud.


Hotcakes(Posted 2005) [#4]
Something you may wish to consider is LUA, there is a LUA module in the ... Module Tweaks or Showcase forums? The downside is there's effectively another language to learn, the upside is it's likely to encourage more development from people outside of the BlitzMax world (ie C programmers)... Or keep your eyes out for BVM2, which could be released... in years ;]


ImaginaryHuman(Posted 2005) [#5]
Yeah scripting is another option, where you build some kind of interpreter or compiler into your application that can run scripts or programs. Lua is apparently good if you are okay about learning the script language. I'm writing my own interpreter with my own kind of programs so that many different apps/games can run in the single environment. Could be the way to go.


Bot Builder(Posted 2005) [#6]
I intend to make a scripting lang in bmax mirroring bmax + a few more features as well. First, however, I'm going to write a preprocessor based upon the parsing engine I'll use for the interpreter and preprosessor.

/me runs off and finishes up the code - to node hierarchy code...


Jeremy Alessi(Posted 2005) [#7]
It's not too hard to just make your own scripting language to control evetns etc... if your game is going to be extendable but the basic premise remains the same it's not too tough at all.


Jeroen(Posted 2005) [#8]
Thank you for the responds. I use BVM in Wobbles but I was hoping for a complete "Blitz" method, no DLL's and such.

Tnx


SSS(Posted 2005) [#9]
well if blitzmax could make dll's (i wish it could would be an amaising feature) then that would be an elegant 'Blitz' method... that would be so good.


Jeroen(Posted 2005) [#10]
SSS; Blitzmax is intended to be cross-platform. Making DLL's would break the consistency of features on a platform (I mean: DLL's can only work on the Windows platform as far as I know). It seems unlikely that Mark would allow DLL creation.


ImaginaryHuman(Posted 2005) [#11]
Some people seem to not care that it's cross platform and are just creating software for their own program regardless. I guess it's subjective as to how people use it regardless of any intensions on Mark's part. You can only lead a horse to water.

That said, I like seeing cross-platform development.


jhague(Posted 2005) [#12]
DLLs are called "shared libraries" under OS X and Linux. Different name, same functionality.


Loonie(Posted 2005) [#13]
what if you "pack" your mini-game in a file? i mean, you would have to write some kind of loader for your file, but i think it would be doable

:)

i think....


ImaginaryHuman(Posted 2005) [#14]
I think extendable games will be the way of the future. Then people will focus more on producing a single refined engine rather than lots of separate ones. The `modding` community seems pretty popular and I recall being excited about the idea of creating my own maps or whatever in various games - an underrated feature.


Loonie(Posted 2005) [#15]
I don't think it's really the way of the future...it's happening now...just look at how games with modding capabilities are doing vs. the ones that don't allow it....it's just gives your games a longer life.

just look a what M$ is doing with XBox Live and their downloadable content......

personally i think this is a very important "feature" to have


ImaginaryHuman(Posted 2005) [#16]
Well that too, it is partially present already, but I think there is going to be more and more focus on it.. is what I'm saying. So we basically agree.


SSS(Posted 2005) [#17]
what would be ideal as a fix until dll's could be set up cross platform which would probably be a huge amount of work would be some kind of importable... dynamic library specific to bmax... i dunno it just doesnt seem like that would be as hard if it were native to bmax different platforms wouldnt be an issue compile once and that's it


Jeroen(Posted 2005) [#18]
it would be nice if Blitzmax created DLL's on Windows, and SO's on Linux/Mac :)


Bot Builder(Posted 2005) [#19]
Yeah... Well, my interpreter will be written in bmax. It'd be handy to compile to dll/so for use in other langs though.