Thread: GUI snippet
View Single Post
Old 04-02-2011, 06:21 AM   #7
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Re: GUI snippet

Yes, you could also extract the data from the in-band stream using a regular expression. For example you could use the hp from your prompt to draw the energy bar, but that means that (1) you'd need to have a specific prompt pattern which included your hp, and (2) the energy bar would only update when you received a new prompt.

However the snippet uses MSDP to transmit the data out-of-band. That means you don't need to capture anything from the in-band stream - you can literally sit there with a static text window and watch your energy bars slowly refill, or watch the landscape scrolling past as you walk across the map, etc.
KaVir is offline   Reply With Quote