The Daily Click ::. Forums ::. Klik Coding Help ::. What do u use?
 

Post Reply  Post Oekaki 
 

Posted By Message

Fish20



Registered
  03/12/2007
Points
  263

VIP MemberPS3 OwnerI like Aliens!I'm a Storm TrooperIt's-a me, Mario!I am an April FoolPicture Me This Round 48 Winner!
3rd April, 2008 at 20:59:08 -

I've seen platform games (i.e. Ion Adventures, Tormshire) that have rpg like speech boxes. How do u make those?

 
All your base are in another castle, take this.

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
3rd April, 2008 at 21:29:12 -

text blitter extension quite tricky sometimes

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
3rd April, 2008 at 21:37:37 -

I asked this months and months ago. Phizzy made a splendid example that helped me out... Dunno where to find it tho :$

 
Image

Tell 'em Babs is 'ere...

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
3rd April, 2008 at 22:49:26 -

Depends how complex you want it, I've built ones that run off external Lua scripts that were pretty damn tricky. The way to make text appear one letter at a time is basically like this:

if len(string$("Speech Text")) < len("The Message you want written") {

Text of Speech = left$("The Message you want written",value("Counter"))
value("Counter") += 1
}


Horrible pseudo code there!

I'd upload my Lua example, but I don't think you'd learn from it since it assumes a far bit of knowledge >_>.

 
Image
http://bfollington.tumblr.com

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
4th April, 2008 at 05:09:12 -

@fish - you could also probably get away with loading the message you want into a 2 dimensional array character by character so you can allow for multiple lines of text. then run through the array and print out each one by one. (probably too complex for you at the moment tho).

@ben - im guessing theres more to your lua code example to allow for multiple lines?
would you mind posting it for others who have the knowledge to understand it? pretty please?

in c++, character arrays are far more useful than strings. at least thats what you're taught. and i have found it personally so as well.

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
4th April, 2008 at 06:49:39 -

I'm not using the text blitter

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
4th April, 2008 at 08:33:08 -

Well the breakdown of my Lua system is like this (it's not just text it does all sorts, basically cutscene control):

function TheNameOfMySetOfDialogue()

s("This is a line of text.")
s("do you like my system?");
yn("TESTYN","Yeah, I do","Nope!");
if (TESTYN == 1) then
s("Yay! You said yes.");
endtext();
else
s("No?!");
endtext();
end
end


So what it does is (with some extreme trickyness, that I can't recall exactly) runs through the script and finds which line to execute. So on the first loop it runs line 1, then 2 etc. This allows for both lines that pause and ones that go to the next line and perform their function in one MMF tick.

I've got all sorts in it though, heaps of functions like:

hidetextinstant();
showtextinstant();
showtext();
hidetext();
fadein(speed);
w(ticks);
chav(id);
chnm("Name")
tcol(R,G,B);
tres();
setvar("var",x);
addvar("var",x);
getvar("mmfname","var");
teleport("object_name",x,y);
npcmove("object_name",x,y,jump or no jump allowed);
npchitbox(width,height);
killnpc("object_name");
frame(99);

... You get the idea; it's basically the exact sorta thing The Underside does . So yeah all the conversations are stored in an external file that can be encrypted when the game is done.

Phew!

EDIT: Oh and James, you look like you're just using a string object in the videos - Text Blitter ftw!




Image Edited by the Author.

 
Image
http://bfollington.tumblr.com

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
4th April, 2008 at 09:13:48 -

Aye capitan. It's the lack of global support why I decided against the text blitter. I might switch back to it later, I mean I'm using the text blitter for selectable text options since it can calculate how many lines its using. Just couldn't find a proper use for it in speech text!

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
4th April, 2008 at 09:29:23 -

Yea, that's the easy bit. The tricky part is to get it to print it out properly, without the text jumping around every time it reaches the end of the line (á la the first Underside demo, and pretty much all other klik games that I've seen). One solution is to manually insert linebreaks where needed, but it's possible to do it with code as well.

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
4th April, 2008 at 20:24:17 -

Yeah axel I've always had trouble with that :\. You can probably count the number of characters in a line and if it's greater than a limit you set it can scan backwards for the last space and insert a line break in the source text. I might have a go at something like that later actually...

EDIT: Did it .

Image Edited by the Author.

 
Image
http://bfollington.tumblr.com
   

Post Reply



 



Advertisement

Worth A Click