Engine for creating simple Date Sim games

Games in project or under development. The posts and games in this section can not ask for money.

Re: Engine for creating simple Date Sim games

Postby json.err » Thu, 10May06 12:34

Hi all.

Let me introduce some javascrïpt Engine allowing to create simple Date Sim games like VirtualDateGirls serie by Chaotic and Virtual Date with Amy by phreaky. I am not sure how difficult it will be for someone to use it but I hope not so difficult.

It is something like the thing tlaero has done for Amy game http://sharks-lagoon.aceboard.fr/215394 ... -Redux.htm But it has some differences:
[*] there are much less files (actually only 8), but some of them are bigger;
[*] you should have some javascrïpt knowledge (but I hope it's not necessary);
[*] it does not use cookies, but variables can have only true/false values for now (like in original amy game). If someone will be interested in this Engine I can change it for additional requirements.

Instructions how to use engine: http://www.4shared.com/document/gVkikrL ... EADME.html
Engine itself: http://www.4shared.com/file/xiGIB67I/engine.html

Below are the links to existing games already converted to use this engine. Possibly they have bugs (due to conversion or by engine itself). If you are already have those games or just want to see what is this you can download version without images (and place existing images).
And here are links:
VDG Kelly (by Chaotic):
http://www.4shared.com/file/asu51MrP/vd ... mages.html
http://www.4shared.com/file/7NbGls7E/vdg_kelly.html
Virtual Date with Amy (by phreaky):
http://www.4shared.com/file/8becYYJO/am ... mages.html
http://www.4shared.com/file/nPMP-QTR/amy_v2.html

Mentioned games are them same as original ones with no new content. The only thing they are converted to javascrïpt.
Games are not tested fully. I have done only simple test in Firefox.ï

Chaotic and phreaky PM me if you dislike links to your games.

PS: I hope I did not break any forum rules. Admins, if it is not appropriate forum for this thread please move it to appropriate.

Edit was made to remove a "." from the end of the first link, it failed to activate! Moved from All Sexy Games.
Other than any objections arising from the two persons mentioned I feel you are on safe ground.
json.err
Pilot fish
 
Posts: 8
Joined: Mon, 09Apr20 23:00
Location: Russia

Re: Engine for creating simple Date Sim games

Postby Squeeky » Thu, 10May06 17:22

I've only looked at the DEV_README document and extracted the Javascrïpt engine files. It is getting too late follow this up except to say that I initially mistakenly thought this a concept idea that worked but could have further input.

A cursory look at the DEV_README indicates a programmer who knows what he is about. That said, moving this to Projects I think was appropriate as an easier point of reference.
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Engine for creating simple Date Sim games

Postby ttant » Thu, 10May06 22:59

Nice engine, but too much js for me ^^.

Btw, doesn't work neither with ie8 nor opera, but runs fine in seamonkey (gecko based, like firefox - i don't try webkit-based like safari/chrome).

I got that in dragonfly (if this can help you) :
Syntax error at line 49 while loading:
Game.getVar(checker.var)) {
--------------------^
expected identifier, got keyword 'var'

Uncaught exception: ReferenceError: Undefined variable: Engine
Error thrown at line 2, column 2 in file://localhost/.../start.html:
Engine.startGame();
ttant
star of the reef
 
Posts: 278
Joined: Sat, 09Dec05 00:00

Re: Engine for creating simple Date Sim games

Postby json.err » Thu, 10May06 23:54

@ttant I love javascrïpt. It's the best language I've ever learnt ;) So I am trying to do everything in js. I had even tried to rewrite famous ArianeB game to similar js engine (much more complex though) but I got stuck on conversion of original game to needed format.

And thank you for your feedback. It seems that opera thinks that var word is reserved keyword. So I need to check this in all browsers...
json.err
Pilot fish
 
Posts: 8
Joined: Mon, 09Apr20 23:00
Location: Russia

Re: Engine for creating simple Date Sim games

Postby TheBrain » Fri, 10May07 06:10

I may be a bit nitpicky, but I'm not a fan of using a string for the action (like "goto:x:y"). Since it's javascrïpt you're free to at least use something like ['goto', x, y], which saves you a step of parsing and therefore a point of potential failure. A faulty string will only turn up at runtime, if you define the array wrong it'll fail instantly.

Of course, you could do something much more interesting with generating functions. Instead of defining the action as some string or array, you could simply have it be a function that gets executed when the action is performed. My JS is a bit rusty but I think for the regular 'goto' action you should be a ble to define something like:
function gotoAction (x, y) {
return new function () { currentState = states[x][y]; };
}
Which will generate a function that can be called and will set the state (I haven't looked at the source in all detail so the var names are likely to be wrong :P).
So the state definition would become something like:
...
action: gotoAction(x, y),
...

If the creator wants to do something more complicated he could then define his own function for performing the action. Which would become like:
...
action: new function () { ... },
...

It can easily take care of all the checking stuff as well (which I don't get in the first place, what you're doing right now is still very similar to the HTML checking things chaotic did. While you're making an engine, why not include that in the action definition in some way instead of a separate file?).

Another idea I had when I thought about an engine for this before is to have 'guards' for actions. These would be conditions for the action to appear (which could be done as functions as well).
That way you could have a single scene that can have different actions depending on the current conditions (for example depending on which items the player has). A prime example of such a scene would be in phreaky's game where the girl is standing in front of the pool, where the actions differ throughout the state of the game (cheek kiss, mouth kiss, walk, etc.).

On a totally unrelated final note: it's bad practice to use keywords like 'var' for your own variables regardless of whether the compiler accepts it, it makes code harder to read/understand (especially if your editor highlights keywords).
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Engine for creating simple Date Sim games

Postby json.err » Fri, 10May07 09:28

@TheBrain I completely agree with you. Strings are not the best solution of course. Functions are better (why I forgot?).
The main thing here is this code is done by converting html files. So it has similar structure. But it's a good point to improve code.
json.err
Pilot fish
 
Posts: 8
Joined: Mon, 09Apr20 23:00
Location: Russia

Re: Engine for creating simple Date Sim games

Postby Squeeky » Sun, 10May09 12:33

Squeeky wrote : I've only looked at the DEV_README document and extracted the Javascrïpt engine files. It is getting too late follow this up except to say that I initially mistakenly thought this a concept idea that worked but could have further input.

A cursory look at the DEV_README indicates a programmer who knows what he is about. That said, moving this to Projects I think was appropriate as an easier point of reference.

I must admit that until I looked closer at the files I had totally misconstrued the concept he had presented but that does not matter.

json.err had asked if this could be a tool to develop games of a similar format.

I've privately offered some thoughts:
Form with Textbox input for concatenation to respective scrïpts, variables, values with tests, image mapping, text files to be added, ....

Essentially the game designer formulates a flowchart and according to the Form Questionnaire responses are used to build the game within the json.err structure; engine.js thereafter drives the game. Simplistic descrïption but is it feasible?

Logically he categorised images by placing them into specific folders. So the engine picks up on the data allocated to the generated files to run the game.

I have the feeling that such a concept should minimise the complaints that we see about games of this genre. If the interface correctly offers the correct logic then problems would only be due to incorrect keying of data, or poor flowcharting, yes?

If json.err decides to follow this path I'd like to see him call for assistance (should he so need) and we have some willing assistants.
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Engine for creating simple Date Sim games

Postby Squeeky » Mon, 10May17 12:56

I am wondering if this concept, I mean that the input can be done through an MS Access form interface.

Access does build a data base against form entries.

My question now is:
Can the macro routines compile a text (a la js file, be renamed if necessary) with appropriate delimiters so that Javascrïpt (whatever) can recognise the next field?

If that is possible I can see json.err having a potentially easy means to offer a cross-platform interface.
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Engine for creating simple Date Sim games

Postby TheBrain » Mon, 10May17 17:27

In which world is MS Access cross-platform? o.0

Anyway, I'm not sure if it is possible with macros, but with VB scrïpting this should be very possible.
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Engine for creating simple Date Sim games

Postby Squeeky » Tue, 10May18 04:11

I have just resurrected an interactive database with macros which I built for an amateur equestrian group competition ten years ago; along with the interface I have my fictional test data. Delimiters? That is my big question at the moment along with being able to write to a file outside of the Access environment. While I can manipulate Access and macros with a reasonable degree of comfort VB is currently not in my repertoire.

Cross-platform? It is my understand that most MS applications run successfully under Linux but I have no knowledge of Mac.
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Engine for creating simple Date Sim games

Postby TheBrain » Tue, 10May18 06:06

They are still only run through the compatibility layer of Wine (which basically mimics the entire Windows API). This is not without bugs and as I understand Access has quite some issues (refer to the tests at http://appdb.winehq.org/objectManager.p ... ion&iId=12 ). Even if it did work I wouldn't call it cross-platform (just like installing a virtual machine on Windows to run for example MacOS does not make Mac programs cross-platform).

But back on subject, I'm no expert with Access, but as far as I could tell in a VB scrïpt you should have access to both functions to query your database and functions to write to files. I'd say if you combine those you could write the data in any format you'd like. This is completely bypassing any export functionality of access itself (which I think is what you're getting at with mentioning 'delimiters'? Not sure...).

If it works it isn't even a bad solution though, you get easy access to forms and you can save the whole 'project' as an Access database, as long as you can make an 'export to HTML'-scrïpt which generates all files necessary to run it in a browser.
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Engine for creating simple Date Sim games

Postby Squeeky » Tue, 10May18 07:41

Ok. I understand the virtual machine concept.

Yes, "as long as you can make an 'export to HTML'-scrïpt which generates all files necessary to run it in a browser. "

From what you suggest however, someone with a Mac or Linux might not be able to use a VB constructed application to create a delimited database?

eg:
page1.html , img1.jpg , action1 , value1
page2.html , img1.jpg , action2 , value3
page3.html , img2.jpg , action1 , value2
page4.html , img5.jpg , action4 , value4

That type of information would be compiled as a scrïpt for use with an Engine proposed by json.err (I am aware that my unexpressed parameters do not align with his Engine).
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Engine for creating simple Date Sim games

Postby TheBrain » Tue, 10May18 09:23

No that's not what I meant. If you create an Access database to easily input the scenes through forms only the designer needs to run Access.

But having Access generate a file with the database as comma-separated values (assuming it can do that) would not be directly usable from within JS. One way or another it needs another conversion.
If you output CSV from Access then the JS engine needs to be able to read that from a file or string.
On the other hand, if you implement an export function in VB scrïpt in Access you could generate the entire set of JS files (essentially compiling the whole game from scratch, with the Access database as the 'source').

To go back to the basic issue though, yea, I think it's possible to do that :P. But given the structure of json.err's engine there would be much less need for such an UI. The scene/action definitions are fairly straightforward, there's not a lot of replicated 'code' like you would have making the HTML files the way chaotic uses them.
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Engine for creating simple Date Sim games

Postby Squeeky » Tue, 10May18 12:18

Ok.

I did suggest to json.err about the possibility of creating an MSDOS form interface, an area which he didn't relish revisiting.

Would a Pascal exe file, presented as an interface work under Windows, Linux and Mac?
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Engine for creating simple Date Sim games

Postby json.err » Tue, 10May18 15:20

Would a Pascal exe file, presented as an interface work under Windows, Linux and Mac?


@Squeeky, to run exe files you have to have some application providing compatibility layer (Wine for Unix, VMWare Fusion for Mac) as TheBrain mentioned. Maybe it will work, maybe not. But writing Windows program using Linux environment is a bit difficult :) I'll think what I can do with it but unfortunately I am busy with other project now.
json.err
Pilot fish
 
Posts: 8
Joined: Mon, 09Apr20 23:00
Location: Russia

Next

Return to Projects

Who is online

Users browsing this forum: No registered users and 15 guests

eXTReMe Tracker