🎉 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!

platform game latest demo

Started by
15 comments, last by diskheadyXI 23 years, 10 months ago
*idea*

Are all your sprite/texture/etc''s dimensions on both the x and y axes multiples of 8? I know this causes the pictures to appear squewed on my computer from experience. I would imagine that it would have a similar effect on others.

Just a random thought now, probably not right (someone correct me?):

Some cards display surfaces with irregular dimensions fine.
Others display them squewed.
Others cause DirectX to devour itself and the program to crash.

How far off am I?

The_Minister
1C3-D3M0N Interactive
[email=mwronen@mweb.co.za" onmouseOver="window.status='Mail The_Minister'; return true" onmouseOut="window.status=' '; return true]The_Minister[/email]1C3-D3M0N Interactive
Advertisement
Ahem..... Minister u r (almost) right...

the image isn''t right... Must it be a i think instead of a multiple of 8 it must at least be a power of 2.

just change the image a bit, and it should work..

cya,
Phil
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
From the screenshots the others posted it looks to me like the bitmaps have a byte-offset problem.

Different video cards display graphics differently. Oh geez, I forgot the name of the term for it....brain cramp... The basic issue is that some cards display the scan lines at different offsets or shifts. You have to account for this in your code. I think it is covered in Andre''s book, maybe the advanced book is the one that covers it. I would send you the code I am talking about but I don''t have it here at work...

Try plotting a pixel in the four corners of a blank bitmap. Display the bitmap and check where to dots are. This will help you to see the problem. Or, just put one red dot in upper-left, and one green dot in lower-right, then you will only have two points to figure out.

Once I get home I will check into the technical name for what I am talking about and post it here.

-AG
Very nice but the graphics for mario and the bushes are screwed up on my pc.

450 pII, 256 mgs of ram
Riva TNT
Directx7.0A

--FUEL
thanks all , i''ll give that a go!

www.wolfwilliams.freeserve.co.uk
www.wolfwilliams.freeserve.co.uk
Ok, here goes, i''ve had a go at resizeing the bitmaps and
tinkering with the code.

please try the demo again at:

www.wolfwilliams.freeserve.co.uk/platform.zip

I''d appreciate it if you could tell me the following:

1. did it all look fine.

2. did the main character look fine.

3. did the main blocks (grass etc) look ok.

4. did the background look ok.

5. did the bush look ok.

6. which video card are you using.

thank you all very much, i can''t believe the help and interest
i am receiving from this board. It is very much appreciated.

Andy

www.wolfwilliams.freeserve.co.uk
www.wolfwilliams.freeserve.co.uk

The Computer configuration does not matter and dont waste your time trying to work out different cfgs.

DirectX exist to be the communication with ANY device, you must do the following :

You must get the PITCH first, create a class with this func:

DDSURFACEDESC2 ddsd;
HRESULT hr=DDERR_WASSTILLDRAWING;
Pitch = 0;
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof( ddsd );
switch (Mode)
{
case 0:
return NULL;

case CDD_DOUBLEBUFFER:
while (hr==DDERR_WASSTILLDRAWING)
hr = DDSPrimary->Lock(NULL, &ddsd, DDLOCK_SURFACEMEMORYPTR, NULL);
if(FAILED(hr))
return NULL;
Pitch = ddsd.lPitch;
return (void *)ddsd.lpSurface;

On the main loop add this:

if (!G_Skip)
{
video_buffer = (USHORT *)CMyDraw.OpenDraw();
int pitch = (CMyDraw.Pitch>>1);
int on_screen_bytes = SCREEN_WIDTH<<1;
g=0;h=0;
while (h <= SCREEN_SIZE)
{
memcpy( video_buffer + g , G_Buffer + h , on_screen_bytes);
g+=pitch; h+=SCREEN_WIDTH;
}

CMyDraw.CloseDraw();
request=0;
CMyDraw.Flip();
}

problem solved?

This topic is closed to new replies.

Advertisement