• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Lutrosis

Blt() Problems

7 posts in this topic

I''m new to DirectX, and I''m writing a few simple programs to get myself aquianted. I wrote a little particle system(since it only required being able to put pixels) and it worked fine. Now I''m messing with animation, and I''ve hit a snag. It seems I can''t blit to the primary surface. The blit command doesn''t fail, it just doesn''t to anything. Actually, all I''m trying to do is a fill. Here''s some code fragments: DDBLTFX ddbltfx; RECT FillArea; memset(&ddbltfx,0,sizeof(DDBLTFX)); ddbltfx.dwSize=sizeof(DDBLTFX); ddbltfx.dwFillColor=Color; FillArea.bottom=479; FillArea.top=0; FillArea.left=0; FillArea.right=639; PrimarySurface->Blt(&FillArea,NULL,NULL,DDBLT_COLORFILL/DDBLT_WAIT,&ddbltfx) The screen mode is 640x480x16 bit. I''m quite sure of the _RGB16BIT() macro, so it''s not a screw-up there. The annoying part is that it''s only for a specific area of video memory(from what I can gather). I tried creating a Secondary flippable surface and blitting to that, then flipping the page, and it worked fine. But then I couldn''t blit to the secondary surface, which should still be the same video memory as the original Primary surface, if I understand page flipping properly. If anyone has any ideas as to why that section of video memory can''t be blit to, I''d really appreciate hearing them. I''m working on a simple wrapper, and blitting to the primary surface would basically complete the functionality of it. -Lutrosis Drowning in the aggrivation of not knowing what''s wrong <=]
0

Share this post


Link to post
Share on other sites
If this is an exact copy of the code, I''m curious as to why you are dividing DDBLT_COLORFILL by DDBLT_WAIT in the following line

PrimarySurface->Blt(&FillArea,NULL,NULL,DDBLT_COLORFILL/DDBLT_WAIT,&ddbltfx)

That should be DDBLT_COLORFILL / DDBLT_WAIT

Mark Fassett
Laughing Dragon Entertainment
http:\\www.laughing-dragon.com
0

Share this post


Link to post
Share on other sites
OK, I see... ignore my last post. I didn't know the board changed pipes into /

Try checking your return code from your blit call and see what it says.


Mark Fassett
Laughing Dragon Entertainment
http:\\www.laughing-dragon.com

Edited by - LaughingD on 2/16/00 11:33:26 PM
0

Share this post


Link to post
Share on other sites
Try changing your RECT structure so your bottom reads 480 and your right side reads 640. Those are exclusive so it includes 0-479 & 0-639.

Still Learning...
0

Share this post


Link to post
Share on other sites
That''s the strange thing. Blt() is returning DD_OK. I didn''t make this clear, but my code is actually set up to check for errors and dump them to a file if they occur. Blt() returns DD_OK, and yet still nothing happens. I''m quite confused. Any DirectX Gurus out there?

-Lutrosis
0

Share this post


Link to post
Share on other sites

Hm... Well make DDBLTFX lower case in:

memset(&ddbltfx,0,sizeof(DDBLTFX));

and

ddbltfx.dwSize=sizeof(DDBLTFX);
0

Share this post


Link to post
Share on other sites
strange. It really sounds like the value of color isnt right. I take it the screen is black and you are trying to fill it with a color?
with your particle system have you tried writing them to the primary using the same color value.
have you tried blitting a bitmap instead of a colorfill
worth trying bltfast to make sure that works.
You arent making the mistake of blitting to the primary, then calling flip just after it i presume?
Hope these random mumblings provoke an eventual fix :-)

http://www.positech.co.uk
0

Share this post


Link to post
Share on other sites
I just copied this code from my project, and it works correctly. It''s almost identical to your''s, except that it fills the whole surface instead of using the rect (is this what you''re trying to do?)


DDBLTFX ddbltfx;
memset((void*) &ddbltfx, 0, sizeof(ddbltfx) );

ddbltfx.dwSize = sizeof( ddbltfx );
ddbltfx.dwFillColor = RGB(0, 0, 0); // black

lpDD_Surface->Blt(NULL, NULL, NULL, DDBLT_WAIT / DDBLT_COLORFILL, &ddbltfx);



- null_pointer
0

Share this post


Link to post
Share on other sites