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

AlexB.hpp

Members
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

201 Neutral

About AlexB.hpp

  • Rank
    Member

Personal Information

  1. In hlsl there is normalize()... Probably there should be something like that. But you should check this by yourself 'cause I do learn shaders for 2 months and don't know much.
  2. Oh, many thanks again. Looks like I've fixed the old one problem with infinite loop in stl. So... Actually I've done major work on it. Ok I pretty sure that realloc is ok now. It does; [CODE] new_ptr = realloc(old_ptr, size) if (!new_ptr) return old_ptr return new_ptr [/CODE] I'll read stuff about exceptions. And figure out how it should be. I have funny stuff as one of my friends said. I have calls of delete on unregistered ptrs [CODE] Try to erase unregistered pointer 0x82f10f8! Memory leak summary: operator new (0x82f1008) missed 4 bytes in main.cpp:5 operator new [] (0x82f1040) missed 4 bytes in main.cpp:6 malloc (0x82f1078) missed 4 bytes in main.cpp:7 calloc (0x82f10b0) missed 4 bytes in main.cpp:8 realloc (0x82f10e8) missed 8 bytes in main.cpp:10 Total leaked 24 bytes Try to erase unregistered pointer 0x82f10f8! Try to erase unregistered pointer 0x82f10c0! Try to erase unregistered pointer 0x82f1088! Try to erase unregistered pointer 0x82f1050! Try to erase unregistered pointer 0x82f1018! [/CODE]
  3. Damn it, I've stuck a little. Meet cool bug when some containers of STL use my funcs and do stucking in infinite loop. You know how it happens - you read about 1000 books of cpp and still doing this stupid mistakes in you code.
  4. I want to join you guys. I have 4 years experience in C++. Now I'm working on 2d engine with few friends of mine. I'm about 3rd month working in game dev. It's AlexBolotsin@Gmail.com
  5. [quote name='SiCrane' timestamp='1354131396' post='5005045'] That still doesn't handle realloc() properly. You aren't taking into account instances when size is equal to zero and you are also aren't handling null return values properly for what looks like any of the allocation functions. Your code also looks like it blows up messily if your header is included before code that uses placement new (which includes large chunks of the standard library). [/quote] Hm. I've read it already. Tomorrow I'll fix it. That bastard is really tricky, too many behaviors for just one func... About including my header - yeah it has a bug here, I know about it. I'll describe it in docs. Have no ideas now. Thank you. [quote name='e?dd' timestamp='1354134791' post='5005058'] Some other problems:[list] [*]void* operator new[] is missing a 'return'. [*]Not exception safe (meaning that somewhat ironically, it can cause leaks). [*]Causes problems with existing placement-new overloads (though working around that is probably very tricky). [/list] [/quote] Many thanks. Still need some tests. It's in todo list. About placement new... I'll keep it in mind.
  6. Read opened thread for this problem to find out better solution. It's really interesting.
  7. [quote name='SiCrane' timestamp='1354124673' post='5005006'] Probably not, but I wouldn't know for sure unless I saw the complete context for your code. Either way it doesn't address the issue of properly copying the data in the buffer that realloc() is supposed to do. [/quote] To prevent all misunderstandings I've implemented it via original funcs. Also I have improved output: [CODE] Memory leak summary: operator new (0x83af008) missed 4 bytes in main.cpp:5 operator new[] (0x83af040) missed 4 bytes in main.cpp:6 malloc (0x83af078) missed 4 bytes in main.cpp:7 calloc (0x83af0b0) missed 4 bytes in main.cpp:8 realloc (0x83af0e8) missed 8 bytes in main.cpp:10 Total leaked 24 bytes [/CODE]
  8. [quote name='SiCrane' timestamp='1354113215' post='5004970'] Your realloc() implementation is definitely wrong. As it is, it [i]creates[/i] a memory leak. If realloc() returns a new address, the old allocation needs to be freed. Also, the data copy doesn't properly handle the situation where the new size is greater than the old size. [/quote] Many thanks about this issue with old ptr. Yeah I knew about greater size then old ptr had. Will it be ok if i'll do memset(new_ptr, 0, size)?
  9. [quote name='wqking' timestamp='1354096944' post='5004907'] Good start. But reporting leaks with only addresses is not quite helpful. I would like to know the call stack and the class name, if possible. [/quote] I'm planning such output: [CODE] Memory leaks summary: operator new in main.cpp:34 (0x0fa43d41) allocated 4 bytes ... [/CODE] What output would be enough informative for you? [quote name='Dynamo_Maestro' timestamp='1354102278' post='5004932'] I forgotten the method (since this technique ironically reports smart pointers as leaks heh) but MFC has a pretty decent way of checking for leaks already even if you arent making MFC apps, heres the link anyway http://msdn.microsoft.com/en-us/library/c99kz476(v=vs.100).aspx [/quote] I'm making it as cross-platform solution. But however thanks.
  10. Added malloc, calloc, realloc and free wrappers. Added gitignore. I have a question about realloc. Does it reallocate of incoming pointer? Is it correct in my code?
  11. [quote name='SiCrane' timestamp='1354058338' post='5004731'] Don't forget calloc() and realloc(). realloc() is always a fun one to deal with because depending on how you call it, it can also act like malloc() or free(). [/quote] Thx for calloc don't even know about it.
  12. [quote name='ApochPiQ' timestamp='1354056553' post='5004714'] [code]#include <malloc.h> #include "allocation_hooks.h" int main() { void* foo = malloc(1024); check_map(); // No leak reported. }[/code] [/quote] Cause there is no malloc overloading. Will add to todo list. Thx [url="https://github.com/AlexBolotsin/leak_check/issues/1"]1st issue[/url] added.
  13. I've started working on simple and little class for C++ to check some memory leaks. I have made some work on it, but there is a lot of work to do. I'm planing to add cppunit, autoreconf, documentation, static class instread of global functions, different loggers. Now it has: shared library, header with some funcs declarations, makefile to build it via g++, simple script to test it, linux only but I'll port it to win after some researching. I do it for my own project but I would like to share it with a great pleasure. Now it looks like this [CODE] alexb leak_checker> ./run.sh MEMORY LEAK! 0x8c1a008 main.cpp 5 MEMORY LEAK! 0x8c1a038 main.cpp 6 [/CODE] with such main: [source] #include <iostream> #include "allocation_hooks.h" int main(int argc, char** argv) { int* num = new int; num = new int[1]; check_map(); } [/source] Repo is [url="https://github.com/AlexBolotsin/memcheck"]here[/url]. PS Warning it has some magic in it!
  14. [quote name='Nausea' timestamp='1353942090' post='5004205'] AlexB.hpp: I take it you´re joking? ... [/quote] Don't be mad about that... I didn't mean any stupid stuff. I wanted to said that you have a great possibility to make a nice game and take a lot of experience. Some time I write/say totally strange things, but it's ok for me. That's how I start deep thinking.
  15. You need collision detector cauze bullets gets thought terrain. Actually there is a lot of possible improvements. Does your character can shot only horizontal ax? Are there any other types of weapons? What about some enemies? What about twitter or smth else in it? Does it have achievements? --- Looks like my English still pretty bad if I couldn't talk what I want.