Jump to content
  • Advertisement

31337noob

Member
  • Content Count

    351
  • Joined

  • Last visited

Community Reputation

101 Neutral

About 31337noob

  • Rank
    Member
  1. Thanks for your input so far. I would really like Octrees, but have to figure out an efficient way to use them for dynamic objects. Or, do I only use it for the static objects in the game? i.e. the game world. But what would I do for the dynamic objects then. Meaning the player, AI players, etc... I would really like to use one spatial partitioning system, but if it comes down to two of them so be it. Thanks again.
  2. Thanks, I will looking into SAP. Also, my game is going to be a big open world type of game, with a lot of dynamic objects, so I need a way to partition the game world to know which node I am in and only check that node and neighbor nodes for collision and culling. There has to be a way for dynamic objects.
  3. Hello Friends, I am trying to decide which algorithm I should use for partitioning the game world. My game is 3D and has dynamic objects. I was thinking about maybe an Octree would be good, but come to think of it, it has to calculate EVERY frame because of the dynamic objects. So, my question is this. What would be the best space partitioning for a 3D game for collision and culling that has dynamic objects? Thanks in advanced.
  4. Hello, I have two monitors and I want my main monitor to do the debugging and I want the second monitor to run the application. The application is a full screen app and its a DirectX app. Is there a way to do that...like is there a option in visual studio 2008 to do that? that would be awsome. I looked online for the solution, but no luck. please help. thanks.
  5. 31337noob

    Setup project question

    i am still trying to figuare this out. I just want to know how to use the conditions in the custom actions properties. How do i get if the radio button has been checked....... I never had made a setup project before in vs 2005.
  6. 31337noob

    help with vertices

    well, i just used a sprite to make it a fullscreen texture instead of vertices. thanks anyways.
  7. Hi guys, I am trying to make a quad that will take up the whole screen in directx9. i do this struct Vertex { Vertex(float xx, float yy, float zz, float nxx, float nyy, float nzz, float uu, float vv) { x = xx; y = yy; z = zz; nx = nxx; ny = nyy; nz = nzz; u = uu; v = vv; } float x,y,z; float nx, ny, nz; float u,v; static const DWORD flags = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1; }; //set up code //create the vertex buffer pDevice->CreateVertexBuffer(6*sizeof(Vertex),D3DUSAGE_WRITEONLY,Vertex::flags,D3DPOOL_MANAGED,&vbuff,0); float zoom = 1.0f; Vertex *v; vbuff->Lock(0,0,(void **)&v,0); v[0] = Vertex(-1.0f, -1.0f, zoom, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f); v[1] = Vertex(-1.0f, 1.0f, zoom, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f); v[2] = Vertex( 1.0f, 1.0f, zoom, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f); v[3] = Vertex(-1.0f, -1.0f, zoom, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f); v[4] = Vertex( 1.0f, 1.0f, zoom, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f); v[5] = Vertex( 1.0f, -1.0f, zoom, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f); vbuff->Unlock(); D3DXMATRIX proj; D3DXMatrixPerspectiveFovLH(&proj,D3DX_PI*0.5f,(float)mode.Width/(float)mode.Height,1.0f,100.0f); pDevice->SetTransform(D3DTS_PROJECTION,&proj); pDevice->SetRenderState(D3DRS_LIGHTING,FALSE); //render code pDevice->SetTexture(0,textures[next]); pDevice->SetSamplerState(0,D3DSAMP_MAGFILTER,D3DTEXF_LINEAR); pDevice->SetSamplerState(0,D3DSAMP_MINFILTER,D3DTEXF_LINEAR); pDevice->SetSamplerState(0,D3DSAMP_MIPFILTER,D3DTEXF_POINT); pDevice->SetStreamSource(0,vbuff,0,sizeof(Vertex)); pDevice->SetFVF(Vertex::flags); pDevice->DrawPrimitive(D3DPT_TRIANGLELIST,0,2); how do i make the texture take up the whole screen and not just a portion of the screen? thanks for your support people.
  8. Hi guys, i am making a setup file for my directx program that i made. I have one question regarding the vs2005 setup project. I made a RadioButtons (2 Buttons) dialog after the install completes and i wrote a vbs script that will run depending on the button the user clicks. Now, here is my problem, what do i put in for the conditions for the VBS file. The VBS file is in a custom action under install. I tried these conditions for BUTTON = 1, BUTTON == 1, etc..... BUTTON is the Button Property..I think i am doing this wrong...how do i get which button is check from the dialog. help me...thanks.
  9. 31337noob

    gta IV question

    Where exactly is the liberty city gun club....i know its on the first island and thats about it. I want to join it.
  10. 31337noob

    GTA IV- where to take a vehicle

    solved... http://www.wikicheats.com/index.php/Grand_Theft_Auto_IV_-_PS3_XB360/Side_Missions
  11. 31337noob

    GTA IV- where to take a vehicle

    There is this one side mission that Stevie asks for a vehicle through your cell phone. The vehicle that he wants is a moonbeam. I know where the moonbeam is, but where to I take the vehicle? The GPS does not tell me where to take it; neither does the map. Help. I want to get money for the moonbeam. Do you just go in the vehicle and that's it?
  12. 31337noob

    BMP reading problems....

    Quote:Original post by Anon Mike Obvious stuff... 1. You're not opening the file in binary mode, try "r+b" instead of "r+". 2. The check "strcmp(bm,tmp)" is operating on non-NULL terminated strings. 3. Your "size" calculation is completely wrong for anything other than 24bpp. 4. Even for 24bpp it's wrong because it doesn't take into account DWORD alignment. 5. You don't read in the color table, but it looks like you haven't completed that anyway. what do you mean for 4 and 5? i fixed the other ones.
  13. why doesn't this work, i played around with it for a while now, but the last fread is failing.....data is all zero's, which it's not. this line fails.... fread(data,size,1,fp); the header #pragma once struct BMP_HEADER { //int Type; int bfSize; char bfReserved1; char bfReserved2; int bfOffBits; }; struct BMP_INFO_HEADER { unsigned long biSize; long biWidth; long biHeight; unsigned short biPlanes; unsigned short biBitCount; unsigned short biCompression; unsigned short biSizeImage; short biXPelsPerMeter; short biYPelsPerMeter; unsigned long biClrUsed; unsigned long biClrImportant; }; struct Color { int r; int g; int b; }; class BMP { public: BMP(); ~BMP(); bool loadBMP(char *file); int getWidth(); int getHeight(); unsigned char *getData(); private: BMP_INFO_HEADER bmp_info; BMP_HEADER bmp_header; unsigned char *data; }; the cpp file #include "bmp.h" #include <iostream> using namespace std; BMP::BMP() { data = NULL; } BMP::~BMP() { if(data) delete [] data; } bool BMP::loadBMP(char *file) { if(data) delete [] data; FILE *fp = fopen(file,"r+"); if(fp) { char bm[2] = {'B','M'}; char tmp[2] = {0}; fread(&tmp,1,2,fp); if(strcmp(bm,tmp)) { fread(&bmp_header,1,sizeof(BMP_HEADER),fp); fread(&bmp_info,1,sizeof(BMP_INFO_HEADER),fp); //fseek(fp,bmp_header.bfOffBits,SEEK_SET); int size = bmp_info.biWidth*bmp_info.biHeight*3; //data = new unsigned char[size+1]; //Color *c = new Color[size+1]; data = new unsigned char[size+1]; //fseek(fp,bmp_header.bfOffBits+1,SEEK_SET); if(bmp_info.biBitCount == 24) { fread(data,size,1,fp); for(int i = 0; i < size; i+=3) { /*data2[i+2] = (unsigned char)fgetc(fp); data2[i+1] = (unsigned char)fgetc(fp); data2 = (unsigned char)fgetc(fp);*/ unsigned char temp=data; data=data[i+2]; data[i+2]=temp; } } fclose(fp); return true; } else return false; } fclose(fp); return false; } int BMP::getWidth() { return bmp_info.biWidth; } int BMP::getHeight() { return bmp_info.biHeight; } unsigned char *BMP::getData() { return data; }
  14. 31337noob

    make background image

    Quote:Original post by ilflyer12 Well if you are using a windowed application, you need to take into account the amount of the screen that has the menus on it (aka file, edit, etc.). There is a windows call that will give you the area of your screen that you actually are drawing to but i do not remember it off the top of my head. Just google window size and you should get it. Also, the other reason you the image could be cut off is that your image does not have dimensions that are powers of 2. The width is correct at 1024 (2^10) but 768 is not a power of 2. This will cause issues on most video cards because they do not like textures that are not powers or 2. Therefore, resize the image to either 1024x512 or 1024x1024 and you should not get this problem. thanks man... you reminded me about the 2^n..now it works great..
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!