Page 2 of 3

Re: Typewriter!

PostPosted: Sun Mar 24, 2013 3:24 pm
by Hblade
LCL I'm using this! X3

Re: Typewriter!

PostPosted: Sun Mar 24, 2013 6:33 pm
by lcl
Great! :D

Re: Typewriter!

PostPosted: Mon Feb 08, 2016 6:18 pm
by DeltaLeeds
AMAZING SCRIPT LCL!!! 8)
I'm using this script for my next test thing, however customizing it seems a bit more difficult than I thought it would... :(
So... Whenever I keep trying to make the text come out slower when my game is 60 fps, it ends up breaking the script! Can you show me how to print the type each 2-3 frames instead of each frame? Thanks lcl, again great script! +1 for you! ;)

Re: Typewriter!

PostPosted: Mon Feb 08, 2016 8:57 pm
by lcl
jonathang wrote:AMAZING SCRIPT LCL!!! 8)
I'm using this script for my next test thing, however customizing it seems a bit more difficult than I thought it would... :(
So... Whenever I keep trying to make the text come out slower when my game is 60 fps, it ends up breaking the script! Can you show me how to print the type each 2-3 frames instead of each frame? Thanks lcl, again great script! +1 for you! ;)

Haha, thanks! This is so old, though. :D Pyrometal is the one you should thank, this code works exactly like his, and I wouldn't have been able to write this, without looking at his code back then :)
Anyway, for updating the printed text only every 2 or 3 frames, use this:
Code: Select all
if (counter < strlen(Speak) && frame % 2 == 0) //The second condition here only allows the code to be run if current frame number is divisible by 2 (like 2, 4, 6, 8, ...)
{
    type[counter] = Speak[counter];
    sprintf(text, type);
    counter ++;
}

Re: Typewriter!

PostPosted: Tue Feb 09, 2016 12:22 am
by Zivouhr
Cool. I'll take a look at it. Thanks Lcl and Pyrometal.

Re: Typewriter!

PostPosted: Tue Feb 09, 2016 10:53 am
by DeltaLeeds
lcl wrote:
jonathang wrote:AMAZING SCRIPT LCL!!! 8)
I'm using this script for my next test thing, however customizing it seems a bit more difficult than I thought it would...
So... Whenever I keep trying to make the text come out slower when my game is 60 fps, it ends up breaking the script! Can you show me how to print the type each 2-3 frames instead of each frame? Thanks lcl, again great script! +1 for you! ;)

Haha, thanks! This is so old, though. Pyrometal is the one you should thank, this code works exactly like his, and I wouldn't have been able to write this, without looking at his code back then
Anyway, for updating the printed text only every 2 or 3 frames, use this:
Code: Select all
if (counter < strlen(Speak) && frame % 2 == 0) //The second condition here only allows the code to be run if current frame number is divisible by 2 (like 2, 4, 6, 8, ...)
{
    type[counter] = Speak[counter];
    sprintf(text, type);
    counter ++;
}

Sorry Pyrometal! I forgot to thank you! :oops:
And so it's the strlen part we had to change? I changed everything which kinda ruined it, I thought of using mod but yeah, wrong parts to change. Does strlen count the amount of characters stored in speak, or the amount of characters in the text by the way? Works like a charm lcl! +1 for you! :D

Zivouhr wrote:Cool. I'll take a look at it. Thanks Lcl and Pyrometal.

With your amazing drawing and graphic skills you could make an awesome RPG with this script Ziv! :D

Re: Typewriter!

PostPosted: Tue Feb 09, 2016 11:17 am
by lcl
jonathang wrote:Sorry Pyrometal! I forgot to thank you! :oops:

Haha, he probably doesn't care, it's been ages since he was an active member :lol:
jonathang wrote:And so it's the strlen part we had to change? I changed everything which kinda ruined it, I thought of using mod but yeah, wrong parts to change.

It's not the strlen part you have to change, you have to add another condition to the if besides the strlen check. The && means a logical AND, so the if now has two conditions that have to be true in order for the code to be executed. And this code is using mod, the same exact behavior could be achieved by using the command:
Code: Select all
fmod(frame, 2)

jonathang wrote:Does strlen count the amount of characters stored in speak, or the amount of characters in the text by the way?

Yes, strlen returns the length of Speak. Also, strlen stands for string length.
jonathang wrote:Works like a charm lcl! +1 for you! :D

Great, thanks for the point! :mrgreen:

Re: Typewriter!

PostPosted: Tue Feb 09, 2016 1:41 pm
by DeltaLeeds
lcl wrote:Yes, strlen returns the length of Speak. Also, strlen stands for string length.

Ah, what an awesome function! There are so many useful functions in C I have yet to know about. XD

lcl wrote:Great, thanks for the point! :mrgreen:


No, thank you for the code Lcl, and I hope that someday Pyrometal might raise from the grave of inactivity and see us still check his code out! :lol:

Re: Typewriter!

PostPosted: Wed Feb 10, 2016 1:10 am
by Zivouhr
Thanks Jonathang. I'll take a closer look at this code once I get some extra time this week. How are your games developing Jonathang? Nice to hear this code can help.
Looking forward to some news on LCL's games also.

Re: Typewriter!

PostPosted: Wed Feb 10, 2016 8:15 am
by DeltaLeeds
Zivouhr wrote:Thanks Jonathang. I'll take a closer look at this code once I get some extra time this week. How are your games developing Jonathang? Nice to hear this code can help.
Looking forward to some news on LCL's games also.


The game I'm making is kind off a bullet dodging game that uses Lcl's/Pyro's typewriter script. Looking pretty good so far! I might show the development in the forums later on! ;)

Re: Typewriter!

PostPosted: Thu Feb 11, 2016 3:38 am
by Zivouhr
Sounds cool. Looking forward to seeing more. 8)

Re: Typewriter!

PostPosted: Sat Sep 17, 2016 2:11 am
by pyrometal
Wow, I'm very suprised there are still semi-active users here, using this stuff! :shock:

Re: Typewriter!

PostPosted: Tue Sep 20, 2016 3:20 am
by Zivouhr
pyrometal wrote:Wow, I'm very suprised there are still semi-active users here, using this stuff! :shock:


Hey Pyrometal. I'm pretty sure I've played some of the games you've offered created with Game Editor. Was one of them with the little sci fi character who gained different weapons and abilities as he traveled through a maze, made for small smart phones? I remember text dialog too. Cool game and design. Correct me if I'm wrong. I have to look up the titles again as it's been a year or so since I played them.

Re: Typewriter!

PostPosted: Tue Sep 20, 2016 3:52 am
by pyrometal
lol, can't remember them all!

My 2 most popular prototypes were Gelman and Mazeman. GEDs are available for download :)

Re: Typewriter!

PostPosted: Tue Sep 20, 2016 5:27 am
by Turon
Zivouhr wrote:
pyrometal wrote:Wow, I'm very suprised there are still semi-active users here, using this stuff! :shock:


Hey Pyrometal. I'm pretty sure I've played some of the games you've offered created with Game Editor. Was one of them with the little sci fi character who gained different weapons and abilities as he traveled through a maze, made for small smart phones? I remember text dialog too. Cool game and design. Correct me if I'm wrong. I have to look up the titles again as it's been a year or so since I played them.

Sounds intriguing, don't think it's any game I've tried unless your thinking of Game Over Land, it's one of Pyrometals lesser known projects, it would seem to resemble Cave Story though from what I've seen it's pretty incomplete though it does have something of a soundtrack and Pyro even built his own map editor for the project.