Jscript snippet for Tlaero like Minigame (similar to CfK)

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

Jscript snippet for Tlaero like Minigame (similar to CfK)

Postby lagoonfish » Fri, 13May17 19:01

I am looking for some java-script snippet to create some kind of "mini game" like in Tlaero's "Coffee for Keisha".

What I have so far is an array of 15 pictures that are animated on mouse over plus mouse position (coords).
What I am missing is how to control the mouse move direction and speed.

With the current code moving the mouse left right will trigger the animation and the faster the mouse is moved the faster the animation gets (got the inspiration from Josefus' "the nurse" game here from the forum.

But what I would like to achieve is: To define HOW the player must move the mouse to progress, means in which direction and how fast.
I am thinking of starting slow with some pause and then if the "tension meter" is raised it's required to move faster to progress.

I checked the code Tlaero used in Coffee for Keisha but it seems she is using only 2 pictures not an array of 15 and the functions are spread in different files, so I can't really figure out which code snipped does the magic.

Also I wonder how to integrate the sound, triggering the sound on mousemove is not the best way as it stutters...

Any ideas?
lagoonfish
great white shark
 
Posts: 82
Joined: Sat, 13May11 12:47
sex: Masculine

Re: Jscript snippet for Tlaero like Minigame (similar to CfK

Postby tlaero » Sat, 13May18 02:54

Are you using AdventureCreator? If you want 15 pictures in an animation you just set the "Frames" field to 15. Everything else happens for you.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Jscript snippet for Tlaero like Minigame (similar to CfK

Postby lagoonfish » Sat, 13May18 12:31

Hi Tlaero,

thank you for your reply.

Although I am sure adventure creator is a great tool, I think it is overkill for what I would like to create and most important, is is made for the "wrong" operating system :-( (platform independent would be nice)
Using a kind of creation kit I will end up in having a lot of code that isn't actually used in the game, plus I can't well integrate additional code (I am still experimenting with the code and learning by doing) ...
I'd like to have only the functions needed by the game in one file and not a whole engine from which only less than 5% is actually used by the game...

So far I have managed to do the animation by mouse move, means the faster the mouse is moved the faster it's animated, and depending how far the mouse is moved left or right the animation is also affected.
What I now missing to make it a game is to have a code snippet that is checking how the user is moving the mouse and comparing speed and direction of movement to some predefined values. If the movement of the player is matching the predefined values the player will succeed to next stage, if not the player will have to try again until time limit is hit (The time limit is easy to implement).

The goal is to raise the pleasure meters but keep the right balance of the girls pleasure meter and the boys pleasure meter, if the player moves too fast the pleasure meter of the boy will get full before the girl reached orgasm, if mouse is moved too slow then girls pleasure meter will not raise and boy will loose stamina (both ends in game over). The more the pleasure of girl and boy raises the more sensitive the game should react to mouse moves.
I know the game concept is old and not innovative, but still this kind of mini game could be fun.
The pleasure meters does not to be displayed actually but the described behavior should be there.

Can you point me a hint which functions are needed?
lagoonfish
great white shark
 
Posts: 82
Joined: Sat, 13May11 12:47
sex: Masculine

Re: Jscript snippet for Tlaero like Minigame (similar to CfK

Postby tlaero » Sat, 13May18 18:34

Sure. The code you want is in _functions.js. You need the MouseData Object and the AnimHelper Object, so everything between:
//--------------------------------------------------------//
// MouseData Object
//

And

//--------------------------------------------------------//
// Animation Frame override.
//

There are also various "xxxMove" functions in CfK's _game.js. (SoundMove, etc). Those are the functions that interact with the Objects. And finally, you need the code in the head bypass in the htm file. That's what sets up the Objects.

Let me know if that doesn't give you enough to go on.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Jscript snippet for Tlaero like Minigame (similar to CfK

Postby lagoonfish » Fri, 13May31 19:39

Unfortunately I can't get things to work.
Tlaero, do you mind giving a small example?
lagoonfish
great white shark
 
Posts: 82
Joined: Sat, 13May11 12:47
sex: Masculine

Re: Jscript snippet for Tlaero like Minigame (similar to CfK

Postby tlaero » Sat, 13Jun01 05:39

There's no small example. I wrote a ton of code to make that work. But it's all right there to use. Why don't you just use it?

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female


Return to Projects

Who is online

Users browsing this forum: No registered users and 7 guests

eXTReMe Tracker