• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Blazeroni

Alt-Tab working... just not perfectly

10 posts in this topic

Hey everyone, I have ALT-TAB working for my program in a functional sense. You can alt-tab back and forth and everything works fine. My problem is that I''m not satisfied with the alt-tab sequence. I get the "alt-tab window" (the one where you get to choose what application you are going to) except that it doesn''t always appear above my application. Sometimes it does, other times not. I''ve noticed that when you press alt-tab in commercial games they don''t give you the "alt-tab window". Instead, they just minimize and go back to the whatever was last activated. But, I realize that most, if not all, the games I''ve tested for this are DX games. Is this functionality available to OGL? Or barring that, is there a way to make the "alt-tab window" always appear in on top. Or is it possible to set up DX and then use OGL on top of that to get the desired affect? Thanks all. Blazeroni
0

Share this post


Link to post
Share on other sites
I think that the games is using win32 API calls for this and not DX. Without checking do I think that this can be done also if you are using GLUT.
0

Share this post


Link to post
Share on other sites
What Win32 API calls? As far as I know, the only call that affects ALT-TAB is SystemParametersInfo which can only disable ALT-TAB. Also, I''m not using GLUT, nor do I plan on doing so.

If anyone knows of any tutorials that show what I''m trying to do, please let me know. Thanks.

Blazeroni
0

Share this post


Link to post
Share on other sites
I haven''t tried this but I am sure it will work (does in non game-apps).

You want to call ShowWindow(HWND,nCmdShow). I would use it with either the SW_MINIMIZE or SW_SHOWMINIMIZED flag - I dont remember which was the better alternative. When you want to "alt-tab" back, you will need to call it again with SW_RESTORE or SW_SHOWNORMAL.

Look up the API on the MSDN site to get the other options available - with a little experimentation it should work well.

#dth-0
0

Share this post


Link to post
Share on other sites
Look at the documentation on low-level hooks (and hooks in general).
0

Share this post


Link to post
Share on other sites
Most DirectX games do not display the Alt-Tab dialog because they setup the screen resolution through direct draw using exclusive mode (via SetCooperativeMode function). This how ever disables all drawing on the screen with the exception of your program (hence exclusive).

This can can be done using OpenGL by setting the screen resolution using DirectDraw rather then win32 API calls. You can even use dynamic linking with the DirectDraw dll to do this and if it does not work then revert to the win32 calls at run time.

As for the Alt-Tab dialog appearing only now and then, the only thing I can think of is that you only have one other program running. If this is the case then windows will automatically switch to that program rather then displaying the dialog.

Hope this helps

-DigitalBlur
0

Share this post


Link to post
Share on other sites
Thanks DigitalBlur - that worked, and it was a lot less of a pain than I thought it would be.

As for the alt-tab window appearing sometimes with OGL, its not that it didn''t appear, its that the window was corrupted by what was under it - what was under it would draw on top of the window. But, it''s moot now, since it works fine when combined with DX.

Thanks again.

Blazeroni
0

Share this post


Link to post
Share on other sites
If you are going to distribute your program is it a bad idea to use DirectDraw since this will not work for all cards. See the OpenGL FAQ.
Does not Windows send any message before the "alt-tab window" is displayed? You can also try to search the MSDN web site.
0

Share this post


Link to post
Share on other sites
Just a thought, the windows message WM_SYSKEYDOWN is sent whenever the alt key is pressed or when alt-something is pressed. Why not check for alt-tab and then minimize your window before passing the message on to DefaultWindowProc()?
Haven''t tryed it but it might work.
0

Share this post


Link to post
Share on other sites
quote:
Original post by avianRR
Just a thought, the windows message WM_SYSKEYDOWN is sent whenever the alt key is pressed or when alt-something is pressed. Why not check for alt-tab and then minimize your window before passing the message on to DefaultWindowProc()?
Haven''t tryed it but it might work.


I was just thinking that. You''d have to disable Windows'' alt-tab handling: I think that, normally, Windows wouldn''t send notification about alt-tab to a window because if it locked up, you wouldn''t be able to alt-tab away from it.


Just Plain Wrong
0

Share this post


Link to post
Share on other sites