Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Mar 2012
Offline Last Active Yesterday, 08:31 AM

#5295659 MFC custom resources

Posted by Fredericvo on 08 June 2016 - 12:57 PM

I think you want this:

HRSRC WINAPI FindResource(
_In_opt_ HMODULE hModule,
_In_ LPCTSTR lpName,
_In_ LPCTSTR lpType

_In_opt_ HMODULE hModule,
_In_ HRSRC hResInfo

_In_ HGLOBAL hResData

There is a RT_RCDATA resource type defined as 10.

Read msdn for extra info.

#5267203 I have no experience AT ALL

Posted by Fredericvo on 20 December 2015 - 02:33 PM

Fwiw I learnt C++ on my own using learncpp.com and cplusplus.com
I then learnt directx 9 from a few other sites and directx 11 from rastertek.com

You can throw in some video tutorials into the mix from YouTube channel TheNewBoston
He's got a nice swagga style of teaching.

I did have prior programming experience though but not that advanced.

#5258693 please help me teach yourself game programming in 21 days

Posted by Fredericvo on 23 October 2015 - 10:37 AM


This is a forum frequented by professionals and hobbyist game devs that do respect other peoples copyrights (and most of which hope their copyright will be respected the same way), please do the same.


and some of us have even lost our game studios in the past due to copyright violations (Caveman v1.3, circa 2002).


I don't mean to hijack OP's post but I'm curious, did you commit some serious breaches you were aware of and got caught or was it something that took you by surprise and gob-smacked you by the subtlety and arcane character of copyright and patent laws? I'm a bit scared of the latter.

#5253655 Game Development Laptop

Posted by Fredericvo on 23 September 2015 - 07:59 AM

Nobody mentioned the elephant in the room: your target audience's hardware.

I can safely assume that few,if any, of us modest indies will create AAA quality games so what good is it to have a monster gaming PC (other than build times obv) if your poorly optimised little game runs perfectly on that machine due to its monster performance making up for lack of good programming skills, but won't run smoothly on your user's Walmart promoted crappy laptop?

#5252176 Introduction to 3D Game Programming with Directx 11 and Windows 8...

Posted by Fredericvo on 14 September 2015 - 07:46 AM

www.rastertek.com has added some updates to his site too.


You could follow the historical dx11 tutorial, then hop onto dx11 series 2 to see how it's done nowadays.

#5241850 GLFW or GLEW? Which OpenGL library should I use

Posted by Fredericvo on 21 July 2015 - 08:43 PM

I'm a directX guy but touched a but of ogl too.
Glew and glfw are not mutually exclusive as their purpose is different.

Excerpt from the following page:

The OpenGL Extension Wrangler (GLEW) is used to access the modern OpenGL API functions(version 3.2 up to latest version).If we use an ancient version of OpenGL then we can access the OpenGL functions simply including as #include <GL/gl.h>.But in modern OpenGL, the API functions are determined at run time, not compile time. GLEW will handle the run time loading of the OpenGL API.About GLEW see here

GLFW or freeglut will allow us to create a window, and receive mouse and keyboard input in a cross-platform way. OpenGL does not handle window creation or input, so we have to use these library for handling window, keyboard, mouse, joysticks, input and other purpose.

GLFW and freeglut are alternative for us according to our need we can choose any one but GLEW is different from them which is used for run time loading of the OpenGL API.

#5241232 Good C++ engines?

Posted by Fredericvo on 18 July 2015 - 11:31 AM

Every time I try to install Microsoft Visual Studio I get an install error, I don't remember the error exactly though, that's why I'm trying to find a C++ game engine with its own compiler...

At the risk of sounding like a nit I think you mean Internet explorer, not windows explorer (explorer.exe) the thing to browse files and folders.

EDIT: I'm on my iPhone and can't get the correct quote and get it to work. Ugh.

#5240894 [Solved] Resizing window eventually makes program run out of memory.

Posted by Fredericvo on 16 July 2015 - 02:17 PM

Maybe every time the mouse move it sends a message to winproc thats a lot of messages and device may have not even finnished the first creation???????

I doubt this. When you create a resource the call blocks till it returns a success or failure code.

#5240648 Broken code

Posted by Fredericvo on 15 July 2015 - 07:15 PM

deck_array[card] = final;document.write(deck_array[final] + " ");
What's the size of your array?
What random values can "final" take? If it's a value larger than your array size you're out of bounds, hence the undefined values.

#5240267 Has anyone got a feeling of this when you were starting as game developer?

Posted by Fredericvo on 14 July 2015 - 10:05 AM

It's sort of the feeling I get too. I'm not an AI or NPC programmer so I feel like if I were to ever join a team and they don't use my DirectX11 knowledge and prefer an existing engine then my presence on the team would simply be redundant. They would have no use for me, full stop. Note that I honestly have no idea what udk/unity3d can and cannot do so I might underestimate how much they'd still have a need for a guy like me.

Another thing is that I have zero creativity. Guys like me end up making engines rather than a game.

#5238492 Monogame explorer crashes when doing a simple shader?

Posted by Fredericvo on 05 July 2015 - 06:11 PM

You have to actually restart your computer? Could be a graphics driver issue then. Are they up to date?

#5235449 Hi there, freshman here =]

Posted by Fredericvo on 18 June 2015 - 06:00 AM

I'm much more acquainted with C++ than Java but lots of people will tell you the same thing.
At your level it's better to stick to the language you are familiar with, learn it really well, learn to use external libraries then try to find an API that allows simple 2D drawing and attempt simple games like pong, tic-tac-toe, etc.
Another step up are Tetris and pacman. Zelda is hardly that simple a game but when you feel really comfortable at this step then you can try.
The next step would be to use a 3D API.

#5231635 Extremely weird, illogical bug. Part of false if clause executed.

Posted by Fredericvo on 29 May 2015 - 05:36 AM

Oh I already do that but I wanted to print out the name and amount of memory and the above export does select the discrete gpu but printed out the wrong string.
I found it an annoying discrepancy to see the Optimus viewer tool confirm that the gpu was enabled but my engine still shows "Intel HD 4000" and 32 MB
This being said, it's just a legacy from the rastertek tutorials to display this on the HUD all the time and a game doesn't usually do this so I might as well give up this practice.

#5231509 Extremely weird, illogical bug. Part of false if clause executed.

Posted by Fredericvo on 28 May 2015 - 11:11 AM

I have already modified the code to copy the string rather than the cast and it works now.
I initially pasted this here as I didn't get why it didn't work but now I get it. My brain just malfunctioned lol.

#5231173 IG + Nvidia, IG faster

Posted by Fredericvo on 26 May 2015 - 08:30 PM

OK in the meantime I did some reading, turns out that this is called Optimus.

I downloaded a little tool that can tell me whether the GPU is activated or not. It turns out that even if I run a somewhat GPU heavy program like Rastertek's terrain with water reflection (tutorial 16), it never starts the GPU automatically on that laptop and even if it did, like I said, the program does not benefit (fps about 30 with both IGP/Nvidia for tut16) or some programs even run slower if I force the GPU rather than the IGP. Makes absolutely no sense. The drivers seem up to date as well.


So I'm wondering if there are ways you ought to create your device & swapchain to accommodate this Optimus system. I was able to enumerate the second adapter in fact and print out its name, but if I create the device with that adapter explicitly rather than automatically with a NULL parameter it fails to create the device & SC.