RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page 1, 2, 3, 4  Next 
View previous topic - View next topic  
Author Message
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Sun Jan 24, 2010 11:14 pm    Post subject: GCS Module System [quote]

As discussed in the "Game Creation System discussion" thread, I am making a new kind of GCS. This system will be XULRunner based and will provide a universal platform.

I am trying to make this system very easy to use, by using a technique called "sequential patching". Sequential patching involves leaving "holes" in code that can be "patched" by snippets at compile time. The program designer does not need to know how these snippets work, only what they do. The patching system relies on specific tools which take the base file and apply snippets to it, which themselves can have snippets applied to them. This modularizes the code base and allows designers to build engines with just a few mouse clicks.

HOW IT WORKS

Each code base has "left out" sections, segments of code whose contents are not relied upon by other segments and which perform a specific task. The particulars of these tasks are defined by modules which are patched into these sections.

Task segments are defined by the "TASK" tag, which is placed at the beginning of a code line. Each task has a description which is specified as the "desc" attribute."

Example:
Code:

<TASK>


Tasks are performed by modules. Users specify modules using the sequencing interface.

THE INTERFACE

The sequencing interface relies of a tree. The base code file, which contains the game loop, lies at the top. The tasks described in this file are parsed and given branches on the trunk. Each task has one child branch which specifies the module which performs it.

The user can only interact with module branches. Clicking on one brings up a form which has a list of available modules. The user selects a module from this list to perform the task specified in the base code. Modules can themselves be base codes which are patched by other modules. This is the idea of sequential patching.

MODULE STRUCTURE

Any file can be used as a module as long as it has a module definition file specifying it as such. Module definitions and the snippets they represent are kept in a modules directory, the contents for which are read onto the list. (alternatively a database could be used, but that's too complicated to implement at the present time).

Module definitions consist of two parts, one defining the name of the module and another. A key/value pair format is used:

Code:

name="Example"
description="The is an example module definition file"


Module definition files have the extension ".mdf".

Project trees can be saved as JSON.

PLATFORM DESCRIPTION

Although in theory the sequential patcher could be used as a development tool in its own right, it is intended in the context of the GCS to assist in the assembly of platform independent game engines. The GCS is an interpreter than runs its own scripting language. This language has been optimized to create console-style games, and has some features particular to the design of simulations.

The script is object based. Each game entity has properties which can be set in script, and each entity has its own script. Changes to entity properties are regulated by a timeout event system which updates the entity in real-time.

Because timing matters are a primary concern to game programmers, the system offers a "counter" variable type. Counter variables can only hold numeric values and can only be changed by addition and subtraction operations. They use a different assignment syntax than is the standard for variables, in that there is assignment operator is used for arithmetic operations:

Example:
Code:

Player.Cash + this.GP;
Player.Exp + this.EXP;


The reason for the implementation for this variable lies in the difficulty one faces in attributing specific purposes to variables. Typically this purpose must be remembered somehow; however when designing a system to be implemented one is left with too much flexibility in that each (mathematical) variable can do anything. Regulating variable potentials before assigning them purpose makes it easier to think of them as actors in a purposeful system.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Mon Jan 25, 2010 10:44 am    Post subject: Re: GCS Module System [quote]

LordGalbalan wrote:
As discussed in the "Game Creation System discussion" thread, I am making a new kind of GCS. This system will be XULRunner based and will provide a universal platform.

I am trying to make this system very easy to use, by using a technique called "sequential patching". Sequential patching involves leaving "holes" in code that can be "patched" by snippets at compile time.


Are you sure this is better than calling scripts, or using plugins?

The classic approaches to this seem to be:

1) Subclassing (very static, only for OOP fans)
2) Delegation (more dynamic)
2a) Calling scripts (Plain text often, easy to access)
2b) Calling plugins (Must often be compiled, faster in execution)

But this whole GCS discussion was very cryptic to me so far, so maybe I'm missing something here again ...

Did you research "Aspect Oriented Programming"? It tries to slice programs so that each sort of task is done in a slice, and then the whole program is assmebled automatically by the system. This allows the users (programmers) to focus on different tasks more easily, because they only see the code that is relevant to one task.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Wed Feb 03, 2010 3:37 am    Post subject: [quote]

Here's a screen shot of the alpha.



The idea is that you load files as patches by making definitions for them. The definitions are looked up and loaded into the patch list box at runtime. You click the arrow button to assign the selected patch to the selected module slot on the project tree. Once you've filled all the slots, you select "Patch and save" from the patch menu and all of the patches are applied from bottom to top.
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Wed Feb 03, 2010 7:37 am    Post subject: [quote]

Don't take this the wrong way, but man that all makes zero sense.

My advice is to get a working prototype that actually does something before you post any more about it, then you might get a better response.

Good luck.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Feb 12, 2010 3:33 pm    Post subject: [quote]

Here's an alpha.

http://www.progressivesocionics.co.cc/downloads/SequentialPatcher.zip

It's a VB6 project. It doesn't support multilevel trees yet, but the rest of the functionality is there. (aside from the "patch and run" function)

You work it by making "task" tags in your source code.

Code:

<TASK NAME=[name] DESC=[description]>


Open your code by clicking "New" under the File menu. Your source code is read and its task tags are read onto the tree.

Tasks are filled with patches, which are snippets of code. The program finds patches by reading module definition files which define text files as code snippets. They are recognized by the .mdf extension; have the form "FILE="[filename]";NAME="[name]";DESC="[description]""; and are stored in the "modules" folder. Make sure the files they define as patches are in the modules folder, because the program does not yet check if the file exists or not at patch time.

Patches are copied to the tree from the list by selecting an item on the list; then clicking a module node on the tree and hitting the patch button. (which is marked with a "<") Once assigning patches for all of your required tasks, click "Patch and Save" from the Patch menu. Your selected snippets will replace the <TASK> tags in your source code, patching your program for use. The patched source will not overwrite the original, but will be copied to a new file with the prefix "Patched_" followed by the name of the original.

You can save projects and reload them later. (using the "Open" and "Save" file menu options) This way you can use the same project over and over, loading its tasks with different modules each time.

I've tested it, and it does work.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Sun Feb 14, 2010 2:50 pm    Post subject: [quote]

Comment?
Back to top  
Malignus
Scholar


Joined: 12 May 2009
Posts: 198

PostPosted: Sun Feb 14, 2010 9:03 pm    Post subject: [quote]

I don't have/use VB6, so while I'd like to comment, I don't think I'd be able to even use this. Sorry!
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Sun Feb 14, 2010 9:05 pm    Post subject: [quote]

OK....
Back to top  
Jinroh
Scholar


Joined: 30 May 2008
Posts: 173
Location: U.S.A.

PostPosted: Mon Feb 22, 2010 5:13 pm    Post subject: [quote]

It's a novel idea for a GCS I think. I've not seen too many that do anything similar if at all.

I'm interested to see how it turns out and though it's unorthodox if the end user can easily make games with it then who cares. ^_^ Your scripting syntax looks nice and clean too so I don't think there should be end user problems either.
_________________
Mao Mao Games
The wolf and his mate howl, taking solace in the silver moon. Pressing ever foreward to see what the future holds.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Mon Feb 22, 2010 11:06 pm    Post subject: [quote]

Yeah one thing I've begun to notice is that it doesn't really gel with professional techniques. It's more an indie designer's tool for getting small, functional ideas out the door quickly, particularly when you have lots of choices to choose from.

I'm not making an XUL version of this until somebody puts together a decent free IDE for XUL. I've been thinking of how to actually make the game engine, particularly what platform to use.

...And I can't decide! Well I'm making this for you guys so... which platform do you want me to use? I want to see this system get used, and for that reason I want to produce it for the platform(s) favored by the people who would want to make use of it.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Tue Feb 23, 2010 2:39 pm    Post subject: [quote]

I'm using Java. Even that half the world screams that Java is unsuitable for games.

While there are no game makers for Java, there are very good IDEs for the programming part. Also, interface builders.
Back to top  
Jinroh
Scholar


Joined: 30 May 2008
Posts: 173
Location: U.S.A.

PostPosted: Tue Feb 23, 2010 4:18 pm    Post subject: [quote]

Hajo wrote:
I'm using Java. Even that half the world screams that Java is unsuitable for games.

While there are no game makers for Java, there are very good IDEs for the programming part. Also, interface builders.


Though I don't really like anything that compiles to intermediate code, I don't see a problem with Java games with things like JOGL and what not it is no problem. ^_^

My brother's professor is teaching a class on Java Game stuff which he is currently taking.
_________________
Mao Mao Games
The wolf and his mate howl, taking solace in the silver moon. Pressing ever foreward to see what the future holds.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Feb 26, 2010 2:09 am    Post subject: [quote]

The main benefit of Java is joypad support. That's very important.

Using the keyboard is an invitation to carpel tunnel syndrome.

My motivation for making the game I intend to make with this engine is to share what I understand about character -- this game will have all kinds of different characters in it, and their relationships will be vividly illustrated. The ideal platform for this effort is the internet, however the browser is not regarded as a competent game platform. (thanks to its limited device support) Java is actually faster than Javascript, and everyone has access to it. Flash is another option; however again, no joypad support. People don't play Flash games for long because of this, unless they require a minimum of keyboard interaction. Flash is absolutely not an option for the content creator itself.

There is one issue with the content creator and that is saving. This makes things difficult because HTML has dropped the ball a little when it comes to selecting files on the server. Really, it has. File selection on the internet hearkens back to the dark ages of DOS.

Instead I think that the internet, at the present time, is only a platform for the publishing of finished games, with the exception of MMORPGs. (which require still a very large amount of know-how no matter what). In our quest to create an accessible creator, we must come down to earth and ask what would be easiest for the user. Internet-driven design IS NOT easy.

I'm gonna look at XBasic. I know that it has both graphics capabilities and GUI elements, which are what I need for the content creator. I would like to make a Java version eventually, but it's much easier to design programs in BASIC than in Java. Linux compatibility is also important.
Back to top  
Mattias Gustavsson
Mage


Joined: 10 Nov 2007
Posts: 457
Location: Royal Leamington Spa, UK

PostPosted: Fri Feb 26, 2010 7:41 am    Post subject: [quote]

LordGalbalan wrote:
The main benefit of Java is joypad support.


That made my day :D
_________________
www.mattiasgustavsson.com - My blog
www.rivtind.com - My Fantasy world and isometric RPG engine
www.pixieuniversity.com - Software 2D Game Engine
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Feb 26, 2010 9:34 am    Post subject: [quote]

Mattias Gustavsson wrote:
LordGalbalan wrote:
The main benefit of Java is joypad support.


That made my day :D


Well it's rather accurate. Multimedia applets are the main consumer use of Java nowadays.

There is something to be said for the ability to debug a game in real-time, without having to use breakpoints. This is an essential function for a map & npc editor. Think of it as "bloopers" in acting: if the actor isn't ready, they aren't going to be able to perform as the director desires. Takes and retakes are needed, but not at the expense of the whole show.

The problem is that... ah I think I've got it. The editor needs a schema by which to run itself. Therefore we are in the position of describing both the game and the editor. We need an "editor description language". No one editor can fit every programming demand: the editor must be given a means of shaping itself to suit the software on which its content will be run.

This seems to point towards Java, doesn't it? I looked at XBasic... I wasn't impressed. There should be a default schema and a default engine -- the idea is that the editor is made by serious designers who know what they are doing, people who want a lot of customization. Two things are editable: the controls and their positions, and the NPC script functions. The demonstration program still uses the fundamental VM system used by the game engine.

On the matter of the VM, I think that arrays SHOULD NOT be used. Rather, I think that access to lists should be automated via "push" and "pop" commands. Access to specific array indices should be forbidden except in a very few cases where customization is required. As such, I propose the creation of a "stack" variable: an array whose elements cannot be directly affected by the programmer, but are controlled by a management system that is responsive to commands to manage the array. Because "push" and "pop" imply visualizing a stack (assuming that the programmer even knows what a stack is!), instead we use the commands "add" and "remove", as in the following example:

Code:

var items as list;
add "Sword" to items;
add "Shield" to items;


Key/value pairs should also be used, but how and where?

Another thing that is needed: the ability to commit programmed functions to script functions, so as to create custom script languages.
Back to top  
Post new topic Reply to topic Page 1 of 4 All times are GMT
Goto page 1, 2, 3, 4  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum