Typewriter!

Talk about making games.

Re: Typewriter!

Postby Hblade » Sun Mar 24, 2013 3:24 pm

LCL I'm using this! X3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 180 Give a positive score

Re: Typewriter!

Postby lcl » Sun Mar 24, 2013 6:33 pm

Great! :D
SABRE (semi-3D engine) official development topic: viewtopic.php?f=6&t=12644
A game project that utilizes SABRE: viewtopic.php?f=4&t=13297
User avatar
lcl
 
Posts: 2239
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 265 Give a positive score

Re: Typewriter!

Postby jonathang » Mon Feb 08, 2016 6:18 pm

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! ;)
Currently: Semi-Active.
Working on: Maybe putting my test games in gamejolt, polishing them a bit, but I still don't know when.
User avatar
jonathang
 
Posts: 694
Joined: Fri May 06, 2011 12:45 pm
Location: In front of my computer.
Score: 37 Give a positive score

Re: Typewriter!

Postby lcl » Mon Feb 08, 2016 8:57 pm

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 ++;
}
SABRE (semi-3D engine) official development topic: viewtopic.php?f=6&t=12644
A game project that utilizes SABRE: viewtopic.php?f=4&t=13297
User avatar
lcl
 
Posts: 2239
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 265 Give a positive score

Re: Typewriter!

Postby Zivouhr » Tue Feb 09, 2016 12:22 am

Cool. I'll take a look at it. Thanks Lcl and Pyrometal.
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 545
Joined: Sat May 17, 2014 2:12 pm
Score: 58 Give a positive score

Re: Typewriter!

Postby jonathang » Tue Feb 09, 2016 10:53 am

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
Currently: Semi-Active.
Working on: Maybe putting my test games in gamejolt, polishing them a bit, but I still don't know when.
User avatar
jonathang
 
Posts: 694
Joined: Fri May 06, 2011 12:45 pm
Location: In front of my computer.
Score: 37 Give a positive score

Re: Typewriter!

Postby lcl » Tue Feb 09, 2016 11:17 am

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:
SABRE (semi-3D engine) official development topic: viewtopic.php?f=6&t=12644
A game project that utilizes SABRE: viewtopic.php?f=4&t=13297
User avatar
lcl
 
Posts: 2239
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 265 Give a positive score

Re: Typewriter!

Postby jonathang » Tue Feb 09, 2016 1:41 pm

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:
Currently: Semi-Active.
Working on: Maybe putting my test games in gamejolt, polishing them a bit, but I still don't know when.
User avatar
jonathang
 
Posts: 694
Joined: Fri May 06, 2011 12:45 pm
Location: In front of my computer.
Score: 37 Give a positive score

Re: Typewriter!

Postby Zivouhr » Wed Feb 10, 2016 1:10 am

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.
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 545
Joined: Sat May 17, 2014 2:12 pm
Score: 58 Give a positive score

Re: Typewriter!

Postby jonathang » Wed Feb 10, 2016 8:15 am

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! ;)
Currently: Semi-Active.
Working on: Maybe putting my test games in gamejolt, polishing them a bit, but I still don't know when.
User avatar
jonathang
 
Posts: 694
Joined: Fri May 06, 2011 12:45 pm
Location: In front of my computer.
Score: 37 Give a positive score

Re: Typewriter!

Postby Zivouhr » Thu Feb 11, 2016 3:38 am

Sounds cool. Looking forward to seeing more. 8)
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 545
Joined: Sat May 17, 2014 2:12 pm
Score: 58 Give a positive score

Re: Typewriter!

Postby pyrometal » Sat Sep 17, 2016 2:11 am

Wow, I'm very suprised there are still semi-active users here, using this stuff! :shock:
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Typewriter!

Postby Zivouhr » Tue Sep 20, 2016 3:20 am

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.
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 545
Joined: Sat May 17, 2014 2:12 pm
Score: 58 Give a positive score

Re: Typewriter!

Postby pyrometal » Tue Sep 20, 2016 3:52 am

lol, can't remember them all!

My 2 most popular prototypes were Gelman and Mazeman. GEDs are available for download :)
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Typewriter!

Postby Turon » Tue Sep 20, 2016 5:27 am

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.
User avatar
Turon
 
Posts: 824
Joined: Sun Jan 24, 2010 5:23 pm
Location: In Your Imagination
Score: 31 Give a positive score

PreviousNext

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest