The Daily Click ::. Forums ::. Klik Coding Help ::. Sub Application and Direct 3d do not get along too well together.
 

Post Reply  Post Oekaki 
 

Posted By Message

Pyroklastic

Possibly Insane

Registered
  06/03/2010
Points
  2209

GOTW Winner August 2010!
19th February, 2013 at 19/02/2013 01:47:52 -

I've been working on a game for a while now, adding new features as I've went along. A while back I added a Map/Inventory screen that works using the Sub Application object, and it did work wonderfully. Since then I've been adding many things, none which are really important to mention concerning this problem except for lighting.

I knew from the start I wanted the game to have lighting effects, so after trying out a few different methods for the effects I decided I really like Using the 2 layered Direct 3d approach... and it looks really cool. Then I ran into this problem almost immediately and I have yet to figure out a fix for it:
Once I converted my MMF2 Dev Project to one that uses Direct 3d, when ever you try to access the map/inventory screen while the game resolution is switched to Full Screen, it simply bugs, it does not pause the application anymore, it does not ( from what I can tell ) even attempt to display the Sub App. This is pretty strange, considering even with Direct3d in the project it still runs just fine in Windowed Mode. I've tried a few different things over the last few days, none of them has fixed this or even given me a clue as to what the problem may be.

I'm hoping you knowledgeable fellows here can school me on what I'm doing wrong. I'm throwing a link in to a slimmed down version of my game with just the main screen, the map/inventory Sub App screen so you can see the problem first hand.

Any suggestions are very much appreciated, I really like the way the lighting effects are turning out, I'd hate to have to use some other method rather than the Direct3d approach.

The "m" key will bring up the map screen, once in there you can hit "i" to view the inventory if you feel like it.
The "escape" key will take you back to the main screen.

http://www.filedropper.com/needstobefixed

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
22nd February, 2013 at 22/02/2013 01:04:29 -

Im fairly sure that the Sub app is bugged with Driect 3D and Clickteam are aware, i tend not to use the sub app for anything as it is horribly inefficiently and leaks memory like a tap.

If i were you i would try and get rid of the sub app from your project altogether, it might be a pain but it will be much better in the long run.

Sorry i couldnt actually help.



 
n/a

Rick Shaw



Registered
  30/04/2008
Points
  158
22nd February, 2013 at 22/02/2013 02:55:37 -

I think I had a problem like this in my game. The advice I got from the clickteam forum was to add /ddraw and /novr to the command line runtime options. You can do this in the application properties pane. I feel your pain!

 
n/a

Pyroklastic

Possibly Insane

Registered
  06/03/2010
Points
  2209

GOTW Winner August 2010!
22nd February, 2013 at 22/02/2013 04:07:36 -

Rick, that does actually work at first glance, but when it comes to the frame using the light effect "Subtract" is never applied and doesn't seem to turn on through any action I know. Pretty screwy stuff going on.

Windy, thanks for the advice. That would also open up a huge can of worms though at this point. I don't really have a problem making it all one screen and no Sub App, except that I'm not aware of any other conventional means to make parts of the Frame pause-able. example of the problem being, player is messing around in the inventory or looking at the map while he's getting beat up elsewhere because the game is still running.

Anyway I know a little bit more now because of you guys, thanks.

 
n/a

nivram



Registered
  20/07/2006
Points
  171
22nd February, 2013 at 22/02/2013 16:33:50 -


Originally Posted by Pyroklastic
Rick, that does actually work at first glance, but when it comes to the frame using the light effect "Subtract" is never applied and doesn't seem to turn on through any action I know. Pretty screwy stuff going on.

Windy, thanks for the advice. That would also open up a huge can of worms though at this point. I don't really have a problem making it all one screen and no Sub App, except that I'm not aware of any other conventional means to make parts of the Frame pause-able. example of the problem being, player is messing around in the inventory or looking at the map while he's getting beat up elsewhere because the game is still running.

Anyway I know a little bit more now because of you guys, thanks.



Put your events in a group and disable while you are looking at the inventory. Enable your game when you are done.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
22nd February, 2013 at 22/02/2013 16:49:51 -

nivram knows what he's talking about.

A user on the Clickteam forums was struggling with a similar problem with subapps and I mentioned the same fix, but he adamantly declared that that was a bad idea and won't work even though I've used it in dozens of projects.

Anyway yes, put everything in a group and disable the group. If you have extra objects that use Clickteam's built-in movements then you'll have to stop and start those too, but it's still the best way.

 
n/a

Pyroklastic

Possibly Insane

Registered
  06/03/2010
Points
  2209

GOTW Winner August 2010!
22nd February, 2013 at 22/02/2013 19:57:27 -

So the overall consensus is that the sub app is just not worth while? Man, I was all happy when I started using that thing. I'll give the group thing a whirl. I might just make the inventory realtime.. the more I think of it though it does sound appealing to have less conditions running all at once.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
22nd February, 2013 at 22/02/2013 22:27:54 -

Sub Apps have their place, but not for pausing applications.

 
n/a

Rick Shaw



Registered
  30/04/2008
Points
  158
23rd February, 2013 at 23/02/2013 20:27:16 -

You could always try the advice I was given in this thread a while back, when I had the same issue: http://community.clickteam.com/showthread.php?t=67691&page=10&p=504712#post504712

Essentially, you want to create a launcher application that handles changing the resolution to full screen. I just now did this with my project and got Direct3D 9 + a working subapplication.

 
n/a

Pyroklastic

Possibly Insane

Registered
  06/03/2010
Points
  2209

GOTW Winner August 2010!
23rd February, 2013 at 23/02/2013 21:46:55 -

Thanks Rick I'll check it out

 
n/a

Pyroklastic

Possibly Insane

Registered
  06/03/2010
Points
  2209

GOTW Winner August 2010!
24th February, 2013 at 24/02/2013 02:44:46 -

Rick you totally solved it, seems me and you had very similar issues thanks for that link. Hearing the sub app object leaks memory like a tap kind of scares me, but all the same it works with that method and the lighting is perfect, thanks.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
24th February, 2013 at 24/02/2013 05:46:46 -

I think they fixed the memory leak issue. I reported it on the Clickteam forums a few years ago and I haven't had the problem since.

 
n/a

Rick Shaw



Registered
  30/04/2008
Points
  158
25th February, 2013 at 25/02/2013 20:49:58 -

Glad to help!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click