Adventure Creator original thread

Tips, techniques and tutorials about creation tools.

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

Postby tlaero » Wed, 13Apr24 05:48

It's not about modifying the tool. I'd happily do that if it made sense. But I think you don't need a general solution here. Since it's just a few screens, you're better off marking the jpg in your graphics program than having a few pages with non-standard html.

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 Dakutis » Wed, 13Apr24 06:00

tlaero wrote:It's not about modifying the tool. I'd happily do that if it made sense. But I think you don't need a general solution here. Since it's just a few screens, you're better off marking the jpg in your graphics program than having a few pages with non-standard html.

Tlaero


I am trying to learn more, so I asking about that, I understand that it will be easier to paint borders, but then I don't learn anything.
User avatar
Dakutis
lagoon predator
 
Posts: 116
Joined: Wed, 12Nov07 14:17
Location: Lithuania, Kaunas
sex: Masculine

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

Postby tlaero » Thu, 13Apr25 04:08

The problem is that you want the borders in some pages but not the others, with no good way to distinguish them. If you wanted them everywhere, it might make sense to put class ids in the areas and add a border to them.

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 Dakutis » Thu, 13Apr25 05:21

tlaero wrote:The problem is that you want the borders in some pages but not the others, with no good way to distinguish them. If you wanted them everywhere, it might make sense to put class ids in the areas and add a border to them.

Tlaero


I didn't know what is easy to do and what not, so I am asking all these questions.
User avatar
Dakutis
lagoon predator
 
Posts: 116
Joined: Wed, 12Nov07 14:17
Location: Lithuania, Kaunas
sex: Masculine

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

Postby Squeeky » Thu, 13Apr25 06:38

Dakutis. My understanding was that you wanted to have certain map areas (the hotspots) have their borders visible, was that so?

Since I raised the use of "style" in conjunction with "MAP" it seemed that I should at least try it out.
My HTML editor seemed to suggest that I was allowed to do this. My use of HTML is not vast and so that limits my need to use style.

Unfortunately the hotspots which I created in my test remained invisible no matter what I tried by adding style. I have a distinct feeling that style may not be supported when associated with "MAP".


Further to that, I have returned to add that after another experiment that style attributes which I was attempting to use did work with another HTML tag and so I deduce with an element of proof that MAP will not support style.
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4161
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

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

Postby Dakutis » Thu, 13Apr25 08:45

Squeeky wrote:Dakutis. My understanding was that you wanted to have certain map areas (the hotspots) have their borders visible, was that so?

Since I raised the use of "style" in conjunction with "MAP" it seemed that I should at least try it out.
My HTML editor seemed to suggest that I was allowed to do this. My use of HTML is not vast and so that limits my need to use style.

Unfortunately the hotspots which I created in my test remained invisible no matter what I tried by adding style. I have a distinct feeling that style may not be supported when associated with "MAP".


Further to that, I have returned to add that after another experiment that style attributes which I was attempting to use did work with another HTML tag and so I deduce with an element of proof that MAP will not support style.


Yes Squeeky, you understand me right. I didn't know that is so difficult, but thanks for trying. Like Tlaero say there is not so important and there is easy way, but I only wanted to ask about it.
User avatar
Dakutis
lagoon predator
 
Posts: 116
Joined: Wed, 12Nov07 14:17
Location: Lithuania, Kaunas
sex: Masculine

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

Postby me3 » Fri, 13Apr26 10:58

Styling map/area is dodgy as the areas themselves are really positioned where you think, any styling won't show up were the clickable area is.
One solution would be to have a javascript "color" the areas by "replacing" them with other more easily styled elements positioned above the areas on the image. There should be several scripts/plugins out there already that can help with this.
Another method that would give much more options for styling etc would be to replace the map and areas with something like a div element for the background image and then have a list or separate div elements for the areas. That would still work the same way as now, but it would increase the styling option.
me3
great white shark
 
Posts: 89
Joined: Sun, 07Dec02 00:00

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

Postby Squeeky » Sat, 13Apr27 00:47

I frequently make use of a Javascript Vector Graphics library which would do as me3 indicates but I am circumspect about it since it would require embedding the library in the work as well as writing javascript functions. Then too I think it should by tlaero that it does not conflict her "tool". For the work that would be required it seems that marking the zone on the pic and then mapping that area is simpler.
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4161
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

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

Postby Wolfschadowe » Wed, 13May01 19:14

A question on the debug "mode" in the _functions.js.

My JS kung-fu is weak, especially when it comes to outputting HTML.

Currently debug mode lists all the variables in a single column. My game will have close to 75 variables when complete. The current listing means a lot of scrolling. How could I modify the file (assuming it's the outputVar(name) function) to list the variables in columns of...say 15, or spread them among 5 columns or so? I'm open to ideas, but the main goal is to limit scrolling as I debug/play test in the browser and modify the variables as I test the functions.

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, 13May02 05:28

This is a temporary solution because I generally suggest against changing _functions.js, but for now, do this:

In _functions.js go into the outputVar function and remove the characters:
<br/>
from the end of the last document.write.

The next time I update the tool, I'll give you a general solution.

And let me know if the number of variables becomes a problem. If the total of them gets to be longer than 4096 characters, I'll have to add another cookie. The shorter the variable names, the better.

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 » Thu, 13May02 06:36

Thanks for the quick reply Tlaero!

I tried the <br/> trick before posting. I generally try to figure things out on my own first, with files backed up, of course.

The result was...less than optimal. [img]images/icones/icon13.gif[/img] . I certainly didn't have to scroll, which was great, but I completely lost track of what was what and finding what I wanted took more time than scrolling so I put it back.

Not a big deal, so no need to rush out a new version. Let some change requests pile up first, scrolling isn't that bad. [img]images/icones/icon7.gif[/img]

The 4096 characters shouldn't be a problem. Quick math against my variable's average length gives me about 680 variables I can use, minus your administrative variables for running the game. Plenty of headroom there. I'm calculating that I'll need less than 500 total characters for my variables. It is nice to know where that limit is though.

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, 13May06 00:04

I've uploaded a new version of AdventureCreator
https://hotfile.com/dl/212943562/244e5f ... r.zip.html

The program hasn't changed. All changes are in _functions.js and _styles.css. You can get both from the Example or the Tutorials.

Two changes:
1) For Wolf, you can now put a line like
var gameNumDebugCols = 4;
in your _game.js. This changes the number of columns the debug variables are shown in. If you leave the variable off, it defaults to 1.
VERY IMPORTANT: You need to pick up the .debug and .debug a sections from _styles.css. If you don't, you won't see your variables anymore.

2) You can now have multiple save/restores. If you pass a string to "SaveState" and "RestoreState" it uses that string to distinguish between Save cookies. This lets you have multiple saves in one game. It also lets you make each of your games have distinct saves from the others.

If you have any questions, ask away.

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, 13May06 01:06

Wow Tlaero, you're amazing. Followed your directions for 1) and it worked like a charm. I set 5 rows, and no more scrolling. I'll probably re-order my variables in the array so that they are grouped better in the columns, but that should be as easy as changing their order in var gameVars. That makes things much, much easier and quicker for me. Thanks again!

I'm not sure I follow your 2) though. Can you give an example of passing the string? I understand the rest, but how to pass the string I'm just not getting at the moment. I wouldn't mind adding a couple more save slots to BEW. Would it just be as simple as declaring...for example: var save = "....."SaveState('Save1');..... and a matching RestoreState, then adding it to the outputString?

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, 13May06 04:07

Happy to help, Wolf!

Yes, reordering the gameVars will reorder the rows without any ill effects.

As, for #2, yes, that's exactly right, although I'd do 'BEW1' instead of 'Save1' so that the save doesn't conflict with your second game. You could put three save/restores on the Score line, but that looks a little messy. My plan is to use the already existing "SavePage" and "GotoSavedPage" functions to have Save and Restore take me to other pages where Save (or restore) are the three table entries.

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 Dakutis » Mon, 13May06 06:51

tlaero wrote:Happy to help, Wolf!

Yes, reordering the gameVars will reorder the rows without any ill effects.

As, for #2, yes, that's exactly right, although I'd do 'BEW1' instead of 'Save1' so that the save doesn't conflict with your second game. You could put three save/restores on the Score line, but that looks a little messy. My plan is to use the already existing "SavePage" and "GotoSavedPage" functions to have Save and Restore take me to other pages where Save (or restore) are the three table entries.

Tlaero


It will be very cool if you make SavePage.

I have one question, I have 3 different gameVars and I need something like this d = a + b + c where (a,b,c is 3 different gameVars) I need "d", where "d" will be gameVars too, and I use it in other functions and in gameShowScore().

I write something like that:

function calcScore()
{
var d= readVar("a") + readVar("b") + readVar("c");
return d;
}
in score its working but in game functions var d = 0
User avatar
Dakutis
lagoon predator
 
Posts: 116
Joined: Wed, 12Nov07 14:17
Location: Lithuania, Kaunas
sex: Masculine

PreviousNext

Return to The workshop of creators

Who is online

Users browsing this forum: No registered users and 1 guest

eXTReMe Tracker