Adventure Creator original thread

Tips, techniques and tutorials about creation tools.

Re: Adventure Creator main thread

Postby Wolfschadowe » Wed, 14Sep03 15:34

I hadn't noticed any problems with the last version, but I redownloaded and have been working a bit in the latest version of the latest version. :)

So far, everything looks good. I fixed some bugs in the Wednesday bar scene that has the n1-barNN-X naming scheme, and the sort order looks great to me. I haven't come across any unhandled or odd instances so far.

Later scenes in BEW have switched to a thofficexxNNx format, and those all sort as expected as well.

Thanks again for all the work on this tool!

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

Re: Adventure Creator main thread

Postby simarimas1 » Wed, 14Sep03 16:25

I haven't tried the new AC, I am using the Mod that Kexter made though. It is doing just fine for me so far. I will download the latest AC though and give it a go.

I also wanted to thank everyone for all the help. I think I have this figured out now, and the game is progressing nicely. I may put up a preview this week, and get some feedback on the gameplay, and the images, etc.

Thanks again to all of you!
User avatar
simarimas1
great white shark
 
Posts: 52
Joined: Tue, 14Sep09 14:50
sex: Masculine

Re: Adventure Creator main thread

Postby simarimas1 » Thu, 14Sep04 01:36

Well, I spoke too soon.

I have another question.

I want to check two variables. and then, depending on those two variables, have 4 different outcomes.

so if var1=0, var2=0, then I go to page a
if var1=1, and var2=0, go to page b
if var1=0, and var2=1, go to page c
and finally, var1=1, var2=1, go to page d

How would I go about writing this, to check the two variables?

Thanks again, as always, it is much appreciated.
User avatar
simarimas1
great white shark
 
Posts: 52
Joined: Tue, 14Sep09 14:50
sex: Masculine

Re: Adventure Creator main thread

Postby Wolfschadowe » Thu, 14Sep04 03:15

There are probably a half dozen ways to do it. Most likely you'll want to use a custom function for that instance.

I would probably do it with nested if statements.

Code: Select all
function checkFourExample()
{
//declare variables for the function first. Not showing that part here.

If (var1 == 0)
{
      if (var2 == 0)
      {
          GotoPage(pageA); //var1 = 0 and var2 = 0
      }
      else
      {
          GotoPage(pageC); //var1 = 0 and var2 = 1
      }
}
else
{
      if (var2 == 0)
      {
          GotoPage(pageB); //var1 = 1 and var2 = 0
      }
      else
      {
          GotoPage(pageD); //var1 = 1 and var2 = 1
      }
}

return false;
}
That's probably not the robust method, but it's pretty easy and it works. You would just enter checkFourExample() in the OnClick. This is a single use function.

In case you didn't know, anything after // on a line is commented, meaning the computer will ignore it. Useful for keeping notes for yourself about what is going on. A program like the free Notepad++ can be set to JavaScript mode and will color code comments and keywords automatically.

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

Re: Adventure Creator main thread

Postby simarimas1 » Thu, 14Sep04 03:47

Ok, that doesn't seem to be working for me, but perhaps I am not writing the variables correctly.

do I need to write them as


var1 value = readVar("nothing");
var2 value = readVar("something");

Here is what I have. I didn't use the Gotopage, as I would rather keep it as I have the rest.

function alldinner() {
var var1 = readVar("casual");
var var2 = readVar("bridgettenogo");

If (var1 == 0)
{
if (var2 == 0)
{
window.location = "allgirlsdinnerdress.htm";
}
else
{
window.location = "girlsnobdress.htm";
}
}
else
{
if (var2 == 0)
{
window.location = "allgirlsdinnerjeans.htm";
}
else
{
window.location = "girlsnobjeans.htm";
}
}

return false;
}
User avatar
simarimas1
great white shark
 
Posts: 52
Joined: Tue, 14Sep09 14:50
sex: Masculine

Re: Adventure Creator main thread

Postby Wolfschadowe » Thu, 14Sep04 05:03

Your first "if" has a capitalized I. Make that I a lowercase i, and it should work.

The name of the variables doesn't matter as long as it's consistent.

var beavis = readVar('FireFire");
var butthead = readVar("huhuh");

If (beavis = 1) etc.....

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

Re: Adventure Creator main thread

Postby simarimas1 » Thu, 14Sep04 05:06

OH MY GOD!!

On the bright side, apart from being a total dumbass, I kind of got the rest of it right! hahaha


Thank you once again Wolf.
User avatar
simarimas1
great white shark
 
Posts: 52
Joined: Tue, 14Sep09 14:50
sex: Masculine

Re: Adventure Creator main thread

Postby tlaero » Thu, 14Sep04 05:59

Wolfschadowe wrote: That's probably not the robust method, but it's pretty easy and it works.


It's extremely robust. Simple code is usually the best code. And readable/maintainable code is almost always better than "clever" code. I once had someone ask me to help them modify some code I had written over a decade earlier. You can bet I was glad the code was readable. (-:

Thanks for all your efforts, Wolf!

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

Re: Adventure Creator main thread

Postby tlaero » Sun, 14Sep07 06:03

Kexter has been helping me figure out how to support touch devices in Adventure Creator. He's gave me some great examples, and I understand it now. I've put together a minimal test that I've tried in IE11, Chrome, and Firefox, as well as my touch Surface 2.

http://www.mediafire.com/download/y050o ... uptest.zip

I'd love to hear how this works on an iPad, Android tablet, and old versions of IE (9 and lower). If anyone has those can you download the popup test and try it out? It's two pages with links to each other. There is a hit target in the middle of the picture. What should happen is when you hover your mouse over the hit target a popup text appears. Click the target with your mouse and it should go straight to the next page. If you tap the target with your finger the text should appear. Then if you tap again it'll go to the next page.

Please try both pages and let me know if either doesn't work.

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

Re: Adventure Creator main thread

Postby Wolfschadowe » Sun, 14Sep07 06:31

I won't have a chance to try this on my Android tablet for another hour or two, but I just tried it out on my Android Phone running the latest version of Android OS.

Tapping on the image does not show a pop-up, but instead takes me directly to page 2. However; if I tap and hold the hotspot for about a second, it shows the text. I can then lift the finger and the text stays. I can tap outside the image to reset the text, or tap the hotspot again to follow the link.

This was in the default HTML Viewer. i haven't tested it with mobile Firefox or mobile chrome, or even the default browser, primarily because I'm not sure how to point those to the FS on my phone.

As is, it seems workable on my phone with pinch zooming in and out. I wouldn't really want to play a long game on the phone, for obvious reasons, but at least now I could if I wanted too. I'll give Android tablet based feedback later. It would be interesting to have 2 hit targets on an image to see how it behaves.

Great work Tlaero and Kexter! This is going to be awesome!

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

Re: Adventure Creator main thread

Postby Wolfschadowe » Sun, 14Sep07 06:35

Oops.

As an update, I didn't realize there was a target on page 2. the Page 2 target does NOT work on my android phone. No text or link.

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

Re: Adventure Creator main thread

Postby LRM » Sun, 14Sep07 06:51

I sent a PM to M'lady. With IE8 (Windows XP) I think it worked as advertised. One thing that was odd, I opened Chrome to post the PM and IE quit working. That and this old memory is why I couldn't be more specific about what the text said.
Lou
User avatar
LRM
Moderator
 
Posts: 3058
Joined: Wed, 09Apr22 23:00
Location: Citizen of the world, residing in the USA
sex: Masculine

Re: Adventure Creator main thread

Postby Wolfschadowe » Sun, 14Sep07 08:29

Test results using a Galaxy Note 2014 tablet. This device has a stylus. I tested 3 browsers and the HTML Viewer.

Most people will likely use the HTML viewer as it is the default for viewing file system HTML files and available from the file manager. It takes moderate to advanced knowledge to open the files in other browsers, manually pointing to file//storage/emulated/0/Downloads/(path the file was unzipped)

HTML Viewer:
Touch: Page 1 - First tap goes to Page 2. -- Tap and hold for 1 sec displays text. 2nd tap to area follows link to page 2 / Tap out of area clears the text.

Page 2 - No image area displays. Need to use the standard link at the bottom to navigate back to page 1.

Stylus: Page one operates as a mouse. Hover for text, tap to follow link. Page two broken.

Verdict, Page 1 formatting is usable.

Default Android Browser ("Internet")
Touch: Page 1 - First tap displays text. Second tap follows link to page 2
Page 2 - Same as page one. Fully functional.

Stylus: Same as Fully functional on both pages, same as mouse.

Verdict: Ideal, but tricky to get the page opened locally. Perfect for a hosted site though.

Chrome Browser for Android
Almost exactly like the HTML viewer. Two differences.
1. Both pages function
2. Tap and hold for a second works, but at the same time as the text "locks" into place so that the finger can be removed without following the link, a browser pop-up menu appears asking to open the link in a new tab and various related items. Clicking outside of the box leaves the text, which can either be followed with another tap, or cleared.

Verdict: usable, but annoying. Not recommended. Also tricky to get the page opened locally.

Firefox Browser for Android
Style sheets don't seem to work...or something. the image does not scale to the screen like the other browsers and is oversized. Cannot zoom out to make it smaller, requiring scrolling. Target areas and pop-up text does not appear on either page, even using the stylus. tapping the areas do follow the link, but you have to by psychic to know what they are.

Verdict: Unusable.


Looks like whatever is happening on Page 1 is more compatible than the Page 2 format. Hope this feedback helps!

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

Re: Adventure Creator main thread

Postby tlaero » Sun, 14Sep07 20:00

Thank you LRM and Wolf.

I've made some minor changes that may or may not change the way it works. Can you try again?

http://www.mediafire.com/download/y050o ... uptest.zip

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

Re: Adventure Creator main thread

Postby Wolfschadowe » Mon, 14Sep08 07:38

I tested this again. There was only one noted difference:

Previously, on the default android browser (labelled "internet") one tap showed the text, the second tap followed the link (or tap outside the image to reset)

Now, the first tap follows the link.
Alt: Tap and hold to display the text. Tap the displayed area to follow the link, or out of the area to reset.

HTML Viewer, chrome, and Firefox were unchanged.

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

PreviousNext

Return to The workshop of creators

Who is online

Users browsing this forum: No registered users and 0 guests

eXTReMe Tracker