Extendable game
BlitzMax Forums/BlitzMax Programming/Extendable game
| ||
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! |
| ||
I'd possibly look at either DLL's, or some sort of alternative scripting language and write your games in that. Aaron |
| ||
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. |
| ||
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 ;] |
| ||
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. |
| ||
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... |
| ||
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. |
| ||
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 |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
DLLs are called "shared libraries" under OS X and Linux. Different name, same functionality. |
| ||
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.... |
| ||
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. |
| ||
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 |
| ||
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. |
| ||
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 |
| ||
it would be nice if Blitzmax created DLL's on Windows, and SO's on Linux/Mac :) |
| ||
Yeah... Well, my interpreter will be written in bmax. It'd be handy to compile to dll/so for use in other langs though. |