Deft

Member

23

226 Neutral

• Rank
Member
1. error LNK2019 with D3dcompiler.h

[quote name='viper110110' timestamp='1347858569' post='4980783'] Welcome to C++, where the code's made up and the errors don't matter. Turns out my problem was forgetting MyClassName:: in front of the function, which was left out because I copied it out of the tutorial which had all the code in main.cpp. [/quote] If you don't know, what error matters, this is not mean that it's useless. Think you should try to understand how linker is working. If you've got unresolved symbol, then this means that you declared entity (such as method) and didn't implement it. Such error also could appear when you use library API without adding libraries themselves.
2. Slowing down movement(For Tetris game) - C++/SDL

I suggest that you can use the same formula: x += xVel * deltaTime. Why not to decrease x axis velocity value? Then you can set up real X position as x_real = (x / 20) * 20. This will gives you always 20x offset. Sorry, if I'm wrong. With regards.
3. AS3 Collision Resolution

Collision detection in AS3 is done by call hitTestObject() function. That's all what you need. If you want check collisions for your object continuously - you can test collisions for each frame. To resolve collisions you need to use some simple mathematics with vectors. If you need to lock object movement when it's under wall (or floor, or ceiling), you need to check test collision and if it was found, prevent changing object coordinates. If you need to reflect object movement (as billiard balls, for example), you just need compute movement vector according to simple physics rule. These rules depends on your environment. In simple situation it will be just a ray reflection. Of course, its very primitive methods, if you need more realistic image, you need to know physics laws and formulas. But often for AS3 it's enough.

5. Problem with Cannot Find Symbol

[quote]private BufferedImage image = new BufferedImage(WIDTH, HEIGHT,BufferedImage.TYPE_INT_RBG);[/quote] May be you mean TYPE_INT_RGB or TYPE_INT_BGR? BufferedImage does not have TYPE_INT_[b]RBG[/b] member.
6. 3D Tiles

Sorry if I'm not right, but how you want to construct diamond with using squares? Square can give you cube or parallelepiped. In any case of building diamond you need additional triangle(s) for figure to be done. I suggest that you need to adopt your system to work with triangles and then build a diamond or any figure that you want. Sorry if I misunderstood your question. With regards.
7. Problems with Vertex-/Pixelshader in DirectX 9 & C++

According to MSDN for DX9 CreatePixelShader: [quote] Return value Type: HRESULT If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: [b]D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY[/b].[/quote] Just make a switch statement for this variants of errors and look at case that will be invoked. After that point you can actually understand what is wrong with your pixel shader.
8. AS3.0 Creating an instance of a function, with singleton?

Hey there)) Just relocate you base code into separated method. Making constructor big not so good. If you need to get re-usable code, wrap it with public method and call it wherever you want. This is true for singletons too.

10. Deft

Smoking DirectX
11. AS3.0 Using arrays for game inventory and how to track objects?

[quote name='JETerán' timestamp='1346367460' post='4974951'] Following your suggestion, what I'm going to do now is create a StoreCreation.as file that extends GameObjects instead of Sprite (right??) [/quote] If your GameObjects class extends from Sprite - yes, StoreCreation will automatically be extended hierarchically from Sprite. But do not miss that thing that you should clean up your game object storage when objects does not needed anymore - that's performance important tip. I think you on the right way