Advertisement Jump to content
Sign in to follow this  
jammm

Win32 programming, relevant in windows 8?

This topic is 1863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've come across many game programming books which use win32 programming (windows.h) for the game window. But I'm wondering, since windows 8 is out, is it still useful to learn this? Or should I switch to metro style windows instead?

Share this post


Link to post
Share on other sites
Advertisement

I do not know but hope so that it is (my specialisation is winapi and i got much code under it) probably it stiill is quite fine, though there was some changes i heard some of my aps were not starting on win7/8 :? I hope winapi will be an option for next 10-20 years if no i will be much unhappy

Share this post


Link to post
Share on other sites

Well since most games still support windows 7, that means it'll keep supporting the win32 API as long as the Win 7 support remains. So it's just a matter of time I guess..

Share this post


Link to post
Share on other sites

Support for "old" Win32 and DirectX is the same as Windows 7, win32 "low level" APIs works fine under Windows 8/8.1, they also add some new APIs (mostly for touch devices) for desktop development.

 

Anyway, according to the VC++ team blog, MS is considering to add in the feature support for ModernUI APIs (probably something like C++ + XAML) for desktop development too.. So yea, we could have in the feature Win32 (GDI included), MFC, WPF and WinRT in the feature for desktop development.

That's not so strange considering that there are some 3rd party tools that "hack" with a some win32 callback the ModernUI Apps to desktop windows...

Edited by Alessio1989

Share this post


Link to post
Share on other sites


soon .NET

You surely have a reference for that bollocks?

 

 

Win32 is going to stay for quite a long while yet, as will .NET.

 

And both work fine in Windows 8. Just way too much software is working with it so Microsoft won't throw them away any time soon.

Share this post


Link to post
Share on other sites

You surely have a reference for that bollocks?


Nope, but I didn't when VB6 was going down the pan either ;)
 

Just way too much software is working with it so Microsoft won't throw them away any time soon.


Microsoft did with VB6 and a lot more businesses relied on that for internal logic than they do with .NET now. Some of Microsoft's own products also used VB6 whereas .NET has never been embraced in Microsoft's products (other than perhaps plugins).

I am not saying that .NET technology will go anywhere since we have the open-source mono and products like Xamerin but I am very confident that Microsoft will be dropping 1st class support for their .NET implementation. Perhaps not in favour of Metro (since that is not doing so well) but if something "better" comes along...

Contrast this to the native Win32 API which Microsoft can't remove. If they did, Windows wouldn't boot. Even though Windows RT doesn't allow developers to access the full API, it is still there in its entirety since Office needs it and so does the low level underlyings of Metro itself (and everything else). Edited by Karsten_

Share this post


Link to post
Share on other sites
Personally, I would therefore definitively consider learning Win32. It is maybe not the prettiest, most straightforward quirk-free API in the World, and some things could definitively be better, but it will usually let you achieve what you want, and it really isn't that bad.

Yeah I know what you mean, whenever I try teaching students DirectX programming, they look terrified by the ugly Win32 function / variable naming when opening a simple window to render onto.

It seems a shame that Microsoft keeps getting distracted by things like .NET and Metro instead of creating a decent Win32 GUI wrapper.

Afterall, with OpenGL / Linux programming, I teach them using Qt which uses the equally ugly libXaw / libX11 underneath and they like it much more.

 

which after registering followed with "you have permission to develop for 30 days". That was an immediate dealbreaker.

I agree, I won't let anyone have that much power over myself or my company. Those arrogant fsckers. The failure of their platform suggests that we are not alone with our opinions ;)

 

Another annoying thing about Metro, Microsoft were in a position to really start a positive migration from Intel chips to ARM by providing a proper implementation of Windows and development tools. Instead they decided to lock it down so an ARM chip could only be used like an unpopular iPhone. ARM development really isnt any different to Intel (The C++ code can remain 100% the same in many cases), it is only these completely crippled operating systems that make it such a faff. So when people reject Surface RT because "it runs arm :(", that really annoys me. The real reason why they are not selling is because Microsoft is broken.

Edited by Karsten_

Share this post


Link to post
Share on other sites

It very much depends on what you want. For some small and silly game, or some small and silly web application you may find that using the Metro API is much easier and you get your product out in a fraction of the time. For something more complicated, you may quickly find that you can't do what you want.

 

Personally, I would therefore definitively consider learning Win32. It is maybe not the prettiest, most straightforward quirk-free API in the World, and some things could definitively be better, but it will usually let you achieve what you want, and it really isn't that bad.

 

The new Metro interface is much easier, but is sandboxed, so you are somewhat limited in what you can do, except if you buy a binary signature (I must admit that I haven't inquired whether you really have to buy it, because the experience described in the last two paragraphs below was already a dealbreaker -- but I wouldn't think MS will do it without an evolved "certification process", and definitively not for free!).

 

Microsoft has been trying to push Metro forward, but it remains to be seen how much it will be able to replace the old system, if at all. My guess is that Win32 is more likely than not going to persist for another decade or longer. Metro is mighty fine for posting stuff on Facebook and AngryBirds-alike games, but there is presently no good alternative for "real" programs that need to do a bit more. Maybe they'll split off Metro in a future version and make separate, more WinRT-like mobile and Win9/10 desktop versions. Who can tell.

 

In Microsoft's dreams, you could only run Metro software and cannot install software without using their shop (and their permission) at all, that's what WinRT tablets are like. Alas, they turned out being a total flop, people are not even buying them for half the price (probably because of just that lock-in).

 

On top of that, you are locked you into using Visual Studio for development, which probably isn't much of a problem even for open-source protagonists, since you're already locked into a completely proprietary environment anyway. But more importantly, development requires "permission" from Microsoft not only to distribute your code via the shop, but also to run it on your own machine. This sure comes as a nasty surprise when you don't expect it.

 

A month or two ago, I installed VisualStudio to check out Metro App development for fun and "just to see if it really sucks as much as I expect". First obvious thing, I made a new single-page project (I forgot the exact name, but basically "hello world" for Metro) and hit "build". A message popped up saying "you need to register (it's free!) to be able to blah blah..." which after registering followed with "you have permission to develop for 30 days". That was an immediate dealbreaker.

 

I can agree that Microsoft wishes to control what is distributed through their shop, and they're perfectly entitled to do that. I want to decide who enters my house or drives my car, too. Having to register for being a developer... not precisely what I like, but nothing new either. Been there, done that before.

But having to ask for permission (even if it does not cost anything for now!) to run my own software on my own computer is definitively one step too far. Your opinon may differ, and your mileage may vary, but for me that was "no thank you Metro".

 

Thanks for the really informative reply! I actually agree with everything you said, including the "asking for permission" part smile.png
I'll stick to win32 programming then. I was never really interested in the metro interface anyways.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!