• 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

2714 Excellent

About Vortez

  • Rank
    Advanced Member
  1. Hi, i just wanted to know if it's possible to compute a hash on the gpu, like crc32 or something stronger(sha-1?) , in an efficient manner? If so, how, how would i retreive the result?
  2. Hi guys, i've been toying with the "game of life" for a few days, and been able to achieve blazing speed by using shaders to compute the next generation on the gpu (it can also do all the work on the cpu, so i can compare both methods speed). The problem i have is this: at some point, the game will be "stuck", generating the same 2 frames over and over, alternating between them forever... I need a way to detect this. If i do it on the cpu, it's easy since i could just compare the last few frames to see if the game is stuck, using memcmp, or even better, generate a hash while computing the next gen and just compare the last few of them. Easy. But when i use the gpu path, i only have the first frame in client memory (ram), and i don't know how to solve this problem other than use the slow glReadPixel. Perhaps a PBO could help, but im not very familliar with them. From what i remember, it wouldn't be that much faster anyway. What i want is some clever way to do that without losing too much framerate. So, any though? ///////////////////////////////////////////////////////////////////////// Those 2 files simply show how i use the code for both mode: CPU example code.txt GPU example code.txt Those are the 2 main classes of the project: GLEngine.h GLEngine.cpp The game of life.h The game of life.cpp Note:  (most relevant bits of code is near the bottom of each files) And finally, the shaders: Life.vs + Life.fs If you see anything i can improve on, please let me know!
  3. I would also suggest to replace   #ifndef INCLUDED_TILEMAP_H #define INCLUDED_TILEMAP_H   by   #pragma once   it's simpler and you don't need the #endif at the end :)
  4. Since most win32 api calls can be used in delphi, you could check my code and experiment with it. You dont need the whole thing, just check whhat i do in the fullscreen part.   Vortez.
  5. I love programming win32 apps with c++ builder and delphi, i still do today, too bad the price is so high or otherwise it could kick the ass of msvs, in the form  and components design at least. It's so easy to create custom components in delphi it's almost a joke. Too bad too many ppls jumped on the c# wagon. :(
  6. In addition to openal there's also the FMOD library, it's relatively easy to use too.
  7. Ok thx, i'll try that when im home.
  8. One thing you need to be carefull when using dlls is the calling convention, that got me a few times, especially if the dll and the code using it arent made by the same compiler or language. Having said that, it's hard to say without seeing any code.
  9. Hi, i've just refactored a class that originally used a STL set in order to keep track of the possibles values for each cell in my sudoku solver, by using a WORD instead to store values from 1 to 9, since i used the exact same interface(almost), no code changes we're required elsewhere.   Everything worked fine the first shoot except for the set difference operation. I got it to work, but something is puzzling me. First, let me show you the old code /***************************************************************************************************************/ // Perform a difference operation on the set /***************************************************************************************************************/ Possibles Possibles::operator-=(Possibles &s) { Possibles TmpSet = *this; possibles.clear(); set_difference(TmpSet.GetSet()->begin(), TmpSet.GetSet()->end(), s.GetSet()->begin(), s.GetSet()->end(), inserter(possibles, possibles.begin())); return *this; } /***************************************************************************************************************/ // Perform an union operation on the set /***************************************************************************************************************/ Possibles Possibles::operator+=(Possibles &s) { Possibles TmpSet = *this; possibles.clear(); set_union(TmpSet.GetSet()->begin(), TmpSet.GetSet()->end(), s.GetSet()->begin(), s.GetSet()->end(), inserter(possibles, possibles.begin())); return *this; } /***************************************************************************************************************/ // Perform an intersection operation on the set /***************************************************************************************************************/ Possibles Possibles::operator|=(Possibles &s) { Possibles TmpSet = *this; possibles.clear(); set_intersection(TmpSet.GetSet()->begin(), TmpSet.GetSet()->end(), s.GetSet()->begin(), s.GetSet()->end(), inserter(possibles, possibles.begin())); return *this; } (NOTE: not sure i used the right operator sign...)   Then, when i emulated this with a WORD, the code looked like this: /***************************************************************************************************************/ // Perform an union operation on the set /***************************************************************************************************************/ Possibles Possibles::operator+=(Possibles &s) { p |= s.Get(); return *this; } /***************************************************************************************************************/ // Perform a difference operation on the set /***************************************************************************************************************/ Possibles Possibles::operator-=(Possibles &s) { p ^= s.Get(); return *this; } /***************************************************************************************************************/ // Perform an intersection operation on the set /***************************************************************************************************************/ Possibles Possibles::operator|=(Possibles &s) { p &= s.Get(); return *this; } All worked fine except the -= operator.   For example, the first code only added the difference IN THE FIRST SET instead of both (wich is the required behavior for my game), but the 2nd example added the difference in BOTH set, wich is normal but not what i wanted. So, to fix it, i had to write some ugly code like this: /***************************************************************************************************************/ // Perform a difference operation on the set /***************************************************************************************************************/ Possibles Possibles::operator-=(Possibles &s) { WORD w1 = p; WORD w2 = s.Get(); WORD res = 0; for(int i = 0; i < 9; i++){ if(((w1 & (1<<i)) > 0) && ((w2 & (1<<i)) == 0)) res |= (1<<i); } p = res; return *this; } That way, everything work fine except the code is not like the other 2 functions, and i was simply wondering why is that? To be more clear, why can i use simple bitwise operation for 2 of the 3 operation but not the 3rd???   EDIT: I might not be able to respond to this thread for a few days.
  10. You know how the stack work, right?   http://stackoverflow.com/questions/6219878/stack-overflow-c
  11.   You have your answer right there, stop blaming the compiler for your mistake. Either allocate the array with new(recommended) or increase the stack size. Default stack size is 1 Mb IIRC.
  12.   You dont have to have a vector class to do this, that was just a suggestion, you could roll up a function for this, for example. void SetTile(TILES *pTile, int x, int y, int TileSize) { pTile->x = x; pTile->y = y; pTile->w = TileSize; pTile->h = TileSize; } Calculating the x and y coordinate shouldn't be too difficult. I'll let you figure it out.   As for the lua part, i can't help you on that, haven't done that sort of thing yet.
  13. Use something like github, it will make you're life much easier. Although i cannot give you much advice since i only used it for my personal project, never coded in a team.
  14. You're repeating yourself a lot in this code, and the readability is not very good, i suggest caching those values into variables or consts.   Example:             tiles_i[(y * tiles_across) + x].x = 16;             tiles_i[(y * tiles_across) + x].y = 16;             tiles_i[(y * tiles_across) + x].w = 16;             tiles_i[(y * tiles_across) + x].h = 16;                        printf("%d\n",(y * tiles_across) + x);   could be replaced by             const TileSize = 16;             ...             int Index = (y * tiles_across) + x)             tiles_i(Index).x = TileSize;             tiles_i(Index).y = TileSize;             tiles_i(Index).z = TileSize;             tiles_i(Index).w = TileSize;   Even better would be using a vector class, and overload the = operator               tiles[Index] = TileSize; // Set all four values at once   Mine look like this. Notice i didn't think about overloading the = operator with a float, but it would take 30 seconds to add one, or i could use the Set() method.