Adventure Creator original thread

Tips, techniques and tutorials about creation tools.

Re: A tool to help write "Virtual Date" games

Postby Wolfschadowe » Sun, 13Sep15 07:04

I'll definitely give it a try with the body bypass. I've got a complex mood result coming up soon where there are two girls and 5 possible results, both happy, both angry, one happy, the other happy, or neutral. I'll see how it can work into my workflow. Sometimes it may be faster and easier just to make two web pages. Either way, it's always fun to try something new.

Thanks again for all your help Tlaero!

Wolfschadowe
User avatar
Wolfschadowe
legend of the South Seas
 
Posts: 559
Joined: Thu, 13Mar21 07:37
Location: West Coast, USA
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby Wolfschadowe » Mon, 13Sep16 18:55

I finally got the chance to try this out, and it works beautifully. It's not quite the time saver I'd hoped it would be. The AC tool is so efficient, it's usually faster to just create individual pages for each mood rather than try to consolidate them down. There are a few places here and there where I will still use it though. Here's what I ended up doing.

In _game.js
Code: Select all
//Set's the image on the results page after SetMood() is used. (once)
function ChooseImage()
{
    var index = readVar("index");

    if (index < 0 || index >= anim.pictures.length)
    {
        // invalid index
        return;
    }

    anim.curPicture = index;
    document.getElementById("image").src = anim.pictures[anim.curPicture].src;
}

//function to set the mood in the game (one time)
function SetMood(mood,girl1,girl2,girl3)
{
   setVar('index',mood); //Tells the next page what to display
   varPlus1(girl1); //increases the proper variable. Blank is handled by the varPlus1 function if not needed...Yes...it's cheating and I don't care. :)
   varPlus1(girl2);
   varPlus1(girl3);
   return;

//set's the Top Text (for the result page)
function thoffice008tt()
{
   var emotion = readVar('index')
   
   switch (emotion)
   {
      case 0: //Neutral
         document.write('Jasmine shuffles her feet and brushes her hair back, seeming a little embarassed, "One of my friends tipped me off so I got it all on video.');
         break;
         
      case 1: //Angry
         document.write('Jasmine brushes her hair back with an angry flick, "Oh, come on! Of course I didn\'t blow him. I recorded the whole meeting"');
         break;
      
      case 2: //Aroused
         document.write('Jasmine shoots you a coy look, "I recorded the meeting, one of my friends tipped me off so I knew something was up."');
         break;
      
      case 3: //Happy
         document.write('Jasmine smiles at the thought, "Tempting, but I\'d probably end up getting it on camera and blackmail you too."');
         break;
      
      default: //Broken
         document.write("Dude! You broke the game! Nice...");
         break;
   }
   return;
}
}


And in the Body Bypass of the results page:
Code: Select all
<script type="text/javascript">
     ChooseImage()
</script>


Of course, the key is to set the images like four frames in an animation and the timeout to 0 on the results page. It's more work to set up, and probably makes it a little harder for playtesters, so I'll likely only use it sparingly. There are instances where there are multiple love interests in the scene and you may make one happy, one happy and one angry, both happy, both angry, etc... Those are where this will come in handy, if they all go to the same branch.

Otherwise, it's easier and faster just to create multiple pages in the AC tool.

Wolfschadowe.
User avatar
Wolfschadowe
legend of the South Seas
 
Posts: 559
Joined: Thu, 13Mar21 07:37
Location: West Coast, USA
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby tlaero » Tue, 13Sep17 03:57

Yeah, between GtkC and LwK I put together a system to do everything in one HTML page, then realized that AC made things much easier. I considered rewriting AC and then said "Why?" When you have something that works well, it's silly to change it for the sake of change.

I may use something like this sparingly also, though.

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

Re: A tool to help write "Virtual Date" games

Postby Erubyr » Tue, 13Sep17 09:48

Hey Tlaero,

In the Example, the green moodbar is on top of the image because the screenwidth is not enough for the image and the moodbars next to eachother. With a non-resizable screen that means the bottom of the image and any speaking options are unreachable, the red bar would appear below the image and push down any speaking options.

Or course this is only a problem in the Example where the green and red moodbars are used, might just be a discouragement for someone without some it skills though.

Tool (still) looks great, will have a look at the new features this weekend.

Erubyr
Erubyr
great white shark
 
Posts: 32
Joined: Sat, 10Aug28 23:00
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby tlaero » Wed, 13Sep18 01:32

What size screen do you have? I thought I tested it with both small and large screens.

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

Re: A tool to help write "Virtual Date" games

Postby Erubyr » Wed, 13Sep18 09:23

Hi Tlaero,

My monitor has a 1680 x 1050 resolution, same happens on my laptop screen with resolution 1280 x 800. I am using Firefox (23.01) but also tried it with IE 8 on the monitor.
Erubyr
great white shark
 
Posts: 32
Joined: Sat, 10Aug28 23:00
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby Erubyr » Wed, 13Sep18 12:10

Hi Tlaero,

Does the current Adventure Creator support multilanguage, i.e. the user can select a language in the intro and only the text gets altered?

Thanks!
Erubyr
great white shark
 
Posts: 32
Joined: Sat, 10Aug28 23:00
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby tlaero » Thu, 13Sep19 04:39

Oh, I see. Start the example from _begin.htm instead of Start.htm and the bars will work correctly. I forgot to expand the window size when I added the bars. I'll fix that the next time I do an update. Thanks for the report.

As for multi-language, there's no explicit support for that, but there's nothing stopping you from doing multiple htm files for each language. If I were going to do it, I'd move the htms into language subdirectories.

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

Re: A tool to help write "Virtual Date" games

Postby Wolfschadowe » Wed, 13Sep25 19:48

Found a minor bug which is primarily a user problem, but it throws an unhandled exception when trying to browse HTML on an unsaved, non-existent page.

Steps to reproduce (100% repeatable):
1. Enter a non-existent web-page into the file field: (i.e.: doesntexist.htm)
2. Select File->Browse HTML
3. Error occurs

I came across this as I was building a new page, I changed the File entry but hadn't left the field yet, got distracted by a phone call and then came back to AC. Because I hadn't left the field yet, the unsaved * hadn't appeared in the title bar yet, so I thought I had already completed the page and saved. Tried to Browse HTML, and received the unhandled exception. Options are to "Continue" or "Quit" with quit being the default option. Continue returns to AC normally, but it would be nice to have that handled in a manner that does not have a default quit option. :) It probably happens for similar options in the file menu, but I didn't test them.

It could easily stay as is and be fine, in the six months I've been using the tool, this is the first time I've encountered it, but wanted to bring it to you attention in case you want to wrap the error in your next build.

Wolfschadowe.
User avatar
Wolfschadowe
legend of the South Seas
 
Posts: 559
Joined: Thu, 13Mar21 07:37
Location: West Coast, USA
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby tlaero » Thu, 13Sep26 04:41

That's a good catch Wolf. Thanks! I'll fix it in the next drop.

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

Re: A tool to help write "Virtual Date" games

Postby Super » Sun, 13Sep29 02:35

Newbie mistake: So I want to make it so that, if you complimented Celina before, she'll be aware of that and if you didn't, she'll take it as the first time you complimented here. However, it goes to the one where she is aware of your previous compliment even if you didn't, and I tried deleting my browser history to combat it. Here is my code:

Code: Select all
function checkLibCompliment()
{

    var libCompliment = readVar("libCompliment");
   if (libCompliment = 1)
   {
      window.location = "lib9e.html";
   }
   else
   {
      window.location = "lib9f.html";
   }
}


So no matter what, it goes to lib9e.html, never lib9f.html

If you select to compliment her the first time, varPlus1(‘libCompliment’); is activated.

And here are my current variables:

Code: Select all
var gameVars = ["cssSize", "happy", "test", "confidence", "april", "libCompliment = 0"];


So... do you think you're able to figure out what's wrong from that, or do you need any more info?
Super
legend of the South Seas
 
Posts: 545
Joined: Wed, 11Aug24 20:59
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby Wolfschadowe » Sun, 13Sep29 03:50

I don't know if setting LibCompliement to 0 when you declare it will work in this kind of an array. I would guess that the libCompliment = 0 is being ignored in your game vars, and it is staying at 1. I would handle it a little different by resetting libCompliment once I've used it and it no longer is needed.

Code: Select all
function checkLibCompliment()
{

    var libCompliment = readVar("libCompliment");
   if (libCompliment = 1)
   {
       setVar("libCompliment",0)  // Once you're inside the IF statement the variable is no longer needed and can be prepped for it's next use, either in this play through or the next one.
       window.location = "lib9e.html";

   }
   else
   {
      window.location = "lib9f.html";
   }
}
That will reset the variable once it's used. if you want to use the variable again it has been reset for you. I use 7 "trash" variables in my game. What I mean by trash variables is that I use them to store things like complements or actions within a scene that I just want to hold temporarily for a later check. (I call mine, ztemp1, ztemp2, ztemp3, ztemp4, etc...) So for example, if I want to see if my character looked at someones boobs too
much, I might add one to ztemp1 every time he looks. After I've checked how many times he's looked, and don't need that information anymore for that game, I set ztemp1 back to 0, and maybe use it later to track how many beers he's drank...then reset it back to 0 when I don't need it anymore. Hope this helps.

Wolfschadowe
User avatar
Wolfschadowe
legend of the South Seas
 
Posts: 559
Joined: Thu, 13Mar21 07:37
Location: West Coast, USA
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby tlaero » Sun, 13Sep29 06:14

It's because you only have one = in the if. You need it to be:

if (libCompliment == 1)

One equals (=) is for setting a value. Two equals (==) is for checking a value. You were setting libCompliment to 1.

The gameVars are already initialized to 0. You don't need to do it in the array declaration.

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

Re: A tool to help write "Virtual Date" games

Postby Super » Sun, 13Sep29 14:57

tlaero wrote:It's because you only have one = in the if. You need it to be:

if (libCompliment == 1)

One equals (=) is for setting a value. Two equals (==) is for checking a value. You were setting libCompliment to 1.

The gameVars are already initialized to 0. You don't need to do it in the array declaration.

Tlaero


Ah yes, I remember that now. Thanks for the reminder
Super
legend of the South Seas
 
Posts: 545
Joined: Wed, 11Aug24 20:59
sex: Masculine

Re: A tool to help write "Virtual Date" games

Postby tlaero » Sun, 13Sep29 18:03

Don't worry, you're in good company. I would be surprised if there is any coder in a c-based language that hasn't made that mistake at least once.

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

PreviousNext

Return to The workshop of creators

Who is online

Users browsing this forum: No registered users and 3 guests

eXTReMe Tracker