log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Accessing old floppy disks (Gen:3)
- November developer 'fireside' chat on saturday night (News:)
- RISCOSbits releases a new laptop solution (News:4)
- Announcing the TIB 2024 Advent Calendar (News:2)
- RISC OS London Show Report 2024 (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Jumping from Full Screen to Desktop
 
  Jumping from Full Screen to Desktop
  Gareth2 (21:04 16/9/2005)
  tribbles (22:13 16/9/2005)
    Gareth2 (16:41 17/9/2005)
      tribbles (17:44 17/9/2005)
        Gareth2 (19:15 18/9/2005)
 
Gareth Message #86419, posted by Gareth2 at 21:04, 16/9/2005
AA refugee
Posts: 8
Hello there! In some games I have found that there is a feature which allows you to pause the game by exiting into the desktop. The user can then return to the game in full screen mode exactly where they left off. The only way I know of exiting to the desktop is by using *Desktop, but this closes the program. How do games do this?
  ^[ Log in to reply ]
 
Jason Tribbeck Message #86420, posted by tribbles at 22:13, 16/9/2005, in reply to message #86419
tribbles
Captain Helix

Posts: 929
While I've not done this in a game, I have done this somewhere else.

I think the way I'd do this is to:

- Change screen mode in the game, play the game

- When the user wants to go to the desktop, call Wimp_Initialise and do what you need for the WIMP

- When the user wants to continue playing, exit the WIMP, change screen mode back and continue where you left off

The way I did it in my application was the reverse - it was actually a WIMP application that disabled the screen (to get some more CPU for non-VRAM machines) by going into MODE 0 (rather than completely disable video), and when it finished what it needed to do, it reset the screen mode back again.

  ^[ Log in to reply ]
 
Gareth Message #86421, posted by Gareth2 at 16:41, 17/9/2005, in reply to message #86420
AA refugee
Posts: 8
Thanks for the info Jason!

One of the things that is still puzzling me though is when you are in the game, how exactly do you return to the desktop without completely closing down your program, I usually use *desktop, but this just closes the program. Even in the WIMP I don't see how this could work.

  ^[ Log in to reply ]
 
Jason Tribbeck Message #86422, posted by tribbles at 17:44, 17/9/2005, in reply to message #86421
tribbles
Captain Helix

Posts: 929
One of the things that is still puzzling me though is when you are in the game, how exactly do you return to the desktop without completely closing down your program, I usually use *desktop, but this just closes the program. Even in the WIMP I don't see how this could work.

I'm not sure about this (as I've said; it's not something I've done).

I would imagine that as soon as you call Wimp_Initialise in your code, it'll pop back into the desktop; when you're finished, call Wimp_CloseDown and then change mode.

Try it and see - it shouldn't be that complicated.

The other, long-winded method is to have a Wimp stub application and use a dynamic area or RMA space to store you current game state, so when you exit the game, you save the state. When the user clicks on the icon, the game gets reloaded and the state restored.

  ^[ Log in to reply ]
 
Gareth Message #86423, posted by Gareth2 at 19:15, 18/9/2005, in reply to message #86422
AA refugee
Posts: 8
Hi Jason, You were right! A call to Wimp_Initialise took me out of full screen mode and then another call to Wimp_Poll allowed me to see the desktop. I did try Wimp_Initialise once before, but I did it before I changed mode, so did not think it had worked.

Thanks for the advice.

[Edited by Gareth at 20:17, 18/9/2005]

  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Jumping from Full Screen to Desktop