Go Back   Team17 Forum > Archive > Archive > Anything Goes

Reply
 
Thread Tools Display Modes
Old 16 Oct 2006, 18:18   #1
robowurmz
 
robowurmz's Avatar
 
Join Date: May 2005
Location: Scotland
Send a message via MSN to robowurmz
Lib Generator Algothrim

I was wondering if anybody knew of how to go about making an algothrim for a random lib generator. I have an alpha version of the program, but I can't generate a random lib from a choice of 5 or 10. I can only make 1 work. Well, here's the alpha if you're willing to have a look. (download it)
__________________
ヽ(´ー`)ノ
robowurmz is offline   Reply With Quote
Old 17 Oct 2006, 11:10   #2
AndrewTaylor
User Mod
 
AndrewTaylor's Avatar
 
Join Date: August 2001
Location: April 2009
Do you mind explaining what on Earth you're talking about?
__________________
I drink in moderation, and I moderate drunk.

ApathySketchpad.com | friendfeed.com/AndrewTaylor | @Andrew_Taylor | 90-minute Forts patch
AndrewTaylor is offline   Reply With Quote
Old 17 Oct 2006, 12:33   #3
robowurmz
 
robowurmz's Avatar
 
Join Date: May 2005
Location: Scotland
Send a message via MSN to robowurmz
A lib is a story where certain words are missing. Say like this:
Once upon a time there was a (adjective1) (creature1). This (adjective1) (creature1) used to like eating (food1). But one day, something (adjective2) happened, and he stopped eating (food1).

Like that, so the person playing with the lib might enter this:
Adjective1: smelly
Creature 1: worm
Food1: Hamburgers
Adjective 2: shiny

So it would become:
Once upon a time there was a smelly worm. This smelly worm used to like eating Hamburgers. But one day, something shiny happened, and he stopped eating Hamburgers.

I need a way to make a different main story each time from a selection of 5-10. I can't get more than one lib put into a multiple variable string.

Oh, and by the way, the language I'm using is DarkBASIC.
__________________
ヽ(´ー`)ノ
robowurmz is offline   Reply With Quote
Old 17 Oct 2006, 13:38   #4
AndrewTaylor
User Mod
 
AndrewTaylor's Avatar
 
Join Date: August 2001
Location: April 2009
Oh, right. I'm with you.

Without knowing what angle you've approached it fromso far it's hard to know what to suggest. I might have a lookat the demo later but I probably won'tbecause I'm quite busy. Too busy even to put all the spaces in this post.
__________________
I drink in moderation, and I moderate drunk.

ApathySketchpad.com | friendfeed.com/AndrewTaylor | @Andrew_Taylor | 90-minute Forts patch
AndrewTaylor is offline   Reply With Quote
Old 17 Oct 2006, 17:28   #5
Muzer
 
Muzer's Avatar
 
Join Date: May 2004
Location: A very odd place.
Send a message via ICQ to Muzer Send a message via AIM to Muzer Send a message via MSN to Muzer Send a message via Yahoo to Muzer Send a message via Skype™ to Muzer
. .
Attached Images
File Type: jpg error.jpg (10.6 KB, 52 views)
__________________
Join Date: 3rd May 2004
Posts: 4,420 AT LAST COUNT
THANKS DANGER FOR THE BRILLIANT AV, IN USE SINCE 2004!
My old sig! http://myweb.tiscali.co.uk/digitaltv/oldsig.txt
Awards: The oddest thread I have ever seen award. (How many bathrooms in your house?) Most Outrageous Recovery in the Team17 pop quiz 1/2 a point for reading someone's sig.

0118999881999119725...3
Muzer is offline   Reply With Quote
Old 17 Oct 2006, 19:30   #6
robowurmz
 
robowurmz's Avatar
 
Join Date: May 2005
Location: Scotland
Send a message via MSN to robowurmz
Ooh. I don't think your computer can handle Direct3D. Are you using the latest DirectX? Are your drivers updated? Is it a good graphics card?

Edit: I have a new version now! Version 0.3...I'll put it up soon. It's in glorious two-tone blue!
(also on this, you have to press and hold spacebar to begin. It says that you just press it on-screen.)
__________________
ヽ(´ー`)ノ

Last edited by robowurmz; 17 Oct 2006 at 19:34.
robowurmz is offline   Reply With Quote
Old 18 Oct 2006, 17:09   #7
Muzer
 
Muzer's Avatar
 
Join Date: May 2004
Location: A very odd place.
Send a message via ICQ to Muzer Send a message via AIM to Muzer Send a message via MSN to Muzer Send a message via Yahoo to Muzer Send a message via Skype™ to Muzer
It is a crap computer with the latest DX
(crap=4mb video card)
__________________
Join Date: 3rd May 2004
Posts: 4,420 AT LAST COUNT
THANKS DANGER FOR THE BRILLIANT AV, IN USE SINCE 2004!
My old sig! http://myweb.tiscali.co.uk/digitaltv/oldsig.txt
Awards: The oddest thread I have ever seen award. (How many bathrooms in your house?) Most Outrageous Recovery in the Team17 pop quiz 1/2 a point for reading someone's sig.

0118999881999119725...3
Muzer is offline   Reply With Quote
Old 18 Oct 2006, 19:36   #8
Plasma
 
Plasma's Avatar
 
Join Date: February 2005
Location: Galway, Ireland
Send a message via MSN to Plasma
First, you do know that the code is "RND(numb)", right?

Ah, this takes me back to my QBASIC days...
Plasma is offline   Reply With Quote
Old 19 Oct 2006, 10:23   #9
robowurmz
 
robowurmz's Avatar
 
Join Date: May 2005
Location: Scotland
Send a message via MSN to robowurmz
Yeah, I know that, but I store the words the user types in as Strings, and I can't store each lib as a string, as the libs contain the strings needed. It won't let you put strings inside strings.
Here's an example:
`Store Words
INPUT "Adjective>>"; a$
.etc
`showing lib
PRINT "Once upon a time there was a ", a$, "person called dave."
Make this happen:
Once upon a time there was a (adjective) person called dave.

Now, if I do this:
b$ = "Once upon a time there was a ", a$, "person called dave."

I get an error, stating that equals demands no more than ONE variable array.
__________________
ヽ(´ー`)ノ
robowurmz is offline   Reply With Quote
Old 19 Oct 2006, 13:41   #10
AndrewTaylor
User Mod
 
AndrewTaylor's Avatar
 
Join Date: August 2001
Location: April 2009
quoted:
Originally Posted by robowurmz View Post
Yeah, I know that, but I store the words the user types in as Strings, and I can't store each lib as a string, as the libs contain the strings needed. It won't let you put strings inside strings.
Here's an example:
`Store Words
INPUT "Adjective>>"; a$
.etc
`showing lib
PRINT "Once upon a time there was a ", a$, "person called dave."
Make this happen:
Once upon a time there was a (adjective) person called dave.

Now, if I do this:
b$ = "Once upon a time there was a ", a$, "person called dave."

I get an error, stating that equals demands no more than ONE variable array.
That error is (if, as I'm assuming DarkBASIC does this the same way PHP does) caused by the commas.

With the print statement you're passing three values to PRINT: two string constants (text in quotes) and one string variable (a$). You can't pass three values to b$. You want to join the strings. Probably you want to replace the commas with plus signs or full stops (I don't know the syntax for DarkBASIC -- in most languages it's +). That will pass one value made up from the other three.

You can do this with PRINT commands as well, and I consider it good practice to do so.
__________________
I drink in moderation, and I moderate drunk.

ApathySketchpad.com | friendfeed.com/AndrewTaylor | @Andrew_Taylor | 90-minute Forts patch
AndrewTaylor is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flag generator warfinch Worms Open Warfare 2 2 6 Sep 2007 10:55
W3D landscape generator to W4M. Fizz Missions / Landscapes 2 29 Mar 2007 19:51
Map generator bartlett WORMS - 360 Xbox Live Arcade 1 10 Mar 2007 20:34


All times are GMT +1. The time now is 06:24.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.