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


  • Content count

  • Joined

  • Last visited

Community Reputation

105 Neutral

About programering

  • Rank
    Advanced Member
  1. Turns out that I found the documented solution for this problem while goggling once again though I took myself a long time to try looking(through numerous unsuccessive search queries) for it and solving it by myself before starting this topic. So typical. But I'll provide the source for it so that others that might encounter the same problem can benefit from this one: [url="http://support.microsoft.com/kb/139165"]http://support.microsoft.com/kb/139165[/url] via [url="http://forums.codeguru.com/showthread.php?506681-How-to-use-Get-SetDIBits()-like-Get-SetBitmapBits()"]http://forums.codegu...SetBitmapBits()[/url] Now Solved. [b]Edit:[/b] Actually the solution will be in this case: (the correct Win32 API call procedures to get ilutWinLoadImage to work) [CODE] hdc = GetDC(NULL); // or: hdc = l_hWndDC; hdcMem = CreateCompatibleDC(hdc); hBitmap = ilutWinLoadImage(L"TheImage.bmp",hdc); // <-- a HDC retrieved by GetDC of your destination DC, Not by CreateCompatibleDC. SelectObject(hdcMem, hBitmap); BitBlt(l_hWndDC,100,100,240,40,hdcMem,0,0,SRCCOPY); // And don't forgetting to release and delete the respective HDC's when done with them. [/CODE]
  2. Hi. I am having a trouble to properly load an image with the DevIL's [i]ilutWinLoadImage(hDC)[/i]function. On my first attempt with displaying the loaded image it didn't show up at all. But later I managed to get the image to display but now just in black&white though it originally is in colors. Here is an approximately holistic idea of how I try to get it to work, taken from my originally very messed up code: In my function that loads the image HBITMAP/HDC: [CODE] m_hImageDC = CreateCompatibleDC(NULL); // Seemed to be required before passing it. m_hImageBmp = ilutWinLoadImage(L"TheImage.bmp",m_hImageDC); SelectObject(m_hImageDC, m_hImageBmp); // <-- This was added in the second attempt which got it to show up, but just in b&w. [/CODE] In the WindowProc's WM_PAINT msg of the window to display the image: [CODE] case WM_PAINT: l_hWndDC = BeginPaint(p_hWnd, &paintstruct); BitBlt(l_hWndDC, 100, 100, 240, 40, l_drawContext->GetTheImageHDC(), 0, 0, SRCCOPY); EndPaint(p_hWnd, &paintstruct); [/CODE] What procedures(additionally Win32 function calls) do you usually have to make to get this [b]ilutWinLoadImage([/b]hDC[b])[/b] to work as it is supposed to? Thanks.
  3. Quote:Original post by jyk What language(s) do you have in mind? C Plus Plus of coarse. Quote:Original post by jyk Also, when and under what circumstances does the statically allocated object get deallocated? (And what precisely do you mean by statically allocated?) Can you give an example? For example if the object to be used for my smart pointer(ObjectToBeUsed) is an actual instance member within another object(SourceObject). That's what I thought statically allocation was(If that's right?). Like this: class SourceObject { ObjectToBeUsed testSource; // Its origin is here. }; So when a SourceObject instance is deallocated, a such smart pointer of mine with this testSource as target shall be notified and set its internal raw pointer to NULL. Is there a way to check if an address is deallocated?
  4. I've got an idea to invent a smart pointer for static allocated objects. I need it because I want the pointer itself to be reseted to NULL when the source it points to become deallocated. So is it possible to detect its deallocation.
  5. If it's global?
  6. If one have an actual object and a shared_ptr or any other boost smart pointer. Can one assign the shared_ptr from the actual object? Like so showed in this example: using namespace boost; // A class that contains the shared_ptr: class PtrContainer { PtrContainer() {} void set(SomeObject &refObj) { shared_ptr<SomeObject> ptrObj(&refObj); set(ptrObj); } void set(shared_ptr<SomeObject> ptrObj) { this->ptrObj = ptrObj; } shared_ptr<SomeObject> ptrObj; }; // Usage: int main(int argc, char *argv[]) { SomeObject actualObject; // The actual object. PtrContainer ptrContainer; ptrContainer.set(actualObject); return 0; }
  7. But does any smart pointers uses COW then?
  8. I thought it have it when one other shared_ptr instance is modified.
  9. I need to know what boost smart pointer or what else to use. I would need such a kind as boost::shared_ptr but without the Copy On Write feature.
  10. I have begun to use Dia now and "drawing" my base code project structure. But what I don't know how to do is to set a member as static. How do I do that. It is translated into swedish though.
  11. Thanks for the info. I probably need such programs ease my development.
  12. Quote:Original post by freeworld google starUML, it's very clean (sorta ugly colors), but does very well. It was the one I've already had. But I didn't understand it.
  13. I think I need a simple UML modeling program for building up the technical structure for my projects. I've downloaded and tried StarUML but I didn't quite understand it. I've tried to find UML educational videos on youtube but didn't find any(Maybe I didn't use the right keywords). I know there's usual tutorials in text, but the fact is it is very difficult for me to read and they consists of very much text. So if you know of any educational tutorials or such in video format it would be very helpful. What I need is a simple begginer level UML modeling program or video tutorials that explain how to use those other more advanced standard level UML programs. Thanks.
  14. Quote:Original post by DeathRay2K That can only reduce the alpha, whereas you want to increase it when you layer semi-transparent stuff. I think it's more like this: AlphaResult = AlphaBase + (255 - AlphaBase) * (AlphaAdditional / 255) I'm assuming by alpha you mean opacity and not transparency, so 255 is completely opaque, and 0 is completely transparent. Yes, that is exactly how I meant, and so is this. The way I figured it out now, is the way I realized it must be; That it only can reduce alpha is the logic when there comes an additional alpha. But thank you DeathRay for your contribution as an alternative. Rate+
  15. I think it must be: AlphaResult = AlphaBase * (AlphaAdditional / 255); ...now.