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

asmLOCK

DirectDraw debugging

4 posts in this topic

Unfortunately, a really useful extension by Microsoft (surprise!) to C++ in this scenario is the 'try...finally' compound that lets you contain dangerous code in the try and if ANY exception is raised the code in the finally will be executed. Check into it to see if Borland has an equivelent extension.

The only other thing I can think of is don't write code that raises exceptions, but sometimes that can be hard.

What kind of exceptions are you dealing with? I would hope you would know what code regions could cause an exception and protect them in one way or another. Exceptions are a sign that you are feeding / using data / parameters that are invalid, which is generally a sign of underlying problems in your code. Fixing those problems will save you frustration in the future.

Also, wrap your low-level and system calls in nicer functions that can be carefully anaylsed and 'try...catch'ed. Then forget about exceptions.

- Splat

0

Share this post


Link to post
Share on other sites
I tried this:

***************************************

try
{
//my function to draw a filled circle...
Circle_Draw(x, y, color, radius);
}

//catch ANY exceptions with "..."
catch(...)
{
//unlock surface
DDSBack->Unlock(NULL);

//hide the window so
//I can see the debugger
DDCanvas->Hide();
}

***************************************

It still locked up, but I found where the problem was anyway. I wonder if the debug version of DirectX will help me with that locking up, but hurt my regular game performance???

Borland does have "finally", but in the code examples I saw, the catch(...) appeared to do the same thing(catch ANY exceptions thrown).

------------------
When life hands you lemons, throw them at God's head.

0

Share this post


Link to post
Share on other sites
Two other things you can try:
When locking, pass the DDLOCK_NOSYSLOCK flag. This can sometimes let you debug into locks (or at least not lock yourself up!). Second, if you're locking the backbuffer or front buffer, instead (maybe only for debugging) work with an offscreen, system memory surface. Sometimes this lets you debug inside a lock when it would otherwise lock up.
-ns
0

Share this post


Link to post
Share on other sites
Alright gang, here's my situation...I'm writing a 2D graphics library to draw filled circles, polygons etc. I use Borland C++ Builder 3 and DirectX7...here's the problem:
Every time one of my functions causes an exception while my surface is locked during a blit, I have to reboot! This can (as you might imagine), drive you insane...so I'm wondering if anyone knows what I can do to prevent these little mishaps. Will installing Directx debug version help or not?
Should I use "try" & "catch"(and what type of exception do I catch)?

------------------
When life hands you lemons, throw them at God's head.

0

Share this post


Link to post
Share on other sites
Here's an idea Go get yourself Windows NT. I am using NT4.0SP6 with DirectX 3 (yeah I know). As such you can guess I don't use Direct3D, my game is 2D though so that is not a big deal. It doesn't lock up my computer when something goes wrong in there, I just gotta Alt-Ctrl-Delete and End Task the bugger. NT seems to allow that key even if you have DDraw set to ignore it
0

Share this post


Link to post
Share on other sites