Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Confusing Problem With View.UpdateArea (Era of War)
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BioHazardousWaste




PostPosted: Sat Feb 14, 2004 5:12 am   Post subject: Confusing Problem With View.UpdateArea (Era of War)

As suggested I have been using the View.UpdateArea command to deal with graphics and create animations in Era of War. It was working nicely until I wanted the user to input a command. The problem is that the user cannot see what they are typing. I tried setting the window back to nooffscreenonly mode, but that screwed up the lines seperating the three sections of my window, and is not very nice switching the type back and forth so often. So I need to know what I can to do so that the user can see what they are typing.
Sponsor
Sponsor
Sponsor
sponsor
TheXploder




PostPosted: Sat Feb 14, 2004 10:09 am   Post subject: (No subject)

I think the main reason is that View.UpdateArea updates only that one specific area unless you're typing within the View.UpdateArea you are not going to see it.... you could make another View.UpdateArea for the text...

[Edit] Now that I think about it... That's not the problem...

[Edit] It's becuse it doesn't do any updates while it gets an input... Try using fork...
BioHazardousWaste




PostPosted: Sat Feb 14, 2004 11:52 am   Post subject: (No subject)

Not exactly sure how that would work... could you give me an example please?
Cervantes




PostPosted: Sat Feb 14, 2004 12:09 pm   Post subject: (No subject)

if you were to use View.Update (no area part) does it work?

I can't really think of why without seeing the code. You can PM me all or part of the code and I'll take a look Smile
TheXploder




PostPosted: Sat Feb 14, 2004 12:24 pm   Post subject: (No subject)

no I tryed View.Update, it doesn't work, only way I found is this, but its so, slow, maybe gotta add some delay... ohh, ya, delay 15 works

code:
View.Set ("offscreenonly")

var word : string

process Get
    get word
end Get

process Update
    loop
        View.Update
        delay(15)
    end loop
end Update

fork Get
fork Update
BioHazardousWaste




PostPosted: Sat Feb 14, 2004 12:30 pm   Post subject: (No subject)

Thanx man, that seems to work allright... you forgot to include an exit when statement Razz, but I got that figured out.
Cervantes




PostPosted: Sat Feb 14, 2004 12:40 pm   Post subject: (No subject)

Xploder how could you be so cruel as to suggest processes....... they suck Razz
bio did you get it to work my way or xploder's cursed processes way?
BioHazardousWaste




PostPosted: Sat Feb 14, 2004 12:43 pm   Post subject: (No subject)

Quote:
Xploder how could you be so cruel as to suggest processes....... they suck
bio did you get it to work my way or xploder's cursed processes way?


Xploder's cursed processes worked Razz... but processes will lag the game up will they not?
Cervantes




PostPosted: Sat Feb 14, 2004 12:48 pm   Post subject: (No subject)

Yes, horribly. Confused
TheXploder




PostPosted: Sat Feb 14, 2004 1:50 pm   Post subject: (No subject)

ok I think I know another way... use graphic text... and you can update that. I do know that processes suck, and I told you already. View.Update doesn't work because it waits for you to press enter, it doesn't update while you type, that is the problem...

[Edit] So getch might work, better...
Tony




PostPosted: Sat Feb 14, 2004 1:52 pm   Post subject: (No subject)

no no no Rolling Eyes

what you need to do is create a console window. Basically just another distinct View.UpdateArea where text is displayed. You would just need to be able to minimize/maximize that area so it doesn't get in the way... Or keep it on the game screen with a timer.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
recneps




PostPosted: Sun Feb 15, 2004 1:29 pm   Post subject: (No subject)

Tony's on to something there, you could have a separate window open

code:
var get:int:=Window.Open ("Title; Enter a command!;400;400")

then just have the user input info into that window, like HL console Smile (except its separate window)
sport




PostPosted: Sun Feb 15, 2004 3:03 pm   Post subject: (No subject)

code:

Code:
var get:int:=Window.Open ("Title; Enter a command!;400;400") 

will not work, because get is a predefined word so jus change get to any other word.[/quote]
Cervantes




PostPosted: Sun Feb 15, 2004 5:23 pm   Post subject: (No subject)

I don't think that's the best way to do it...

that involves having to click twice (once to switch windows and once to click the button or whatever). Also it doesn't look that great. Eh
shorthair




PostPosted: Sun Feb 15, 2004 10:03 pm   Post subject: (No subject)

Albert einstein didnt look that great , but he re defined physics , dude we need a working game not a pretty one ,thast why we belive in updates and fixes , letsnot get hooked on GUI when there is a game to be made
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 20 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: