Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 06 Mar 2012
Offline Last Active Today, 07:49 PM

#5216445 How do game programmers visualize the Maths on their game?

Posted by Fredericvo on 14 March 2015 - 08:05 AM

How did the programmer know if he is going to use Sin or Cos?


In this case it wouldn't matter indeed but the idea here is to output a value that continually oscillates between 0 and 1 smoothly.

Both sin & cos do this but dephased by 90°

The question a programmer would've asked himself here is "what function will perpetually output values that oscillate between 0 & 1 and back down like this:




Oops it's Saturday morning: I mean -1 & 1, not 0 & 1

#5215541 x86 / x64 and the crazy conditional moves based on flags

Posted by Fredericvo on 09 March 2015 - 06:37 PM

The ones you mentioned date back to the early 1990s

Make that early 1980s.
My C64's 6510 (6502 variant) had them. At least the carry flag but not sure about parity.

#5214990 Playing a Video

Posted by Fredericvo on 06 March 2015 - 12:20 PM

Isn't Directshow deprecated now?

I think Media Foundation is the new way but I have not tried either yet tbh.

#5214612 When and how do I start graphics? (C++)

Posted by Fredericvo on 04 March 2015 - 08:07 PM

After console apps and before I jumped into DirectX, I learned win32 GUI programming a little.
There are a few online tutorials you can google.
I believe it can be helpful to know the anatomy of a message loop, what a winproc is etc before you modify it to accommodate a game loop.
Alternatively you could opt for SDL 2 which abstracts this and is portable.

#5212715 How were you learning programming at the age of 5?

Posted by Fredericvo on 24 February 2015 - 09:39 AM

I didn't have my first computer until I was 9 (a Commodore 128) and immediately started learning BASIC.

What was nice with the C128 rather than the C64 was that its BASIC had graphical commands otherwise very hard to do for a beginner in pure C64 mode such as circle, box, line, sprite etc. On C64's BASIC you'd have had to use pokes and math formulas for circles (way above my head at that age)

I've had tremendous pleasure trying to visualise simple scenes in my head and then trying to create them procedurally with those commands.


Since the C128 was a complete commercial flop and I became aware that I'd have no audience for my programs I increasingly wanted to be able to program in C64 mode and be able to do the same or better stuff (after all games did exist for the 64 so it was possible but I had to figure out how) and at about 12 I became aware of machine code and how professional games were made with it rather than BASIC. As you can imagine it was a steep learning curve after that...

#5211980 What's a good general max fps for a 3d graphics engine?

Posted by Fredericvo on 20 February 2015 - 02:34 PM

I just know it made a screeching noise from parts which you would expect to be totally silent.

I've noticed that in lots of pc's especially when copying big chunks of ram. I suspect this to be a form of crosstalk or emi affecting analog circuitry for the sound system or something. Much like was common in the early 2000s when a mobile phone came near audio hardware. (Seems less common now)

#5211307 [DIRECTX11] CreateInputLayout() returns false

Posted by Fredericvo on 17 February 2015 - 06:14 PM

polygonLayout[1].Format - DXGI_FORMAT_R32G32_FLOAT;

Look closely. You have a minus sign in place of an equal "=" sign.

#5201773 unexplainable errors? Ever have one of those?

Posted by Fredericvo on 04 January 2015 - 12:10 PM

I've had codepad.org fail on me after pasting with my iphone and it turned out there were space-like characters that weren't char code 32 embedded in it. Forgot the exact unicode values. Maybe you had something similar.

#5201676 Job titles

Posted by Fredericvo on 03 January 2015 - 10:03 PM

I remember old SNES games had lead programmers, object programmers, sound programmers etc although some of these might sound odd now. (Eg: sound is usually an mp3/ogg vorbis, not a tracker that actively plays waves of piano,drum or violin sounds as on an Amiga or SNES)

#5201664 Requesting advice on where/how/what (sequence) to start.

Posted by Fredericvo on 03 January 2015 - 08:04 PM

I'd back what kotor said but rather than python or java, make it JavaScript and php since that's what you need for the purpose you said.
Note that the road will be long as you seem rather novice. No offence, we all were at some point.

#5200715 Disk Partition Security for Game Dev

Posted by Fredericvo on 29 December 2014 - 08:31 PM

Running an executable with malware from a different partition won't prevent it from infecting other partitions. What you want is a sandbox or a VM or something.

#5200507 Do you put code in your engine/game you don't fully understand?

Posted by Fredericvo on 29 December 2014 - 03:34 AM

At the very least in my engine "DDSTextureLoader.cpp" is integrated as is and I don't fully understand some of its macro voodoo but I do understand the crux of the texture creation part where the pixels are mapped from memory into the buffer.

#5199619 Missing Microsoft DLLs in Win8.1 x64 when compiling in x64

Posted by Fredericvo on 22 December 2014 - 06:53 PM

Have you tried to install the vc redist x32 or x64 as suggested here?


Not sure if that really works as I'm using win 7 x64 myself.

#5199460 Passing information between states?

Posted by Fredericvo on 21 December 2014 - 06:56 PM

From my own understanding of gamestates, the state manager doesn't know nor care what state(s) is/are currently active.
The menu itself is a gamestate and a gamestate can know what other gamestate the manager has to make active next.
So when the user selects Level 1 the menu gamestate tells the statemanager to swap in Level 1, when Level 1 completes it swaps Menu gamestate back in if you lose for example and Level 2 if you passed.
Swap in/out is meant very generally here as you could have a stack of states or just 1 active at a time. Think pop up menus or crossfading between states.

#5198230 directx 11 texture object Help

Posted by Fredericvo on 14 December 2014 - 08:57 PM

I couldn't look at your code as I'm on an iPhone and that google drive interface doesn't seem to work here but i'm familiar with rastertek code so look at the following line in your textureshaderclass:
result = D3DX11CompileFromFile(vsFilename, NULL, NULL, "TextureVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, NULL,
&vertexShaderBuffer, &errorMessage, NULL);

Then look at your shader file.

// Vertex Shader
PixelInputType TextureVertexShader(VertexInputType input)

Is the entry point named TextureVertexShader too?