Page 1 of 2

Virtual date Games Page Naming

PostPosted: Sat, 11Jul09 22:52
by ILSWriter
I started developing my first game a little while ago. The first problem that popped up was the naming of the html pages. The tree gets pretty big fast. Anybody have any suggestions on naming the pages to keep them orderly?

Re: Virtual date Games Page Naming

PostPosted: Sat, 11Jul09 23:01
by Graen

I've seen most people sort their pages by scene and then sequence, e.g. Hotel001.html, Shower007.html etc...

Re: Virtual date Games Page Naming

PostPosted: Sat, 11Jul09 23:31
by LRM
An old basic trick was the first line was 10, the second 20. That allowed inserting additional code without a complete rewrite. Might be an option for you as well.
GL Ms Jane.
Lou

Re: Virtual date Games Page Naming

PostPosted: Sat, 11Jul09 23:33
by Graen

10 PRINT "I don't think she's writing this in BASIC"
20 GOTO 10

:crazy:

Re: Virtual date Games Page Naming

PostPosted: Sat, 11Jul09 23:37
by LRM
true
but
Fellatio 10
Fellatio 20
can easily have
Fellatio 11 inserted (pun intended)
Lou

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 00:21
by Trucla
I'll try to be clear in my suggestion. I've used this system in programming (names of data files, code numbers, etc.).

Let's assume the opening page is called game.htm. If you have say 4 possible choices (branches) in the first page you would call them game01.htm, game02.htm, game03.htm and game04.htm.

From the first of the last ones, you would branch to game0101.htm, game0102.htm, game0103.htm, etc. The same would apply to the other three: game0201.htm, game0202.htm, etc.

Then you would continue adding two more digits, starting always with 01, each time you need to branch from the previous page.

These are my two cents! [img]images/icones/icon10.gif[/img]

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 00:51
by TheBrain
Generally though, these games have a lot more linear choices than branching ones (so you'd end up with names like game000001, according to your system). And numbers aren't all that easy to track. Personally I'd name the scene/subscene and then just stick with numbers for the progression (you can also create numbers like 1.1 should you need to insert something or add some branches). Of course this is just about what you personally think keeps the most structure, the player is not concerned with this as long as it works fine.

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 02:58
by Squeeky
TheBrain does have a valid point regarding branching which is not linear, however consider that, while Trucla has provided what is superficially a lineal system there is nothing to prevent using a link to jump from eg, game020302.html to game100901.html where we encounter a bad ending.

Now, as I read TheBrain he is advocating something like, where the numerals are replaced by words and added to the prefix, eg patio_deckchair05.html to bedroom_ensuite02.html which could be the bad end.

Anyway it appears either choice is one of preference, and how well you map your transitions.

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 06:55
by tlaero
Here's what I do.
First I name major scenes. "pool1", "sauna1", "bar1" etc.
Within a scene, I've found that it's generally not really a tree. It's more a line with offshoots that either die off or come back to the main branch eventually. For instance, in Christine's initial bar scene, it goes like this.
Arrive at the bar.
Branching compliments that all eventually lead to getting drinks.
Get drinks.
Branching discussion about work that eventually leads to the bar game.
Start bar game.
Branching gameplay that eventually leads to the other guy hitting on her.
Other guy hits on her.
Etc.

In those branching areas, there are paths that end the game or jump to the end of that section. But, mostly the branches lead back to the next thing and the real trick for the user is to get the most points through the branch.

I use bar1, bar2, bar3 for the major steps and then letters within the branches. bar1a, bar1b, etc. You don't have to do "bar01" because AdventureCreator's Game View sorts bar2 before bar10. (I coded it that way intentionally.) Note, however, that AdventureCreator can sort bar1abc and bar10z, but it doesn't understand if you have two sets of numbers (bar1a3).

As for the branches, what I do is write the text for all of the options while I'm on the page, but I leave the html links empty. I work through one of the branches, then go back to the first empty one (I look for the empty ones in game view) and make it continue with the letters.

For instance, say that bar4 has 3 options for the user to say. I write the three options and put "bar4a.html" as the first href. Then, say that branch takes two more spots before going to the next collection point (bar5). So I do bar4b, and bar4c, where bar4c goes to bar5. Then I go back to bar4, pick up the second branch and start with bar4d. Etc.

Ocasionally I screw up and need to add things in between. Then I just add more letters. If I need something between bar4b and bar4c, I do bar4ba, etc.

Tlaero

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 10:17
by Greebo
tlaero wrote:I use bar1, bar2, bar3 for the major steps and then letters within the branches. bar1a, bar1b, etc. You don't have to do "bar01" because AdventureCreator's Game View sorts bar2 before bar10. (I coded it that way intentionally.) Note, however, that AdventureCreator can sort bar1abc and bar10z, but it doesn't understand if you have two sets of numbers (bar1a3).

The trouble with doing things that way, as I mentioned to rkshooter one time regarding his scene labelling, if someone uses a stricter, more logical viewer, scenes can get out of their intended order. I quite often use Comix to view sequentially labelled graphical stories and the like, particularly since Comix can look inside .zip, .rar and .cbr container files, and your proposed labelling method would foul up some scene ordering.

A similar example of "disorderly conduct" can be seen when folk used to Windows' sloppy acceptance of upper and lower case file names get used to undisciplined file naming and someone using a more organised OS like Linux or some other Unix based system has to pick the bones out of the resultant mess of files - case differences matter!

(Gets off soapbox/high horse and takes it back to stow neatly in its proper place!)

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 18:58
by fleet
Greebo,

Are you saying that a Linux browser would think MYfirst.thml and myfirst.html are two different files? I've dabbled around with Ubuntu, and I remember that filenames in it are case sensitive.

Very respectfully,
fleet

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 19:50
by tlaero
Case differences certainly matter to people accustomed to programming in c-based languages. But I think it's insane to expect everyday end users to understand that Accounting.txt and accounting.txt are different files. People have enough trouble understanding computers as it is. No need to make it needlessly difficult for them.

Tlaero

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 21:13
by fleet
I'm still confused.
Say someone who uses Ubuntu downloads a browser-based game written using Tlaero's Adventurecreator, and that they are using Firefox (which I know works in Ubuntu because I've installed it on an old PC running Ubuntu).
If the hit target area says to go to the file named next.html, and the file is actually named Next.html, will the Ubuntu browser (firefox) work correctly or not?

Very respectfully,
fleet

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 22:21
by Trucla
@fleet: It will not work. the files names are case sensitive in Unix and all its children. Next.html and next.html are files, different files, so when coders are naming them, they should be aware of it among many other things. With Windows it's different, it accepts (almost) anything, including malware... :lol:

Cheers!

Re: Virtual date Games Page Naming

PostPosted: Sun, 11Jul10 23:32
by Greebo
I understand that Microsoft file systems are inconsistent. FAT is case independent whereas NTFS is case dependent, just as EXT2, EXT3 and other file systems that Linux can work with are case dependent. Browsers of any flavour recognise that a .html is case dependent.

My son - a computer geek of the highest order - tells me that the main problem with recognising the correct file name on the net lies with the servers - ask an Apache server for a file name deviating by just one wrong character, even if the wrongness is only the case, and you will get either a different file to the one you were expecting or an error message.

Don't forget that computers are naturally stupid and literal minded - what they can do is completely dependent on the ingenuity of the software programmer and the idiot feeding in the data - GIGO - Garbage In = Garbage Out

My suggestion is that wherever possible when naming files use lower case throughout unless you have a very good reason to use upper case and remember that where the order of files counts the natural order is 0-9 then a-z, so put in leading zeros to the extent your numbering system warrants it. For up to 99 start with 01, or for up to 999 start with 001 and then go to the alphabet if warranted