What windows/gui library?

Pages: 123
what is the MOST visually impressive game that you have seen with Win32/API?

Not to put too fine a point on it, but if a game runs on Windows it requires the WinAPI in some form or another. If nothing else, to start the execution process and then tell Windows to "get out of the way, I'm taking control over the system while I'm running."

Several games I've played take that control a wee bit too far. I couldn't even ALT-tab out if something went wrong.

One game I couldn't even Ctrl+Alt+Del to log-out/restart the system. I had to cycle the power to slap that game down. That game never really sold well, really bad word of mouth from people, and the company went out of business.
> One game I couldn't even Ctrl+Alt+Del to log-out/restart the system.
Wow, that's nasty and completely invasive. I thought that was impossible, but apparently it's possible with some nasty registry changes? I think as of Windows 10* you cannot override Ctrl+Alt+Del behavior (separate issue from the option of requiring Ctrl+Alt+Del at the login screen).

*edit: apparently the proper restriction was in place before Win 10
Last edited on
Control+Alt+Del is supposed to trigger a hardware interrupt on the IBM PC platform. At least since Windows NT, the kernel will receive it no matter what. On the Windows 9x kernel memory protection and virtualization was a joke, and any process could write anywhere it wanted and the kernel wouldn't crash it, as long as there was an actual page there. I suppose a game could have in those days overwritten the interrupt vectors to prevent the kernel from taking over on the three finger salute. I can't think of any other reason why Control+Alt+Del wouldn't work. I suppose the way the game is drawing to the screen could make it difficult to see the dialog, but back in the 9x days a double tap would signal the kernel to hard reset the system, same as pushing the reset button.
This "can't do the three finger salute" incident was on a 9x machine; not NT, not XP, not 7, not 10.

Even with Win 10 some older games make it difficult to Alt-tab to the desktop. Eventually they relent and allow me access.
Last edited on
Lockdown Browser used by schools and universities tries its best to lock you out of everything, but it cannot stop the mighty ctrl+alt+delete. However, they change the registry such that you have less options at the menu once you access it.

It also tried to stop Alt+Tab, but if you spam it enough eventually it goes through. I don't know how it stops it, probably tries to delete the Alt key input as soon as it receives it.
Heh... if they spent as much time teaching as they did trying to keep the students from using the computers...
Super thanks George, valuable info as always!

That was the first thing I looked at, were some of the games that were created using Win32, SDL, & SFML. Of course I wanted openGL & DirectX directly, but that was a much bigger learning curve. I am ok with SDL/SFML graphics...for now. In fact, I was warned not to even touch SFML/SDL since I was just starting to learn C++ and of course I did not listen and was too eager to go peeking...which then lead to doing more than just peek.

Whatever I did it HAD TO BE with C++ and I did not want anything like Unity. Learning C++ was priority and choosing SFML/SDL allowed me to get one step closer to OpenGL. OpenGL is not windowed and somebody in a post had mentioned that SFML allowed you to easily include sfml-window module without all the other SFML dependencies. Also, as mentioned allowed us to do windows/gui with effort and if so desired.

1
2
#include <SFML/Window.hpp>
#include <SFML/OpenGL.hpp> 


Another guy said that SFML had a special "View" class, which implied that SDL did not (although I never verified that), which allowed you to manipulate layers of graphics. This allows you to create top-down multi-layered games and split-screen games, a big bonus! I looked at John Horton's book and it had a good diversity of games from Pong, Timber, top-down zombie shooter, and split-screen game.

Finding out now that SDL also does DIrectX on Windows does not phase me, since I was never planning on making anything that pushed the limits. Only enough to have fun, learn, and learn more C++ and get closer to OpenGL.

George P wrote:

Not natively, that requires Direct3D.


So it is pretty much like SFML in that respect, if you want 3D then you can add it. Someone online said that DirectX IS Direct3D, so I went on for a while thinking they both mean the same...it made sense because when they referred to Direct3D 11 or 12 they would also refer to DirectX 11 or 12. Come to find out that X actually uses 3D as the actual 3D rendered and that they are independent, but can be used collectively. X depends on 3D!


George P wrote:

Linux distros don't have it, to use SFML on Linux requires additional libraries to be installed.

Yes, I did see that as well and the SFML site provides a list of the necessary libraries needed.
Here is a basic SFML loop & provides the gist of the essentials. We started out with windows/gui and here we are with graphics...fun!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <SFML/Graphics.hpp>

int main()
{
	// video mode object
	VideoMode vm(1920, 1080);

	// Create/open a window
	RenderWindow window(vm, "MyGame!!!", Style::Fullscreen);

	while (window.isOpen())
	{
		//***************Players input***************
		if (Keyboard::isKeyPressed(Keyboard::Escape))
		{
			window.close();
		}


		//***************Update scene***************


		//***************Draw scene***************

		 // Clear everything from the last frame
		window.clear();

		// Draw game scene here

		// Show everything we just drew

		window.display();
	}
	return 0;
}


Here are some game projects w/SFML, but this is not a complete list:
https://sfmlprojects.org/games
https://gist.github.com/eXpl0it3r/c3436e932c273fc430aceb0f34db825e

Wanderjahr is a pretty cool one, when you can get yourself some decent graphics.
https://www.youtube.com/watch?v=duR1lC4jRfQ

M.A.R.S. - a random shooter is a crazy looking 2010 one, with SFML and openGL.
https://en.sfml-dev.org/forums/index.php?topic=3247.msg21164#msg21164
Control+Alt+Del is supposed to trigger a hardware interrupt on the IBM PC platform.

Win9x in my experience was always twitchy from time to time. What is supposed to happen on occasion didn't.

I know I'd have to reboot at least a couple of times a day to stop Win9x from getting all wigged out and acting weird. Well, weirder than normal.

MS-DOS had its problems, but Win9x took those and made the experience close to being actively User Hostile.

It didn't help that a lot of software, especially games, was just plain crap back then. Not much different than now. But the NT kernel and its descendants makes it harder to make the UI unstable enough to require a hard power cycle reset. With XP, 7 and now 10 doing a simple logout recycle is sufficient most times to fix UI issues.
I never had a complete lockup, but very sluggish and either it taking a long time for the C+A+D window to pop or requiring more than one combo press. Most times the Task Manager is a life saver.

George, it sounds like you might have been contemplating SDL or SFML? Have you looked at any code and which would you choose? Maybe one day when you get bored? I know you don't like shiny new obj, but never? OpenGL on its own looks shiny and involved, but probably rewarding if one ever picks it up...subjective of course.

Here is J. Horton's book source code:
https://github.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition
Last edited on
Topic archived. No new replies allowed.
Pages: 123