Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [SOLVED] Real-Time Text Engine  (Read 3687 times)

0 Members and 1 Guest are viewing this topic.
[SOLVED] Real-Time Text Engine
« on: November 22, 2012, 07:16:14 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 29
I've recently made a text engine in Game Maker that uses real-time text scrolling, however doing so proved to be quite inefficient. My process was inefficient because I could not multiple lines of code that held scripts to display a string. For example:

scrDisplayText("Link...");
scrDisplayText("Link... Wake up!");

I've seen many text engine be able to do what is above, but the method they use freezes the game on the current 'step' and displays the entire string. Doing the above in real-time seems impossible because 'real-time' basically means that the game must continue running and not be frozen.

So my question here is has anyone managed to program a real-time text engine that is able to do something like the above code?
« Last Edit: November 22, 2012, 07:25:22 pm by kremling »
Logged
Re: Real-Time Text Engine
« Reply #1 on: November 22, 2012, 08:12:11 am »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
http://zfgc.com/forum/index.php?topic=39853.0

It's done in real time, bud.  Nothing is preventing you from adding this in a normal game situation.  Just adapt to your script.  I used objects for it instead of scripts. Letter to letter, not the entire thing drawn at once.

Just add your scrolling to it?  I would have to see your code, first.  :/
« Last Edit: November 22, 2012, 08:15:37 am by Theforeshadower »
Logged
  • Super Fan Gamers!
Re: Real-Time Text Engine
« Reply #2 on: November 22, 2012, 09:56:25 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 29
Your code works similar to mine so it won't be much of help. :/ You might have not understood what I meant in my first post. What you have in your engine focuses on a main variable that holds a string that is to be displayed on the screen. However, what if you are making a game where a character has multiple things to say, but not crammed in one entire string? Something I thought of before was holding all of the strings that need to be displayed in a Queue ( list ) so whatever needs to be said first will be said first until there are no more strings inside of the Queue. I'm going to try and implement that and see if I can post it here.
Logged

Koh

Re: Real-Time Text Engine
« Reply #3 on: November 22, 2012, 12:29:59 pm »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
Do you need something like this?  http://zfgc.com/forum/index.php?topic=40182.0
If so, I can give you a quick rundown of how I did that, so you can see how you might go about it.  I can't just give you my code because I'm using the Pro Edition, and I'm assuming you're using the Lite Edition, and the Lite Edition can't use surfaces, alphas, blending, or angles.  However, I'm sure there's a way around that.
Logged
  • Megaclipse Games
Re: [SOLVED] Real-Time Text Engine
« Reply #4 on: November 22, 2012, 06:06:29 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 29
@dlbrooks33 - I have the Pro version of Game Maker, but does your current engine freeze the screen in order to display text? If not, how do you handle situations where an object has multiple things to say? Do you put everything in a list and display them one at a time?

EDIT: I was able to solve my problem by using a Queue to hold the series of strings. Thanks for the assistance though you guys.
« Last Edit: November 22, 2012, 07:24:42 pm by kremling »
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.051 seconds with 45 queries.