• 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

171 Neutral

About Knight52

  • Rank
  1. https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRMWXOg2UVZAWt2o_JkN4mCMY6j2CyszDm8Qhp1cEP4Hvue2G3n">https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRMWXOg2UVZAWt2o_JkN4mCMY6j2CyszDm8Qhp1cEP4Hvue2G3n The trail of the wisp. What is it called, and how do I implement it with DirectX 9?
  2. Right now I load all model with their hierarchies kept. But it begins to have a performance issue, and I wondering if not keeping the hierarchy will give any obvious performance boost.   also, is there any way to find out if the .X file contains animation or not, before calling D3DXLoadMeshHierarchyFromX?
  3. Just to be sure, is trapezoid considered a plane? And D3DXPlaneFromPoints which create plane from 3 vectors can be used to create trapezoid?
  4. I have a line on 2d screen. I want to know which 3d objects the line is on. It's a straight line. Anyone knows how to do it?   I'm trying to create a plane out of it and use it to detect the collision. I have calculated 4 points for the plane's corner, but I don't know what should I do next.
  5. [quote name='Kaptein' timestamp='1348215126' post='4982277'] check if the directx functions you are using are thread-safe without any code, it's hard to help you as you should know, in threading, all threads can access the same (shared) memory without mutex locks, you can't be certain that the same memory isnt accessed or overwritten by threads at the same time one bad example is: if you allocate memory at the same time on both threads, both pointers could end up with the same value! (memory offset) threads don't necessarily start in the order you started them in they don't execute at the same speed just google threads! theres LOTS you need to know about them before you can start using them in a game!! start using threads in a small test project and find out what you can and can't do![/quote] [quote name='rip-off' timestamp='1348215916' post='4982281'] [quote] I know how bad it is to go multi-threading, but I don't know how else I will load stuff behind the loading screen. [/quote] Have you tried non-blocking or asynchronous I/O? [/quote] I've created a mutex lock, still doesn't fix the leaks. I've tried WM_TIMER which I understand it's one of asyn io processes, doesn't fix the leak either. So I don't think it's multi-threading resource issue. Here's the some sort of algorithm. Hope this will help. [code] Retrieve info if player is initialized. { separate the player and equipments from resource pool. } Flush the resource pool. This includes Skybox primitives and texture, object's model and animation, terrain, and lights' shadow maps. Open the file if(file == null) { Messagebox ("cannot open file") exit } Load new resources by reading info from the file. if player is initialized { add the player and equipments back to resource pool } else { initialize player and add it to the resource pool } delete file. hide loading screen. release mutex close mutex [/code]
  6. I know how bad it is to go multi-threading, but I don't know how else I will load stuff behind the loading screen. No memory leaks when I do single thread, but when I create another thread to handle that same function, I got memory leaks. That function handles some Direct3D loading too. Do I have to release something before exiting the thread?
  7. [quote name='kunos' timestamp='1346333229' post='4974799'] do you also swap the depth buffer with one with the same size as the shadowmap? [/quote] so that's the problem. Should I create another texture for this swapping?
  8. I swap default render target to shadow map's surface before rendering the map, then swap back when finished, if that's what you mean. you ask why does screen have 4:3 ratio? Isn't it still standard resolution ratio nowaday? I mean I will, at least, try to make this game go public, so shouldn't it at least have 4:3 ratio?
  9. [quote name='Hodgman' timestamp='1346324343' post='4974745'] Can you expand on this - something with the effect framework generates an error? [/quote] [code] HRESULT result = effect->ValidateTechnique(ShadowTechnique); if(FAILED(result)) {// will generate error -2005530591 D3DERR_CONFLICTINGRENDERSTATE MessageBox(cq->handler(), "Failed validating Shadow Mapping technique", "ERROR", MB_OK); } [/code]
  10. say the shadow map is 1024x1024 pixel. If the display window is larger than that (1280x1024), it's fine. If it isn't (800x600), it'll fail the technique validation. Did I miss something?
  11. Is there any way better than flush the instance buffer, per-instance data, and recreate them? I haven't tried this brute force approach yet, so I don't know how much fps it'll reduce.
  12. [quote name='turch' timestamp='1344865552' post='4969059'] If you mean that you have one draw call for each quad, then you can expect a huge performance boost from switching to one or a few draw calls for the terrain. [/quote] You mean DrawIndexedPrimitive() or DrawPrimitive(), right? Is there any way I can still draw additional texture specific to each quad? If the performance boost is that good, I'll consider removing that feature anyway. [quote name='turch' timestamp='1344865552' post='4969059'] If it is in a tight loop, definitely cache it. [/quote] Can you describe what is caching you're talking about?
  13. 1. Terrain. Right now I'm using multiple quad primitives connected to each other. This way I can divide terrain into blocks and each block can have additional texture specific for that block. But I see in some tutorial that they use one indexed primitives to create terrain. How much performance boost should I expect if I choose to change from multiple quad primitives to single primitive? 2. .X model importer. I have the code from [url="http://www.toymaker.info/Games/html/load_x_hierarchy.html"]this example[/url] and modify a bit. It might not be the best, but it does the job. Recently I notice significant fps drop when many models is on the screen (I'm using View Frustum Cull) and I begin to think I need some change. Is there .X model importer I should use instead? 3. Updating the game state. If I choose to create a thread to specifically handle the "main loop update", will that increase some fps? Is there any problem I should expect? 4. Should I call sin/cos/tan/etc function once and store the result instead of calling those functions every time I need to use the result?
  14. Ah never mind. I've fixed that. It had something to do with "ItemSlot slot = *itemslot[i][j];" or passing 2 or 3 levels pointer. Sorry.
  15. This is a part of the code of character's inventory system. This part will swap two inventory slots (itemslot[i][j] and highlight). They will swap array of item pointer, number of item in that slot(stack), default slot background and current slot background. It's fine when they swap for the first time, but when trying to swap back, that error occured, right after break; command. I've googled a bit and found out this error has something to do with segment fault or memory leaks, but I have no idea which part of the code that cause this. Can anyone point out? None of these function leads to delete or delete[], btw; [CODE] for(int i = 0; i< 5; i++) for(int j = 0; j< 5; j++) { if(itemslot[i][j]->button->Intersects(base)) { ItemSlot slot = *itemslot[i][j]; itemslot[i][j]->stack = highlight->stack; itemslot[i][j]->item = highlight->item; stringstream s, s2; s << itemslot[i][j]->stack; itemslot[i][j]->button->SetText(s.str()); itemslot[i][j]->buttondefaultimage = highlight->buttondefaultimage; highlight->stack = slot.stack; highlight->item = slot.item; s2 << slot.stack; highlight->button->SetText((slot.stack > 0)? s2.str() : ""); highlight->buttondefaultimage = slot.buttondefaultimage; for(int k = 0; k< 3; k++) { Image *img = itemslot[i][j]->button->GetImage(k); itemslot[i][j]->button->SetImage(k, highlight->button->GetImage(k)); highlight->button->SetImage(k, img); } highlight = null; break; } } [/CODE]