Computer Science Canada

Multiple Window Data Transfer

Author:  void [ Mon Jun 09, 2003 8:12 am ]
Post subject:  Multiple Window Data Transfer

Oky, heres the problem..i have this gay ass space shooter game, and i cant display the score on the same window, because i use cls alot, and thus making it hard for the player to see his/her score...now..when i shoot and hit...it tells me how many points i gain and howmuch i have...but only for like .5 seconds...now...i wanna make it so that the player can play in one window, and a secondary window that i will open will display the score...never needing to cls....is this possible...if yes...how would i go about sending data to taht window for display..thank you

Author:  Prince [ Mon Jun 09, 2003 10:03 am ]
Post subject: 

update the score normally and use Window.Select (winID) to put the score in the other window... dont forget to switch back for the game or itll get very screwy

Author:  Mephi [ Mon Jun 09, 2003 11:03 am ]
Post subject: 

use a delay when sum1 gets hit or sumthin....

Author:  ShadowStorm [ Mon Jun 09, 2003 3:32 pm ]
Post subject: 

If you use delay.. the game would stop.. i don't think he want's that to happen..

Author:  void [ Mon Jun 09, 2003 3:56 pm ]
Post subject: 

thanks prince

Author:  void [ Mon Jun 09, 2003 4:05 pm ]
Post subject: 

one more thingy..how do u position ur screen aagain when u open it.....

Author:  PaddyLong [ Mon Jun 09, 2003 4:33 pm ]
Post subject: 

var window : int := Window.Open ("position:x;y")

Author:  Andy [ Mon Jun 09, 2003 5:24 pm ]
Post subject: 

ya, but u dun even have to use Window.Open you can just use setscreen
code:

setscreen("position: center;center)
setscreen("position: center;top")

Author:  PaddyLong [ Mon Jun 09, 2003 7:09 pm ]
Post subject: 

well if he's going to be using multiple windows, he kinda needs Window.Open

Author:  Andy [ Mon Jun 09, 2003 7:19 pm ]
Post subject: 

true, u got a point there

Author:  Andy [ Mon Jun 09, 2003 7:20 pm ]
Post subject: 

hey does any body know how to close a window that wasn't opened with Window.Open?

Author:  PaddyLong [ Mon Jun 09, 2003 7:29 pm ]
Post subject: 

I would have thought something like this would have worked, but apparently you're not supposed to be able to close the main run window...

code:

var activeWindow : int
activeWindow := Window.GetActive
Window.Close (activeWindow)

Author:  Andy [ Mon Jun 09, 2003 7:32 pm ]
Post subject: 

damn, cause its real screwy if u have gui on a opened window

Author:  Mazer [ Mon Jun 09, 2003 7:36 pm ]
Post subject: 

dodge_tomahawk wrote:
hey does any body know how to close a window that wasn't opened with Window.Open?

i'm pretty sure you can't. just start your program with your Window.Open window or at least make sure you don't draw/put before it's opened

Author:  PaddyLong [ Mon Jun 09, 2003 7:38 pm ]
Post subject: 

if it's something like a game or something where I care about what size the window is or whatever I'll usually always have my first line as my window

Author:  void [ Mon Jun 09, 2003 8:37 pm ]
Post subject: 

why dont u just do this
code:

var guiWIN,gameWIN:int
var x,y,b:int
guiWIN:=Window.Open("fullscreen")
put "THIS IS THE GUI"
loop
Mouse.Where(x,y,b)
exit when b=1
end loop
gameWIN:=Window.Open("fullscreen")
Window.Close(guiWIN)
Window.Select(gameWIN)
put "THIS IS THE GAME"

Author:  Homer_simpson [ Mon Jun 09, 2003 8:56 pm ]
Post subject: 

the fullscreen thing doesn't work...=/

Author:  void [ Mon Jun 09, 2003 8:59 pm ]
Post subject: 

ur kidding me...it works for me ( i dont use turing 4.x tho...i use the older one...the one that supports sprites (3.something))...maybe that might be it...but that program should work fine

Author:  Homer_simpson [ Mon Jun 09, 2003 9:16 pm ]
Post subject: 

well i got the 4.0.3 and it doesn't work =/
man turing's wierd...functions that used to work in older versions dont work in new version... it's like it's getting worse everyversion that comes out... =Þ

Author:  PaddyLong [ Mon Jun 09, 2003 9:50 pm ]
Post subject: 

for full screen in 4 for you use
"graphics:max;max" which gives a window that takes up the whole screen rather than the full screen that was in 3

Author:  Homer_simpson [ Mon Jun 09, 2003 10:09 pm ]
Post subject: 

that's not full screen...
fullscreen is when u can't see the window top bar...

Author:  PaddyLong [ Mon Jun 09, 2003 10:13 pm ]
Post subject: 

yeah I know that's not fullscreen... but that's about as close as you can get in 4 as far as I know... in 3 all you did to get fullscreen was fullscreen as void said

Author:  Andy [ Tue Jun 10, 2003 5:54 pm ]
Post subject: 

homer, u only have 4.03? come on man, get with it, 4.04c was out a long time ago

Author:  Homer_simpson [ Tue Jun 10, 2003 6:16 pm ]
Post subject: 

oh yeah i meant 4.0.4c or something like that..(the latest version)... must have been a typo or something... =/


: