My First Attempt at a Game...

This is a discussion on My First Attempt at a Game... within the Game Programming forums, part of the General Programming Boards category; That sounds closer to reality....

  1. #16
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    That sounds closer to reality.

  2. #17
    Epo
    Epo is offline
    Registered User
    Join Date
    Jun 2003
    Posts
    361
    I just wanted to thank this thread!

    Until now, without collisions, my limit has been 300 Sprites, and then my 75FPS would start to drop.

    After reading everything here, I was really hoping that my graphics card wasn't just that bad.

    So I changed some of my stuff around, and can now go up to 5300 Sprites and still maintain the 75FPS. This is still without collisions and all, but thanks for letting me see how inadaquate my engine was until this point!

    If you're curious why I was at such a loss:
    - I was calling ID3DXSprite::Begin() and ID3DXSprite::End() methods for each sprite
    - I switched from the D3DXSPRITE_ALPHABLEND to the D3DXSPRITE_DONOTSAVESTATE flag in the ID3DXSprite::Begin() method (since I'm not actually in need of Alpha Blending).
    EDIT: This second one actually isn't a big deal since I'm not calling Begin() as many times anymore. Even with D3DXSPRITE_ALPHABLEND the FPS stay relatively the same.

    And just for kicks, the FPS method I use is:
    Code:
    void UpdateFPS(void)
    {
    	unsigned long NewTime;
    	NewTime = GetTickCount();
    	if(NewTime - 1000 > LastTime)
    	{
    		FramesPerSecond = FramesPassed;
    		FramesPassed = 0;
    		LastTime = NewTime;
    	}
    	else
    	{
    		FramesPassed = FramesPassed + 1;
    	}
    }
    I like this one because it doesn't have to deal with any division.
    Last edited by Epo; 12-21-2004 at 01:34 PM.

  3. #18
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    How are you doing color keying if you are not using alpha blending?

  4. #19
    Epo
    Epo is offline
    Registered User
    Join Date
    Jun 2003
    Posts
    361
    Well, so far I'm not, there isn't much use for it as of yet. Right now I'm just relying fully on my 4x4 blue texture.

  5. #20
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Yeah I sort of put 2 and 2 together right after posting that. That's great but for non-rectangular sprites you must use alpha blending for color keying since DX9 does not have any operations that natively support color keying.

  6. #21
    Epo
    Epo is offline
    Registered User
    Join Date
    Jun 2003
    Posts
    361
    I'll make sure to keep it in mind. Later on I'm definitely going to have to use alpha-blending once I want to move away from the cheapest graphics I can come up with

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  3. Try my game
    By LuckY in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 09-15-2004, 11:58 AM
  4. Game Design Topic #1 - AI Behavior
    By TechWins in forum Game Programming
    Replies: 13
    Last Post: 10-11-2002, 10:35 AM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21