• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

105 Neutral

About esgol

  • Rank
  1. Custom Data Files i guess you are reffering to binary data files not? Seems to me more simple than finding out how these WIN API functions work with no piece of codes examples at all
  2. Cant I find somewhere example code on how does that work? Its so confusing. What exactly do i have to do it does not explain. Right in the bitmap filename in the parameter? Or do i nott both. (Since we re talking of DirectX API windows its the only way)
  3. Hello I have 2D D3D9 aplication in VC++ 6.0 using bitmaps for the sprites. Instead of having them into the same folder i would like them embeded into the exe or into a single files (eg .dat) Seens they are 20+ flooding the folder accessible by anyone and eligible to lose therefore In the past I have been proposed the resource system of windows. But i think its olny for icons cursors and UI tools in general. Can it be used for large files destined for any manipulation? If you could have some example code would be greate. WOX book on VC 6.0 does not has something
  4. Yes I hate the half threads were the poster found the solution and deserted it indifferent like an egoistical indiferent beast. And you go study all the thread to reach half answer. This has to stop. Thank you its a good idea cause in the example there wasnt such prob. Im fine since it works like this at least, but i ll have to figure out the prob otherwise i will find it in front of me sooner or later again re resolvable or not :/ Thank you Oh really i didnt knew thanks for the advice
  5. Wow its a good start thank you! Something free for DireXt incredible.
  6. OH YES OF COURSE A button can be nothing more that a sprite which change color once from above and if clicked begina an action. BUT FOR TEXT INPUT, since we need a "Text Area" with the cursor and all and to be stored somewhere afterwards ( if its an "Enter Host IP" ) I cant imagine how in a Dirext beetween the d3d-> begin.scene d3d->end.scene can that be implemented. If simply in a space once clicked, letter texture quads (fonts) are put at representive key strokes, and what is put-written is stored by its representive chars to a var... That could work. BUT are tehre free libraries that let you quickly determine something as text box or drop down list and avoid all this "Re-invention of the wheel" ?
  7. Putting Text input and drop down lists like we see in games, its something which is done through windows programming and DireXt has nothing to do? I rather doubt the the dropdown lists and boxes should had the Windows UI. Or you put them from the windows libs and modify their aspect through DireXt libs? Any idea-example or technologies-libs involved? ( not full code, after all I'm not at that point yet, I m just htinking of expanding my Labyrinth 2 game with interacctive menu for Fun )
  8. Well you wont believe it and its crazy how i solved it out It doesnt draws THE LAST sprite so those 2 angles, since they were the last Path_Sprite and the last Wall_Sprite respectively they werent drawed. The players since they are the uniqie sprites respectively they re not drawned also. So Ive put down right and into a suplementary line one symbol from each sprite symbol uselesly, and so all previous are draw and everybody is happy [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] [img]http://img96.imageshack.us/img96/4858/labyrinth2n.jpg[/img] But I still cant figure out what is this madness. WHY NOT DRAWING[u][b] ONLY THE LAST[/b][/u] SPRITE SPECIFICALLY? P.S. Sorry, I felt the need to provide the solution to terminate the thread, Im not the type who comes like an egoistical monster seeking solution and shits all once got it. ( Yes its from Athens Technological Educational Institute in Greece. We do stuff too here, we re not just lazy PIGS going bankrupt and living on Loans, blame only our political system ;)
  9. All of them are declared as NULL to the 2nd parameter if that what you mean. But they still work instead of the moving ones :S
  10. It is like you say with some micro calls but they re not recognized. Probably i miss a library. I cant Compile on visual 2010 DireXt 9 code from that Book. It returns me error "OLD C STYLE CODE" loool And with 2010 will I be able to program Direct 9? Wont I have probs with surpassed old libraries ( is there backward combatibility for the developer)
  11. What DireCt version and what compiler and windows version are you using? I have problem finding AlphaBlend myself
  12. I did of courese, how could u programm without the Dirext SDK. NOT USE VC 6.0++??? BUT its the Microsofts official and the supposed most stable to run DireXt as one of its product What could anyone use instead
  13. Please somebody explains me or if at least has any idea why this happens. http://img687.imageshack.us/img687/9176/tempbugdirext.jpg The code cant be more clear and straight, I look and re look and cant find something. Sometimes, the stone sprite may load, but (!) simoultanousley its BLACK one is loaded, AND (!) the black one its the real that gives victory, if u go to the sprite one it simply disapears and nothings happens (!) What the hell "Ghosts in the machine"?!! Could it be an asynchronized called of the Painter compared to position changing? However I call the painter after all position changes are done Also the 2 static spritsew down right dont load however u can go there its an active location. That though not of my interest it EVEN MOST crazy Please give an idea at least I've made this problem as more analysed and easy to understand I could even by making that Photoshop illustration. DIRECT SCENE PAINTING [code] void Labyrinth_Painter() { int i=0, j=0, NewX=0, NewY=0; RECT rectObst, rectPath, rectM, rectL, rectO, rectMWon; if (d3ddev->BeginScene()) { //erase the entire background d3ddev->ColorFill(backbuffer, NULL, D3DCOLOR_XRGB(0,0,0)); //d3ddev->StretchRect(back, NULL, backbuffer, NULL, D3DTEXF_NONE); //draw the sprite //d3ddev->StretchRect(kitty_image[kitty.curframe], NULL, backbuffer, &rect, D3DTEXF_NONE); for (i = 0; i <20; i++) { for(j = 0; j < 50; j++) { if (Labyrinth[i][j]=='*') { d3ddev->StretchRect(Obstacle_Image, NULL, backbuffer, &rectObst, D3DTEXF_NONE); rectObst.left = Obstacle.x+NewX ; rectObst.right = Obstacle.x + Obstacle.width+NewX; rectObst.top = Obstacle.y+NewY; rectObst.bottom = Obstacle.y + Obstacle.height+NewY; } if (Labyrinth[i][j]=='.') { d3ddev->StretchRect(PathImage, NULL, backbuffer, &rectPath, D3DTEXF_NONE); rectPath.left = PathBlock.x+NewX ; rectPath.right = PathBlock.x + PathBlock.width+NewX; rectPath.top = PathBlock.y+NewY; rectPath.bottom = PathBlock.y + PathBlock.height+NewY; } if (Labyrinth[i][j]=='M') { d3ddev->StretchRect(MpamphsImage, NULL, backbuffer, &rectM, D3DTEXF_NONE); rectM.left = Mpamphs.x+NewX ; rectM.right = Mpamphs.x + Mpamphs.width+NewX; rectM.top = Mpamphs.y+NewY; rectM.bottom = Mpamphs.y + Mpamphs.height+NewY; } if (Labyrinth[i][j]=='L') { d3ddev->StretchRect(LuciusImage, NULL, backbuffer, &rectL, D3DTEXF_NONE); rectL.left = Lucius.x+NewX ; rectL.right = Lucius.x + Lucius.width+NewX; rectL.top = Lucius.y+NewY; rectL.bottom = Lucius.y + Lucius.height+NewY; } if (Labyrinth[i][j]=='O') { d3ddev->StretchRect(PetradiImage, NULL, backbuffer, &rectO, D3DTEXF_NONE); rectO.left = Petradi.x+NewX ; rectO.right = Petradi.x + Petradi.width+NewX; rectO.top = Petradi.y+NewY; rectO.bottom = Petradi.y + Petradi.height+NewY; } NewX=NewX+21; } NewY=NewY+21; NewX=0; } //if (MpamphsWon==true || LuciusWon==true) //{ d3ddev->StretchRect(MpamphsWonImage, NULL, backbuffer, &rectMWon, D3DTEXF_NONE); rectMWon.left = 0 ; rectMWon.right = 1046; rectMWon.top = 400; rectMWon.bottom = 460; //} //stop rendering d3ddev->EndScene(); } } [/code] FILE READ [code] void File_Reader(char **Array) { int i=0,j=0; char *mystring; mystring=(char*) malloc (52* sizeof(int)); FILE * pFile; pFile = fopen ("LavirintosNDE.txt" , "r"); while ( (fgets (mystring , 52 , pFile) != NULL) && i<20 ) { for(j = 0; j < 50; j++) { Labyrinth[i][j] = mystring[j]; } i++; } } [/code] SPRITES INITIALIZATION [code]Obstacle_Image = LoadSurface ("Wall2.bmp", NULL); PathImage = LoadSurface ("Path2.bmp", NULL); MpamphsImage = LoadSurface ("Mpamphs.bmp", NULL); LuciusImage = LoadSurface ("L.bmp", NULL); PetradiImage = LoadSurface ("O.bmp", NULL); back = LoadSurface("Menu.bmp", NULL ); BackMpamphsWon = LoadSurface("bcgkMPAMPHS.bmp", NULL ); BackLuciusWon = LoadSurface("bcgkLUCIUS.bmp", NULL ); Obstacle.x = 0; Obstacle.y = 0; Obstacle.width = 21; Obstacle.height = 21; Obstacle.curframe = 0; Obstacle.lastframe = 0; Obstacle.animdelay = 2; Obstacle.animcount = 0; Obstacle.movex = 0; Obstacle.movey = 0; PathBlock.x = 0; PathBlock.y = 0; PathBlock.width = 21; PathBlock.height = 21; PathBlock.curframe = 0; PathBlock.lastframe = 0; PathBlock.animdelay = 2; PathBlock.animcount = 0; PathBlock.movex = 0; PathBlock.movey = 0; Mpamphs.x = 0; Mpamphs.y = 0; Mpamphs.width = 21; Mpamphs.height = 21; Mpamphs.curframe = 0; Mpamphs.lastframe = 0; Mpamphs.animdelay = 2; Mpamphs.animcount = 0; Mpamphs.movex = 0; Mpamphs.movey = 0; Lucius.x = 0; Lucius.y = 0; Lucius.width = 21; Lucius.height = 21; Lucius.curframe = 0; Lucius.lastframe = 0; Lucius.animdelay = 2; Lucius.animcount = 0; Lucius.movex = 0; Lucius.movey = 0; Petradi.x = 0; Petradi.y = 0; Petradi.width = 21; Petradi.height = 21; Petradi.curframe = 0; Petradi.lastframe = 0; Petradi.animdelay = 2; Petradi.animcount = 0; Petradi.movex = 0; Petradi.movey = 0; //initialize the sprite's properties //return okay return 1;[/code]
  14. I need the alphablend library for sprite fading and text output, to run the projects from Beggining Game Programming. However Ive set up a system with Windows XP SP1 and the SDK from the CD and VC++ 6.0 but still i cant find the alphablend. I have downloaded along some others from users having the same problem and who told it was solved but still noithing its buggy. Do i need a clear Windows XP without any Service Packs so its going to have the wright direXt embeded? ( i dont recall of itc 9.0b or 9.0c ) Thank you very much.
  15. BornToCode is wright. DO NOT TRY TO REFERENCE the entire collision system or whatever esle you have BY THE DIRECT SCENE X,Y VALUES, IT WILL BE MESS WITH NO END
  • Advertisement