Jump to content

  • Log In with Google      Sign In   
  • Create Account

nfries88

Member Since 11 Nov 2006
Offline Last Active Yesterday, 08:50 PM

Posts I've Made

In Topic: Should i learn Win32 or UWP?(C++, Directx)

Yesterday, 08:46 PM

 

It depends - are you willing to lose a significant portion of your potential customer base by using a newer technology (UWP requires Windows 10 - less than 15% of the internet marketshare for PCs)?

Microsoft also tends to create abandon rarely used technology after a few years. If UWP doesn't catch on, in 5 years it might be worthless knowledge. But they can't really abandon Win32 - it's core to their platform.

 

15% of share (a lot more if we speaking about gamers) is not bad at all if we consider that Windows 10 was released less than a year ago.

 

When Microsoft decided to abandon a technolgy, usually it continues to work without any issue on future versions of Windows. Keep in mind that UWP on C++\CX and WinRT, are actually all based on COM and Win32. This mean you can target UWP with "pure" C++ if you want, however this need actually a lot of work and you can also use the WRL template library to mitigate that.

On Windows platform Win32 is like the CRT: they are both the meaning of life for the Windows platform itself, you cannot kill Win32 or the CRT without killing the entire Windows platform.

 

A guy called Kenny Kerr started writing a pure C++ library called "Modern" to target WinRT without C++\CX and to replace WRL. It also joined later Microsoft, so hopefully Microsoft will release in the future a complete version of "Modern" to target WINRT and create UWP application using pure C++ without the proprietary component extension (C++\CX) or the usage of WRL. A library like that would solve all kind of issues regarding targeting both UWP and Win32 desktop application.

 

15% - you're right, it's not bad, it was just a point. And it's likely to go up quite quickly. I hear it's a pretty solid OS, but I'm sticking with Win7 for now. You're also right about marketshare among gamers probably being higher - but that's only because it's the version of Windows that's already installed on their gaming rig (I imagine DirectX 12 might be another reason. Was there some technical reason for Microsoft not backporting DX12 to Windows 8 and 7, or is this just an "upgrade already" thing?)

As for Microsoft abandoned technology continuing to function properly on new versions of the OS - try playing an old game using DirectDraw on Windows 8 or 10. Heck, they messed with DWM in Vista and 7.


In Topic: Where to learn 2D Math for game dev

Yesterday, 05:18 AM

calculus - haven't found much use for it myself.

derivatives can be used to calculate surface normals from a displacement map. I suppose integrals could be used to do the reverse.
You've almost certainly used Euler's method in the form of velocity += (acceleration * time); position += (velocity * time); etc. It's a method for solving differential equations quickly.
I've used Taylor expansions to implement extremely fast trig function approximations. Taylor expansions represent functions as a series of infinite sums (but in trig functions, only the first few are of significance for 0 < x < pi/2) calculated from its derivatives.


As for the OP, any math site should be able to teach you the concepts. For 2D games, you only need trig and geometry, although basic linear algebra wouldn't hurt.


In Topic: Is making game with c possible?

Yesterday, 03:38 AM

I use C quite a bit, personally. It doesn't really provide much benefit over C++. I like it because not having classes handy can push me to think about different ways to design code. I don't think I've figured out anything novel yet, though. There's only two reasons why I would recommend anyone else use C over C++:

1) You don't want to, or can't, link to the normal libraries.
2) You're considering working with a C purist.

The second reason might come up in game development. There are some C purists in the hobbyist crowd. Usually their reasons for being C purists are pretty pointless, but in my experience they're usually crazy good and worth working with just to learn a thing or two.

The first reason is not likely to come up in game development *anymore*. Even cheap low end computers have enough hard drive space and memory to make saving 1-2mb fairly pointless (this was not the case 15 years ago).

The first reason *might* come up if you're doing other sorts of programming. For example, the C runtime isn't available in an OS kernel, or on a custom OS. The C runtime might not be available in certain embedded environments. If you're writing web services using CGI (common gateway interface), cutting out some of the pre-main work might be worth it.

Like Norman, a lot of my code winds up looking like C code even when I'm programming in C++. The "C way" of doing things is usually (but not always) more efficient, but you can always do the "C way" in C++, and still get all the advantages of C++.


In Topic: Should i learn Win32 or UWP?(C++, Directx)

30 April 2016 - 07:57 PM

It depends - are you willing to lose a significant portion of your potential customer base by using a newer technology (UWP requires Windows 10 - less than 15% of the internet marketshare for PCs)?

Microsoft also tends to create abandon rarely used technology after a few years. If UWP doesn't catch on, in 5 years it might be worthless knowledge. But they can't really abandon Win32 - it's core to their platform.


In Topic: I Have a Problem in "char *" & "LPCWSTR"

30 April 2016 - 07:40 PM

Most Win32 functions that take a string argument actually have two different versions for two different string types - ANSI strings and WIDE strings.

ANSI strings use some sort of multi-byte encoding (or just plain old ASCII) and resolve to char*. WIDE strings use UTF-16 encoding and resolve to wchar_t *.

For example, there is no actual MessageBox function. It's actually a trick that the Windows headers play - when there are ANSI and WIDE versions of a function, the windows headers automatically choose the right function for MessageBox to resolve to, based on your project settings. It looks something like this:


#ifdef _UNICODE

#define MessageBox MessageBoxW

#else

#define MessageBox MessageBoxA

#endif

Usually I just use the ANSI version, unless I have reason to believe I'll translate my project into a language other than English. Working with WIDE strings is more work. :)

 


PARTNERS