Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Feb 2002
Offline Last Active Today, 12:50 AM

#5180271 Macros doesnt work anymore (visual studio c++)

Posted by Endurion on 14 September 2014 - 11:05 AM

You have to add some entries to a few config files. Which depends on the VS version. Looky here (http://visualstudioextensions.vlasovstudio.com/2014/02/13/visual-studio-2010-macros-stop-working-after-february-2014-windows-update/)

#5179908 GET request contains addional non wanted data for XML document

Posted by Endurion on 12 September 2014 - 10:40 AM

Since you do a direct socket connection, could it be chunked encoding? (http://en.wikipedia.org/wiki/Chunked_transfer_encoding)

#5176588 Weird rendering issue (rows of pixels are drawn weird)

Posted by Endurion on 27 August 2014 - 10:49 PM

This is pretty sure a problem with your backbuffer size not matching the windows' client area size.


Do you use AdjustClientRect(Ex) to calculate the required windows size to offset for the border and caption?

#5175934 Moving from dinput to RAW input (mouse)

Posted by Endurion on 24 August 2014 - 11:57 PM

Also, do you pass the message on to DefWindowProc?


The MSDN is a bit misleading here, in the description of WPARAM it says that the message should be passed on to DefWindowProc for cleanup.

#5173789 C++ Runtime Error With Odd Workaround

Posted by Endurion on 14 August 2014 - 11:13 PM

The problem and "solution" you describe is pretty much a symptom of either accessing uninitialized memory or writing out of bounds.


Not much more can be said without seeing the real code. The problem is simply not in that sample code you posted.

#5173787 Stuck in C#......

Posted by Endurion on 14 August 2014 - 11:06 PM

List<Pokemon> is the typename of the class. The container is a class called List. The < > are a sign that the List uses Generics. The type inside the brackets defines the type of class this List contains.


In this line:


List<Pokemon> Pokemons = new List<Pokemon>();


List<Pokemon> is the type

Pokemans is the name of the list

#5172202 Debugging a system hang (entire OS freezes)

Posted by Endurion on 07 August 2014 - 11:22 PM

Are you using any libraries or systems beside OpenGL? Like playing sound during startup?


Sometimes it's the coincidental accessing of a resource (by your game and some other program) getting drivers bonkers


(I had something similar on a HP desktop where starting a sound in DirectSound and WinAmp starting a song at the same time would completely hang the machine)

#5167143 Win32 BOOL and bool ?

Posted by Endurion on 16 July 2014 - 08:04 AM

The consensus for the Windows defined types is, usually you DO NOT mix them. Pass a BOOL to a BOOL etc. Don't assume, just because they sound samey, that they are the same. There's usually a reason why they added a new type instead of reusing an existing one.

#5165727 SlimDX background color

Posted by Endurion on 08 July 2014 - 10:44 PM

AFAIR clear fails if you add flags which your backbuffer doesn't have (like clearing the z buffer if you have no z buffer enabled)

#5165310 Organizing a map structure for a top-down tile game

Posted by Endurion on 07 July 2014 - 11:56 AM

You're throwing away a lot of advantages of a tile map.


IMHO: I always cringe when I see someone defining a tile class for a simple tile map.


For one, the indices of your tile array are all you need for positions. The tiles themselves don't need any, since you can deduce the position from the indices already.

Determining the tiles to draw is a simple calculation. With camera offset and screen size you can calculate the starting end ending indices of tiles on the screen.


Adding entities to tiles sounds good on a glance, but you already saw some disadvantages yourself. Also, when entities move you'll be constantly updating tile pointers. When an entity is on the move between tiles, which tile do you add it onto? Which tiles entities do you check for collision when an entity moves?

I'd put entities in a separate list, optionally a spatial container. This lets you reduce overdraw easily.


What's left for the tiles? Indices to the image. These could be stored directly, so you end up with a much simpler two dimensional array.

#5164838 So... I'm a Molecular Biologist....

Posted by Endurion on 05 July 2014 - 12:38 AM

As for other games: Probably off, but look for Atomix: http://en.wikipedia.org/wiki/Atomix_(video_game)


It's basically a tile based puzzle game where you assemble molecules.

#5163986 Receiving very odd compiler Errors

Posted by Endurion on 30 June 2014 - 10:43 PM

You've got circular inclusions for GameObject and Component.


Since you seem to only use pointers to each other remove the "#include "GameObject.h" from Component.h and vice versa. Add a forward declaration to each header.



class GameObject;
class Component



class Component;
class GameObject

#5163560 Assimp and Common Dialog Box - Strings - C++

Posted by Endurion on 28 June 2014 - 10:08 PM

Well, for starters, since you assume that your CString hoops are the culprit, you might show that particular code.


And to make it even easier for us, show the path before and after. This should make it trivial to point out any problem.

#5161238 FindResource (Win32) help .cpp

Posted by Endurion on 17 June 2014 - 11:58 PM

The first parameter to FindResource is the instance where the resource is expected to be. A .exe and the Dlls it loads have different resource pools.


A Dll has a different instance handle. Passing NULL uses the instance that started the process( the .exe).

#5159109 Mysterious Rigids On Rendered Textures

Posted by Endurion on 08 June 2014 - 11:44 AM

In my DX9 code I've offset the vector position by -0.5, -0.5 for all 2d textured rendering.


I recall having a few difficulties when the 2d rendering was performed not by pretransformed vertices (and ran through the matrices) In the worst case you may have to clamp the final coordinates to direct multiples of 0.5 (which can be tough when using matrices)


I see you're using shaders, I'm not sure if that makes a difference, I'm still using fixed function.