Redraw screen in a single frame

Ideas for Game Editor evolution.

What do you think about that feature?

Very nice! I would like it.
5
100%
I don't need it.
0
No votes
 
Total votes : 5

Redraw screen in a single frame

Postby asmodeus » Mon Sep 08, 2008 2:14 pm

What's about a function that redraws the screen? For example you are using a for or while loop, which takes many seconds, you could show the player the status by drawing a canvas and redraw the screen. In that case the player / creator can see that it is working.
User avatar
asmodeus
 
Posts: 483
Joined: Thu Oct 11, 2007 5:04 pm
Location: Germany
Score: 43 Give a positive score

Re: Redraw screen in a single frame

Postby Bee-Ant » Tue Sep 09, 2008 3:56 pm

You can easily test it by variable and textNumber right???
or...why should you use canvas for this???
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Redraw screen in a single frame

Postby asmodeus » Wed Sep 10, 2008 10:03 am

Bee-Ant wrote:You can easily test it by variable and textNumber right???
or...why should you use canvas for this???

There is a progress, for example loading an external file into the game. It may take time but to let the player show the status, you can draw a bar with a canvas. You can't draw with another actor. You usually read files in a single script, in a loop. When drawing in a loop, it won't be shown there until the script in finished and the player only sees the full bar.

Do you understand what I mean?
User avatar
asmodeus
 
Posts: 483
Joined: Thu Oct 11, 2007 5:04 pm
Location: Germany
Score: 43 Give a positive score

Re: Redraw screen in a single frame

Postby Bee-Ant » Sat Sep 13, 2008 12:23 pm

Oh...something like "loading" progress...
It will show you about the current progress status (commonly in percentage)
Hmmm...I dunno how to put this stuff of canvas. I'm not canvas user
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Redraw screen in a single frame

Postby feral » Sat Oct 04, 2008 12:18 am

You can do this, but you need to break up your "loop", and keep an index of where you are up to, then break out of that script to redraw the screen , then return back to the loop where you left off...

eg: if you are loading a large bitmap the one of the first 54 characters will tell you the size of the file..

so now you can ( in pseudo code)

store a global variable called index=0; //or wherever to start loading file/drawing large bitmap etc
store a global variable called size
and another called percentage=.1; //.1 =10 percent

then open the file, and get the size of the bitmap... for example lets say 500k

now in the loading routine
Code: Select all
if (notloaded==true)
for (i=index;i<percentage*size) //do to 10 percent of size (from 0 to 50k)

{
//loading code here
}
index = i  //current position ( if needed when you came back to this loop)  now at 50k ( if size was 500k)

percent=percent +.1  //add another 10 percent
if (percent=>1)
(
notloaded =false
)


now in your view routine, or an actor for your fileprogress bar

Code: Select all
if (notloaded==true)
{
//update progress bar here
)


then you can return to the file loading until complete
eg:
Code: Select all
for (i=index;i<percentage*size) //do another 10 percent of size (this time from from 50 to 100k)


or something like that :)

feral (sorry haven't been around much)
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score

Re: Redraw screen in a single frame

Postby smallville » Sun Oct 05, 2008 7:41 am

this would be useful, because my games NEED LOADSCREENS! in one of my games, when you start it
it freezes itself for about 4 seconds as if it was loading the game...i tried to add a screen to it saying "loading.."
and putting a timer on it but, that didn't work my vote is for YES!
ReDgame 2009
current projects:
S.W.A.T: a shooter/ freeroamer (sort of) with a unique story and a TWIST
User avatar
smallville
 
Posts: 54
Joined: Mon May 05, 2008 9:05 am
Location: Location: Location: Location: location: Loca....
Score: 3 Give a positive score

Re: Redraw screen in a single frame

Postby Bee-Ant » Tue Oct 07, 2008 8:58 am

Wow cool...
Oh yah, what if in normal actor??? :mrgreen:
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest