New Game a Challenge!

XanMag
04 Dec 2015, 22:49
My 'tweener game before X3 is going to be a challenge for me to write. I plan on creating a game that is ALL about my weaknesses as a game writer using Quest.

I plan on making a dungeon crawler, turn based attack game where a player can accumulate coin and equipment. The equipment can be returned safely out of a dungeon and combined for use at a blacksmith/magic forging table/etc. The coin can be used for boosts and pots and gear upgrade items. The player will have stats that are influenced by level and worn equipment. There will be an end game dungeon.

So... I'm wondering a couple of things.

1. I've never used libraries before. I would like to try and avoid them because the whole point of me writing this game is to get better at things that I am not good at. If I rely too much on libraries, I 'm not sure I'll learn what I want. BUT... just in case, how do you use a library? Is it as simple as copying it from the library forum and pasting it into the game library?

2. As if you aren't already, will you all be incredibly annoyed at the loads of questions I am going to ask?!? Believe it or not, asking on the forum is a last resort! That's how clueless I am! :lol:

3. Are there any other similar games that I might be able to take a look at?

4. And, other than libraries, where might I look for coding help?

Sorry for all the dumb questions! Thanks!

XanMag

HegemonKhan
05 Dec 2015, 02:40
USING LIBRARIES:

Organization: Compartmentalize, Compartmentalize, Compartmentalize!

you could have your entire code (game software, OS software, other software, or whatever else) be in a single file... but we humans need to split that code up into multiple files for our sanity. This is concept of~for libraries, modules, game mods, patches, updates, upgrades, versions, game xpacs (expansion packs), and etc. All of these things, are just files of code, which will be used~applied (directly or indirectly) to the main code file.

The quest engine is built via multiple library files, the default being the 'english.aslx' file and then the 'core.aslx' file (actually this is just an 'addresses book or a hub' of many 'core' files that the quest engine will find, get, and include into or for the main file ~ if you look into the actual quest folder, you can see all of these 'core' library files which make up the quest engine). So, if you're a good programmer, you can create your own entirely unique game engine with quest. Quest is extremely 'modable', imagine not jsut merely being able to make mods for skyrim, but to make your own 'my skyrim' engine (such as maybe a sci-fi themed game engine as opposed to its dark medieval fantasy theme).

So, a library file (which uses the same extension of 'library_file_name.aslx' as your game file 'game_file_name.aslx', btw), is simply (extra) code that will be added to your game file's code automatically by quest upon the game's initialization (the game's startup by someone playing the game), so long as you properly add the library file, which we'll talk about now.

to have library files being used by your game:

(we're ignoring multi-layered 'include ref'~inheritances, to keep it simple, if you already understand this, then great, but otherwise, let's ignore it)

1. you must have the library files, physically, be in the same folder as your quest.exe file, for quest to be able to find and use your library files.

2. within your game file, you need to use the, <include ref="library_file_name.aslx" />, tag code line for each of your library files, see the any game quest file to see where to place them.

3. important note, unlike most of your code where vertical placement doesn't matter, it DOES with library files, as these are used to build-up (initialization) your game for playing. Let's pretend that playing our game, is akin to constructing a building, since we got gravity, you have to first construct the foundation, and then work your way up, ie you can't build the 'roof-ceiling' before you've built the walls. For example, try putting the 'core.aslx' file above the 'english.aslx' file, it may cause your game not to initialize (I haven't tested it myself). So the vertical placement matters as that's the order that your game (its code) is built-up (initialized) to be a playable game for someone. From upper to lower.

and literally, that's it for adding~using library files.

-----------------

or, if you understand the code structure, you can just copy and paste the entire codes or just desired sections of libraries' codes into your game file's code too. But usually, you're using a library as you want to use its entire code (as it is often providing you a system), in which case, it's much easier and quicker to use the non-copy-n-paste code method described at the top of this post, as this way you're ensured the library is properly added to your game file code, whereas you can make mistakes with copying and pasting.

-------------------

the hard part is in learning how to work with the libraries in using them to develop your game, as you got to understand how they work, using the same code names~labels and etc, to be able to work with the libraries, to develop your game with their features~abilities.

----------------------------

CREATING~WRITING LIBRARY FILES:

it's just like the game file, same '.aslx' extension, you write in your various code segments into the library file, with the only difference of using:

<library>
// your mass of code:
// maybe a function here
// maybe an object here
// etc etc etc
// look at other peoples' library files to understand if not clear
</library>

vs the game file's using of:

<asl version="550">
// your mass of code
</asl>

--------------

for your other questions...

you should've been reading all of my posts! (joking) :D

find people who're working on and~or know RPG stuff, me, neonayon, all of the good coders (users and site mods), and etc people

use~study RPG libraries~guides~code samples (Jaynabonne's, Pixie's, Pertex', Chase's, Sora's, HK's, etc's), and~or threads-posts of code on RPG stuff

use~study the 'how to (guides)' in the quest doc site

use~study the quest doc site

etc etc etc

The Pixie
05 Dec 2015, 10:37
First see the PM I sent you.

This is the library I created:
viewtopic.php?f=18&t=4886

If you do nothing else take a look at how much code I had to write for a relatively simple system.

If you really want to reinvent the wheel, look at this "How to" page, and go down to the "Advanced" section:
http://docs.textadventures.co.uk/quest/guides/

... and read these five guides:

Use Types
Use Types and Tabs
More on Tabs (implementing a magic system)
Simple Combat System
Second Inventory Pane (listing spells for your magic system)

I wrote them whilst developing the libary I linked to above.

The other side of the issue is working out how the game will work. Imagine you are playing it on paper and rolling dice, what are the rules?

What are the effects of armour or a shield?
How do you handle ranged attacks (can you shoot an arrow from an adjacent room perhaps; does an attacker get a bonus if you are holding a bow)?
Parrying?
Positioning (flanking, back-attack, higher ground)?
What is the difference between attacking with a dagger or a polearm or a flail?
Do you track injuries by location or just total hits; what about healing?
How can magic affect combat; bonus to attack, to armour, to defence, etc.?
Does casting magic use power points, use up the spell or what?
What about magic items?
What statistics define the player, and how are they meaningful in play (why would a player want to have a good charisma)?

You really need to have these clear in your mind before you even start coding.

XanMag
05 Dec 2015, 13:05
Hmmm... Thank you. I do want to try this even if it ends up being relatively simple. I need to learn this stuff to do some things in game making that will make my games better. Will definitely use this info. Thanks both!