• 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.

Spike

Direct Draw Fault

9 posts in this topic

Something that I have known about for a very long time is the fact that direct draw surfaces must be divisible by 8 in there size. As much as I have learned to live with this, it still bugs me at why this is so. If anyone knows, please tell me about it. Any help apreciated Spike
0

Share this post


Link to post
Share on other sites
I''m pretty sure they simply need to be a power of 2, so each side must be 2, 4, 8, 16, 32, 64, 128, 256, 512, or 1024. The actual range of allowed sizes may be different than 2-1024; I''m just guessing.

Anyway, this is done with many engines to make calculations faster; bit shifting is faster than multiplication and much faster than division. An example of shifting power-of-10 numbers is left-shifting 1000.300 to make it 10003.00; left-shifting it one time is the same as multiplying it by 10^1. Computers use binary math, so left-shifting a number x number of times (number << x)is the same as multiplying it by 2^x. Right-shifting a number x times (number >> x) is the same as dividing it by 2^x.

~CGameProgrammer( );

0

Share this post


Link to post
Share on other sites
It might also have something to do with the fact that Intel machines like to deal with things on a 4-byte basis (memory alignment).

Mason McCuskey
Spin Studios - home of Quaternion, 2000 GDC Indie Games Fest Finalist!
www.spin-studios.com
0

Share this post


Link to post
Share on other sites
Thanks guys.

cprogrammer(), i think your right.

mason, even though what you say might be the case, I don't think so.

Spike

Edited by - Spike on 1/26/00 4:34:12 PM
0

Share this post


Link to post
Share on other sites
Maybe I''m crazy, but I''ve never had any problems with Surfaces that aren''t powers of two. I''ve had surfaces of all sizes without any problems.

I do know for sure that textures need to be powers of 2. Is this what your refering to?

--TheGoop
0

Share this post


Link to post
Share on other sites
To theGoop,

I am refering to surfaces. Try and build a surface that is 19 by 19. Then watch as your program totally messes up the images and anything else you may be trying to write to the surface. It is also possible for it to perform an illegal operation.

Spike
0

Share this post


Link to post
Share on other sites
When I''ve created surfaces... in my experience... they''ve only gotten garbled when they were in video memory, but in system memory they always seem to work right no matter how large they are. Why? I don''t know.

Al
0

Share this post


Link to post
Share on other sites
Well, what version of directdraw are u using? DDraw 7 surfaces work fine for me no matter what their sizes...
0

Share this post


Link to post
Share on other sites
I am using DX 5. So if you are using DX 7, microsoft have probably already fixed up the problem.

Spike
0

Share this post


Link to post
Share on other sites