Forum: Game Development Jul 14th, 2009 |
| Replies: 3 Views: 507 Read these articles:
http://chrishecker.com/Rigid_Body_Dynamics
You can probably ignore all of the rotational stuff, since a sphere is rotation-invariant.
You can get away with a very, very... |
Forum: Game Development Jul 14th, 2009 |
| Replies: 1 Views: 343 it's D3DCOLOR_XRGB.. (You have B and G the wrong way). |
Forum: Game Development Jul 13th, 2009 |
| Replies: 18 Views: 1,062 Heres a good starting point: http://www.riemers.net/eng/Tutorials/DirectX/C++/series1.php
unfortunately, the navigation of this site isn't obvious, the tutorial steps are in the 'contents' box on... |
Forum: Game Development Jul 13th, 2009 |
| Replies: 18 Views: 1,062 Yes, you can program in a Mac OS environment. I don't have any experience doing so, though.
Programming in a very cross-platform language like Python wouldn't be much different between win/mac. ... |
Forum: Game Development Jul 13th, 2009 |
| Replies: 18 Views: 1,062 When I first learnt, Basic (DOS and then Visual Basic) was the standard 'beginners' language. Python seems to be one of the beginners languages of today. Personally, I don't care much for Python, but... |
Forum: Game Development Jul 13th, 2009 |
| Replies: 18 Views: 1,062 Alternatively, get a good knowledge of the 2D, 3D, game mechanics and programming concepts in general, then you can take that to ANY programming language (within reason). You need to learn one... |
Forum: Game Development Jul 6th, 2009 |
| Replies: 3 Views: 737 You can use threads, I do: One thread for render calls, one thread for ai+physics+scripting. Both mutexed so only one entire update body runs at the same time, which isn't the most efficient way to... |
Forum: Game Development Jul 5th, 2009 |
| Replies: 9 Views: 652 Just FYI, the __vfptr = CXX0030 thing is because the debugger thinks that d3ddev is pointing to an actual instance of a D3D device, if there's some error in the call to CreateDevice, and for whatever... |
Forum: Game Development Jul 5th, 2009 |
| Replies: 9 Views: 652 The function call CreateDevice returns a HRESULT (error code), so do:
HRESULT result = CreateDevice (...);
the possible values are defined as D3D_OK, D3DERR_DEVICELOST, D3DERR_INVALIDCALL,... |
Forum: Game Development Jul 5th, 2009 |
| Replies: 9 Views: 652 Ah ok. There shouldn't be any problem with doing what you're doing from a DLL. I have only ever written DX applications that are staticly linked and DLLs that don't do anything DX, so I don't know... |
Forum: Game Development Jul 4th, 2009 |
| Replies: 9 Views: 652 Oh, and the reason that a D3DPRESENT_PARAMETERS object 'just works' is that the D3DPRESENT_PARAMETERS is a value (structure) type not a pointer type.
Learn this distinction ASAP. |
Forum: Game Development Jul 4th, 2009 |
| Replies: 9 Views: 652 You're just creating a pointer variable without actually setting it to anything, so what you're getting is 'worse' than a null pointer, it's a pointer to some random location. The message in the... |
Forum: Game Development Jun 23rd, 2009 |
| Replies: 3 Views: 625 What happens when you use the same mesh, different textures and no shader?
What you're doing looks right to me, assuming that all of your variables and functions are 'correct' with respect to what... |
Forum: Game Development Jun 12th, 2009 |
| Replies: 2 Views: 684 You call this function multiple times right? Via a timer callback or in a while loop with a sleep?
If so, you're not keeping the rect2 variable around: every time this function gets called the... |
Forum: Game Development Jun 12th, 2009 |
| Replies: 3 Views: 405 You can use GLUT (http://www.xmission.com/~nate/glut.html) or SDL (http://www.libsdl.org/) or other similar libraries, which basically abstract away the underlying OS windowing and input mechanisms... |
Forum: Game Development May 24th, 2009 |
| Replies: 3 Views: 549 In DirectDraw (2D api) you could set pixels directly, I've not used either for a long time, and I'm pretty sure that DirectDraw was discontinued a while back.
This kind of thing is going to be the... |
Forum: Game Development May 18th, 2009 |
| Replies: 1 Views: 992 It's because you are using an orthographic projection, in an orthographic projection, a higher depth doesn't make objects appear smaller.
See : http://www.songho.ca/opengl/gl_projectionmatrix.html... |
Forum: Game Development May 12th, 2009 |
| Replies: 10 Views: 1,633 Matrix transforms are perhaps harder to initially understand than applying offsets and rotations directly to points, but it's IMO the 'right choice' to use matrices, because it makes everything in... |
Forum: Game Development May 12th, 2009 |
| Replies: 10 Views: 1,633 What kind of 2D library? Graphics, or physics? or something else?
I like this book alot, it says collision detection, but it also has a lengthly intro to many of the concepts of simulated 'space... |
Forum: Game Development May 10th, 2009 |
| Replies: 4 Views: 2,042 It's easy enough to arbitrarily set the rotation point, e.g. this will work:
case 'E':
case 'e':
{
//Rotation of the red square.
glMatrixMode(GL_MODELVIEW_MATRIX);... |
Forum: Game Development May 8th, 2009 |
| Replies: 4 Views: 2,042 You setup an orthographic projection matrix, and then in the pushmatrix/popmatrix block, you load a matrix in model space, this 'undoes' your projection until the matrix is popped...
You could... |
Forum: Game Development Apr 17th, 2009 |
| Replies: 5 Views: 728 #include <vector>
#include <iostream>
int main ( void )
{
std::vector < int > myvector;
for ( int i = 0; i != 10; ++i ) {
myvector.push_back ( i );
}
int * myarray = &( myvector... |
Forum: Game Development Apr 15th, 2009 |
| Replies: 5 Views: 728 Don't optimize too early. Use a vector if it's more convenient to do so. You'll probably find that you can have more points than any maximum you'd consider before the cost of occasionally resizing... |
Forum: Game Development Apr 11th, 2009 |
| Replies: 6 Views: 933 You need to initialize each sampler uniform to the correct unit, usually you do that from host (C/C++/etc) code, I'm not sure how shader builder does that, if at all.
So, to test something for me,... |
Forum: Game Development Apr 10th, 2009 |
| Replies: 6 Views: 933 do you get a compile error ( use glGetShaderInfoLog ) ?
what code are you using to:
- generate, compile, and link the shader
- initialize the shader for each render pass
- render each pass
... |
Forum: Game Development Apr 8th, 2009 |
| Replies: 2 Views: 570 You can't really modify the .a file, it contains already compiled code and symbols. You can however modify the source code and rebuild the library with whatever changes you need. Exactly how to do... |
Forum: Game Development Apr 7th, 2009 |
| Replies: 7 Views: 1,075 Look at OpenGL also, if you want to do 3D... Infact, I'd recommend doing 2D in OpenGL aswel, because SDL's drawing stuff isn't that great (it's good for getting a window to render OpenGL in, and it's... |
Forum: Game Development Apr 6th, 2009 |
| Replies: 7 Views: 1,075 Yep, SDL is a godsend.
Er, with USA and Japan being about the biggest producers and consumers of computer games... =P
There aren't many (high profile) 'current gen' or even 'last gen' games... |
Forum: Game Development Apr 6th, 2009 |
| Replies: 7 Views: 1,075 Probably because Linux isn't really seen as a gaming platform.. But I think that as it is being quite readily adopted as a home desktop PC platform right now, that this is going to change soonish.
... |
Forum: Game Development Apr 6th, 2009 |
| Replies: 4 Views: 1,537 Of course it is possible; there is necessarily always a projection from object>screen coords and there is always a projection from screen>a subset of object coords on a plane parallel with the view... |
Forum: Game Development Mar 20th, 2009 |
| Replies: 12 Views: 1,055 use nodelay ( [yourscreen], true );, apparently, to make getch asynchronous (i.e. it will return even if no key is pressed). |
Forum: Game Development Mar 20th, 2009 |
| Replies: 1 Views: 1,170 Brute force isn't too bad.. you don't have to check every pair of pixels between the two sprites, you only have to check each pixel space to see if it's occupied twice, and that's not very costly (... |
Forum: Game Development Mar 16th, 2009 |
| Replies: 12 Views: 1,055 I've not used Gamemaker myself, but I'm quite aware of the setup. I think you might benefit from looking at SDL (http://www.libsdl.org/) rather than curses, it's got facility to create and work with... |
Forum: Game Development Mar 16th, 2009 |
| Replies: 12 Views: 1,055 Immediate follow up; if the 'co-ordinates on screen' are just derived from some other properties of the entity, then there's probably no need to store them anywhere... e.g. (in OpenGL) actual screen... |
Forum: Game Development Mar 16th, 2009 |
| Replies: 12 Views: 1,055 I can't think of an advantage of keeping coordinates outside of the entity, providing that you don't intend entities to be duplicated in the list. If you do intend that, it's better to split the... |
Forum: Game Development Mar 12th, 2009 |
| Replies: 2 Views: 1,304 What library/code are you using to import / render the MDL? because that's more than just opengl.
If the library you're using doesn't have the facility to load / render animation from MDL files,... |
Forum: Game Development Mar 9th, 2009 |
| Replies: 1 Views: 634 Heh, that's the kind of error you don't see everyday.
Look at the arguments to specialFunc:
void specialFunc( int key, int x, int y)
Function argument scope beats global scope. |
Forum: Game Development Feb 24th, 2009 |
| Replies: 2 Views: 963 Are your transforms 'full 3d' or 'half 3d'? That is, when your character rotates, can they rotate over all axes, or just around an 'up' vector? Are you using matrices as the authoritative... |
Forum: Game Development Feb 24th, 2009 |
| Replies: 3 Views: 710 looks like you have not called glEnable ( GL_DEPTH_TEST );
otherwise, post code |
Forum: Game Development Jan 21st, 2009 |
| Replies: 3 Views: 912 Possibly. If I remember correctly GLUT (and SDL) are the same. Calling openwindow or equivalent provides the necessary 'startup arguments' to OpenGL (i.e. buffer sizes), so it's only then that the... |