Adventure Creator original thread

Tips, techniques and tutorials about creation tools.

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

Postby tlaero » Sat, 13Jun22 03:00

What you described is unexpected. Can you post the function?

Edit: I was wrong. Returning false from an onclick tells the browser to stop what it's doing. So in your example it cancels following the link. It's not really clear to me why firefox requires it when navigating in the js, but it does. I guess the general rule is return false when going to a new page from the function, but not otherwise.

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 tlaero » Sat, 13Jul06 01:53

I've uploaded a new drop of AdventureCreator.

https://hotfile.com/dl/232666363/7fa755 ... r.zip.html

Nothing that was there before changed, but I added a new utility called "jpgConv." This is a command line tool that changes jpeg quality and/or resolution. Run it from a cmd line without any arguments to get the usage. Let me know if you have any questions on how to use it.

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 tlaero » Mon, 13Jul08 01:23

I've been thinking about how to deal with variables in text. For instance, say you wanted to have the player choose whether to play as male or female. You wouldn't want to go through and duplicate every page that refers to the player, once with a "him" and once with a "her." So I've made adventure creator do the following. In toptext and table entries (it doesn't work in hit targets), if you wrap something in [[double brackets]] AC will make that a script.

So you could do something like.

Jenny says, "Where'd you find [[him()]]?"

Then in your _game.js you could have a "him()" function that outputs "him" or "her" depending on the sex of the player.

I've got it coded, but haven't tested it yet. Is this something immediately useful to you folks, or should I hold off releasing it until I have more changes?

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 » Mon, 13Jul08 03:14

I do like the idea. I don't know if I find that immediately useful, although my brain is already going on possibilities where this could help. For example, I have conversation threads where The player has two or three responses, and half the top text on the next screen is different based on the player response, and the other half is consistent and moves the story forward prompting another set of player responses. It creates an illusion of interactivity and variety where there really is none. It's my way to enhance what would otherwise be a 5-10 screen series of one comment, one reaction type story exposition where what the player is selecting is basically a fancy "next" option. It would be more useful to combine that into a single set of pages rather than having multiple pages at each node. (If that makes sense to anyone other than me, I'll be surprised. :) )

If you are looking for additional changes, one thing that makes me a little nuts about AC is the toptext field. It doesn't match the width of either the size1 or size2 screens, so it's difficult to gauge where text will wrap in the browser. Also, it is only a single line without word wrap, meaning a lot of the time I'm using arrow keys to cursor back and forth to fix mistakes or change a word that is off the screen...then when it does shift, it shifts the text is a jump that makes it difficult to keep track of how far I went. That's the problem statement. heh.

If practical, it would be great if the toptext field was 4 lines in height and either had word wrap, or would accept an enter command to move to a new line, even if browsers will ignore it, I could press enter after <br> to mimic the browser view in the toptext area. Also, if there was a way to mark where size1 and size2 text would wrap in the browser, even if I set them manually, that would be great too.

I don't have an issue with any of the other field lengths or sizes, but the toptext field size in AC is a constant irritant for my personal work style. If it's not easily changeable, I'm ok with it staying as it is, that's just where my current bottleneck is at. Once you clear it, true to the nature of bottlenecks, another will develop. :)

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 » Mon, 13Jul08 07:16

Showing you where it'll wrap won't work because AC doesn't know how wide the player's browser window is or what zoom level he's using. Making it multiline is possible, though. Originally, AC was used by people with smaller monitors so I made it as compact as possible. But I doubt that's a problem anymore. I'll look into it.

I understood your use case for the text function feature. I was thinking about something similar today.

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 tlaero » Sat, 13Jul13 03:28

I've uploaded version 3.8 of Adventure Creator:
https://hotfile.com/dl/233770423/07740d ... r.zip.html

This is a rather large update. You need to update the template when you update AC.

I added support for _game.js gameImgLeft() and gameImgRight functions. These allow you to put html to the left and/or right of the main image. See the updated example and note the change in the css files, especially the change from "img" to "img#image". The cost of using this functionality is that you can no longer set the default image size. That effectively means you either need to make all game images the same size or set an override for each of them. If you don't use the functionality, you don't have to change anything.

I also added the ability to call functions in toptext and table entries. Wrap function names in [[brackets]]. You can use this for changing text programmatically, like saying "he" or "she" depending on the sex of the player. The example uses this functionality to get the player's name and use it.

Also made the toptext box in AC three lines long. Wolf, I know you asked for 4, but 3 worked for all but two pages in BEW1.5, and they needed 5. I'm not crazy about the big box, so I compromised to 4. If it's still a big problem I'll consider making it settable.

As always, let me know if you have any questions.

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 » Sat, 13Jul13 04:14

tlaero wrote:I've uploaded version 3.8 of Adventure Creator:
....
This is a rather large update. You need to update the template when you update AC.
.....
Also made the toptext box in AC three lines long. Wolf, I know you asked for 4, but 3 worked for all but two pages in BEW1.5, and they needed 5. I'm not crazy about the big box, so I compromised to 4. If it's still a big problem I'll consider making it settable.
Thanks Tlaero!

Re updating the template, I'm probably being dumb, I'm not sure what you mean by that. I generally just copy AC over top of itself on updates, and then copy the functions.js into my BEW working directory. Anything else I need to do considering I probably won't be using the left/right features?

RE top-text. Three lines is great! Especially now that the field word wraps, and scrolls down. Vertical scrolling is much more intuitive for me than the weird horizontal shifting it used to do. I also like that the AC is now re-sizable, at least horizontally beyond the image size, although that's not too helpful to me. Fixed windows sizes are just a pet peeve of mine...because I'm a control freak and like the windows the size I want them. [img]images/icones/icon15.gif[/img]

You probably know by now that you can't drop a build without me immediately asking for something else. heh. I wouldn't mind if you added mouse wheel scrolling, or a scroll-bar to the field if text goes more than 3 lines, but those are so minor, they aren't worth considering unless they are really, really easy. It doesn't really impact my productivity at all. (vertical resizing of the window and dynamic image sizing would be fun too, but those are just flash, and wouldn't add much to the function, so again, not unless its really, really easy, otherwise not worth your time.)

The text variables looks interesting too. I'll play with that a little over the weekend.

Once again, great work! I can't express my appreciation for all the effort you put into the 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 » Sat, 13Jul13 05:44

You're welcome, Wolf.

There's an adventurecreator.exe and an adventurecreator_template.txt. Usually you just need to update the exe. This time you need the template too. You'll need it even if you don't do the side bars. You'll also need _functions.js from the example.

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 » Sun, 13Jul14 06:34

Hi Tlaero,

Got a bug in ver 3.8 regarding the multi-line text. It tends to disappear.

Steps to reproduce.
1. Open AC
2. Load BEW 0.1.5 _begin.htm
3. Edit -> Show Game View
4. In game view select n1club094.htm
5. In AC main, After each <br> press ENTER to generate a new line.
6. Save. (optional, open in Browser to see that all is well with the top text. Also, note that all is well in Game View.)
7. In game view, select n1club093.htm (opens normally in AC)
8. In game view, select n1club094.htm. (ERROR - top text disappears from game view, and from AC main window. Browse HTML still displays top text.)

At this point, the top text for n1club094.htm is gone, according to AC. If I close AC, reopen it and show game view, the toptext is still missing, but the actual HTML file is normal with toptext unless I resave the page in AC. If I save the file at this point, it clears the toptext from the HTML file as well. It's not specific to that particular page, I just use that because that's the one that tripped me up. Press enter to create a new line on any page. then reload the page into AC and it will probably occur, but I haven't tried it, I've just done the gameview navigation listed above. I suspect it has something to do with the new-line character interfering with the write to whatever cache you are using, but that is a SWAG (Scientific Wild Assed Guess.)

Probably a critical bug because it results in loss of data if I save an affected page, but not a show stopper. I can avoid it by not creating new lines in the AC field and just letting the lines wrap, so there is a workaround. I like use new line to help me visualize better what it will look like on screen. I have versioning running on the folder so I didn't lose any work, just restored previous versions when I saw what was happening. Set me back a whole 2 minutes. :)

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, 13Jul14 08:12

It's always been like this, you just never tried putting newlines in. I read in the HTML line by line, so you breaking up the toptext across multiple lines completely breaks me.

There's no good way for me to support you putting newlines in the toptext. Maybe I could auto enter them on <br> and strip them out when writing the htm file, though. That's not a bad solution. I'm currently trying to make populating the GameView faster when you have a lot of files. I'll play with the newlines while I'm in the code.

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 tlaero » Mon, 13Jul15 07:08

I just uploaded version 4.0 of AdventureCreator. https://hotfile.com/dl/234151797/8094bc ... r.zip.html

I did a lot of work to improve the performance of GameView. In BEW1.5 it used to take 94 seconds to open GameView. Now it takes 7.

I also added a few things for Wolf. Scrollbars and mousewheel scrolling in TopText. You can also add newlines in toptext without worry of data loss. Only newlines after a <br> (or <br/> or <br />) are kept though. They're added automatically on open as well.

You only need to update the exe. Let me know if you see any problems with GameView or opening files. Those are the places where I made the most changes.

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 » Mon, 13Jul15 16:03

Hi Tlaero,

Overall it looks great. I like the new multi-line functionality with scrolling, and the gameview does seem to open much quicker, and seems to do so cleaner. A pleasant side-effect is the post-save link check feels faster too, but that may be a placebo effect.

One problem with opening files though. When I open a page, the AC window seems to scale up to the image size. Unfortunately, the hit targets do not scale up as well, making them all misaligned in the AC window. Also, I cannot shrink the AC window manually to compensate as it will not scale down the image when I try to re-size the window, and just snaps back to a minimum of the image size in the viewer.

If I change any of the text and save the file without touching the hit targets, they are aligned correctly in the web browser, even though they were mis-aligned in AC.

If I re-align the hit targets, or create new hit targets on a new page through AC, they are not aligned in the browser.
_startmenu.htm using HD images in BEW is a good example of the effect where there are well defined hit targets in the image.

I have no strong preference if the AC window and image are fixed size, or the hit targets scale with the window. I lean slightly to scaling hit targets based on my pet peeve mentioned earlier in the thread, but it's really minor, so my vote is for whichever is easiest for you. :)

Thanks again for all of your work on this!

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, 13Jul15 22:40

Disregard above. Apparently there was a PEBCAK error. (Problem Exists Between Chair and Keyboard). I didn't realize AC used CSS files from the game directory, and I had copied the style sheets over from the AC folder, which really borked things up. :) I restored the old version of the style sheets and everything is working normally now in the new version of AC. I am really enjoying the multi-line toptext. It is making my life significantly easier.

Thanks 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 » Tue, 13Aug13 17:31

Hi Talero,

A couple very low priority requests to consider for whenever you have spare time and a bigger change for AC. [img]images/icones/icon13.gif[/img] Both are just 'nice-to-have' features and certainly not worthy of a separate build.

1. Would it be possible to add wrap text, or the text line break functionality to the game view? I'll sometimes read the flow of the previous two or three pages in game view while I'm working on a page to help keep the same voice, and it would be nice not to have to scroll to the side for the more wordy pages.
2. Can you make the broken link check a toggle in the edit menu, similar to how the "Treat Self Links as Broken" option is configured? Currently, on my laptop that check takes about 2 seconds to complete for BEW every time I save a page. Not noticeable when doing my standard page creation because it happens out of focus on my second monitor and I'm not navigating with game view much. When I use the game view to make quick edits on a series of four or five page, or am tweaking a conversation thread and using the game view heavily to navigate in combination with saves, waiting for the link check refresh is noticeable.

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 » Fri, 13Aug16 18:34

Hi Tlaero,

It's your favorite forum pest with another feature request for the next version. ;)

The bottom table entries have a great feature where if you only have one entry, it will automatically go to the center, or with two, they go to the outside. It would be great if this were enhanced so that one entry would center and span the entire image (one table row), two entries would split the space (two table rows), and three would remain the same as it is now. a more dynamic table for 1, 2 or 3 entries would be awesome. It would allow for some longer "say" items without wrapping if there are only one or two options. Also, an autosave/update for existing pages would be helpful for me if the change goes in. [img]images/icones/icon13.gif[/img]

It could also give flexibility to add a fourth entry as well, but that would mean another line in AC...and I don't know that I really need four anyway. Just throwing it out there for thought.

Thanks for your consideration and maintaining this great tool!

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 2 guests

eXTReMe Tracker