🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Plese help testing my first game

Started by
25 comments, last by Aqutiv 23 years, 10 months ago
I think you have a memory issue here.

I started it, played with it. Then half way through, it just crapped out and returned me to windows.

Very odd. but I would get it''s memory somewhere.

Alek
Advertisement
quote: Original post by OutAxDx

Why are you using 16bit? Your images are 8bit, so why not use an 8bit video mode? Just wondering.

man... thats cheap. ddutil.. I have to do all my code by myself, which is why 16 bit is such a pain, gotta figure out the pixel format and stuff. Its only one line of code to do so however. It just took a while to figure it out.

Edited by - OutAxDx on August 19, 2000 9:47:13 PM


It seems to me that you''re just showing off, my friend.
I used 16bit because if I didn''t, transparency wouldn''t work for some reason. (dunno why)
So what if each individual image is 8bit? when you add diffrent bitmaps together (which all have diffrent colors), then overall it''s not just 256 colors anymore.

AquDev - It is what it is.
I took a quick glance at your code and didn''t notice anything out of the
ordinary, but I would change your DText() function a bit from this to this:

    void DText(char *text, int x,int y,               COLORREF color,               LPDIRECTDRAWSURFACE7 lpdds,               HFONT fnt) {    HDC	hdc;     //SIZE size;    if (g_pDDSBack->GetDC(&hdc) == DD_OK)  {         SetBkColor(hdc, TRANSPARENT);        SetTextColor(hdc, color);        //GetTextExtentPoint(hdc, text, lstrlen(text), &size);        TextOut(hdc, x, y, text, lstrlen(text));    }    // release the dc    lpdds->ReleaseDC(hdc);} // CHANGEDvoid DText(char *text, int x,int y,           COLORREF color,           LPDIRECTDRAWSURFACE7 lpdds,            HFONT fnt) { HDC hdc;  if (lpdds->GetDC(&hdc) == DD_OK)  {     SetBkColor(hdc, TRANSPARENT);    SetTextColor(hdc, color);    TextOut(hdc, x, y, text, lstrlen(text));      // release the dc    lpdds->ReleaseDC(hdc);       }}     


In your code, if GetDC fails, you are still calling ReleaseDC, which
might do bad things with an undefined hdc. And you''re using two different
surfaces, g_pDDSBack and lpdds. These two should be the same surface.
That''s all.


http://www.geocities.com/subpixelgames/index.html
Thanks alot! that might be it...
or at least, I hope so, cause it kinda pisses me off.
I updated the file on the second time...
so if anyone of those who it failed for them feels like trying again, go ahed.

Edited by - Aqutiv on August 20, 2000 1:39:34 PM
AquDev - It is what it is.
I''ve problem too, with my tetris clone , some peoples have reported that it has some problems, but i cannot find the problem.
So i''ll be very thankful if anyone can download, and test my program
the URL is :
http://www.geocities.com/drv_3025/tet20.zip

thanks
Sorry, but it still doesn''t work/
--------------------------Programmers don't byte, they nibble a bit. Unknown Person-------------------------
oh, forget it... I''m starting to dislike DirectX..
AquDev - It is what it is.

This topic is closed to new replies.

Advertisement