English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 04 April 2018, 08:39   #1
earok
Registered User

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,812
Preventing background interaction when running in QAMIGA mode

I had a bug report re: Road Avenger from Predseda.

"A technical notice: system is not closed up / locked when the game is launched from WB. It means if you are clicking with a mouse / pressing keys in the game, you also do the same in workbench behind. This could accidentally lead to some unexpected actions in your system. The same with TimeGal."

Road Avenger (as does TimeGal) runs 99% of the time in QAMIGA mode, it has to because it's constantly loading data from the disk (it only briefly drops to BLITZ to use the CreateDisplay command)

What should I be doing to prevent background interaction?
earok is offline  
Old 04 April 2018, 11:09   #2
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 3,157
Ooh, interesting situation! The simplest thing I can think of is to open a fullscreen window without the normal window gadgets right before the game starts. That will absorb most of the keyboard and mouse inputs, other than left-Amiga shortcuts for screen flipping or system patches.

Other than that, some careful use of Forbid() and Permit() will stop and start multitasking as and when you need it. If you're constantly streaming that might not be doable, but if you're loading in chunks, you can very quickly turn it on and off as you go. It won't make for very system-friendly behaviour however...
Daedalus is offline  
Old 05 April 2018, 00:36   #3
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,624
Isn't there a "close WB" command?
idrougge is offline  
Old 05 April 2018, 01:18   #4
earok
Registered User

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,812
@Daedalus The window idea sounds like the easiest, though I've never used Window before! After some experimenting I came up with this, does that look right to you?


Screen 0,1,""
Window 0, 0, 0, 320, 256, $800, "", 0, 0


@idrougge Cheers! I didn't know about the CloseWB option.. but I presume if it's used there's now way to get back into Workbench afterwards? I think on the balance, it'd be more useful if users didn't have to restart their Amigas after playing the game, but I've got other projects where it'll be handy
earok is offline  
Old 05 April 2018, 02:06   #5
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 3,157
Hmmm, I don't know a CloseWB command, but if it's available (maybe in the 3rd party libraries?) then that would be the easiest way to go. I suspect it would just reopen the WB screen again when it finishes since that happens with lots of other programs that close Workbench, though I couldn't be sure.

As for the window method, yep, that looks perfect. I was actually thinking of opening a window on Workbench instead (WbToScreen 0 assigns Screen ID 0 to the Workbench screen so you can use it in Blitz), but that's the same effect.
Daedalus is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interaction of signals and noixemul pipper Coders. System 0 05 February 2018 20:01
Is my CyberVision 64/3D running in ZII mode? nogginthenog support.Hardware 3 04 December 2016 18:27
Slamtilt running in background :S xoen support.Games 2 09 February 2010 07:45
If I have WinUAE running on a 50 or 100Hz screen in PAL mode (50 fps), [more] fmcpma support.WinUAE 3 27 August 2006 11:17
Sound running slow only in windowed mode andreas support.WinUAE 0 15 June 2002 01:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.05911 seconds with 13 queries