The Daily Click ::. Forums ::. Klik Coding Help ::. User Interfaces
 

Post Reply  Post Oekaki 
 

Posted By Message

EonDev



Registered
  13/01/2007
Points
  219
14th January, 2008 at 08:24:44 -

Is it possible to create a user interface using sub-apps?
I tried place the level as a sub-app and putting a UI over it but the UI disappears because the sub-app stays in front of it even if i code it not to
I don't want it to scroll with the character in the level either.
Any ideas?
Would the viewport object help? If so, how do I use it?

 
Breathing? It's optional!

»xerus



Registered
  28/06/2002
Points
  675

You've Been Circy'd!Game of the Week Winner
14th January, 2008 at 10:01:45 -

Is it necessary for you to use a sub-app? Why not just use objects that dont follow the frame?

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
14th January, 2008 at 10:24:55 -

Sub apps are really good for menus, but Mr. Xerus is right in that you should use objects that don't follow the frame.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
14th January, 2008 at 10:28:18 -

Depends what kind of user interface you're using. If you wanted to use subapps, you'd have to put the INTERFACE in the subapp, and place that over the level. At the moment, sounds like you're trying to do it the other way around.

The problem with this though, is that it's very hard and very slow trying to get any kind of semitransparency for a subapp. So you'd need to just use basic boxes, which is a bit lame.

Your best bet is to code things like the heads up display (lives, health, coins collected or whatever) on a separate layer in the level.

As for pause menus, you can handle these using subapps, because the subapp (with 'MODAL' setting ticked) will automatically pause the game underneath it. You can use screen capture to load a copy of the game's current display as the background for the subapp, thereby creating a menu that LOOKS like it has semitransparency and alpha effects in it.

 
191 / 9999 * 7 + 191 * 7

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
14th January, 2008 at 11:47:22 -

In TGF, I just pause the game by putting every single event in a control group, deactivating all groups, stopping all animations and movements (I don't think I've used any movements...), and restarting them all when unpaused.

Frankly making your HUD inside of the level, rather then with subapps, is generally the best choice. If you really insist, your best bet imo would actually be to resize the window of the gameplay; cut it vertically by XX amount, then add an XX subapp window below it, stuck in place. Or just do the screen capture like deadman says

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
14th January, 2008 at 14:30:20 -

This is a task that can be accomplished very easily by simply using MMF2's layers, because you can set the co-efficient of the entire layer to 0.0 making it so that anything on that frame will automatically stay on the screen. Layers are useful for more things then just scrolling.

 
http://www.facebook.com/truediamondgame

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
15th January, 2008 at 14:24:55 -

Except that some controls can have nothing put over them, for example Windows controls (buttons, edit boxes, lists...) and subapps.

 
Old member (~2004-2007).

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
15th January, 2008 at 17:27:27 -

actually, just use the window shape object on the subapp. make sure the white (or BLANK AREA) is transparent. Should work fine then.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!
   

Post Reply



 



Advertisement

Worth A Click