• 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

114 Neutral

About Pygmyowl

  • Rank
  1. Pretty much what the title says. I want to implement something similar to what is used in Terraria: textured tile-based (by which I mean comprised of physical blocks - just in case) modifiable terrain (in 2D, side view). Except with a lot more tiles to draw (I intend to use variable zoom; my current hopes are to draw about 150,000 tiles at the camera's furthest, but I'd still need 4x4 textures for when the camera is up close). What would be the fastest way to draw this? Or maybe I'm way in the dream land here?   On a somewhat related note, I'm currently using textured quads to draw objects, because I've read that ID3DXSPRITE is deprecated, not as flexible, and so on. Is this true?
  2. Speaking of which, I tried obtaining the swap chain pointer from the device (using GetSwapChain) and calling Present from that (it has a flag parameter, like PresentEx), but D3DPRESENT_DONOTWAIT didn't have any effect. As it happens, my laptop has Intel and NVidia GPUs.   That said, is PresentEx any different from what I've tried? Should I give it a go nonetheless?   Update: I've come across an article describing the use of GetRasterStatus to determine if the frame is still being drawn. Adding this to my second timer check (so the render function isn't called until the display has finished drawing) seems to have fixed the problem. Just in case, the second check now looks like this: if((timer.tickCount.QuadPart-timer.memory1.QuadPart)>=(timer.tickFreq.QuadPart/GlobalParams.MaxFPS)) { d3ddev->GetRasterStatus(0,&d3drst); if(d3drst.InVBlank==true) { FramePass(); phystick=0; timer.memory1.QuadPart=timer.tickCount.QuadPart; } } Are there any potential problems I'm not seeing?
  3. Since you've mentioned IDXGISwapChain, does your method require DirectX 10 or higher?   Sadly, adding the flag did nothing. I've mentioned before that, as per Hodgman's suggestion, this is probably a frame queueing problem.
  4. In response to Hodgman: Thanks for the information on VSync and GPU queueing, it does indeed seem that frames were being fed to the display faster than it could draw them. I've slightly lowered the render function call frequency and the slowdowns seem to have ceased. I don't suppose it's too much of a crutch to render at (screen update rate)-1Hz if VSync is enabled?   As for my physical calculations, I've only just started figuring them out (hence the extreme update rate, for instance - I've decided to play it safe to avoid collision skips and such, but looks like I've overdone it). Thanks for everyone's suggestions, I'll definitely make use of them.
  5. But why does the slowdown only occur after several seconds, then? To clarify, at first everything is just like without VSync, with phystick showing 16-17 every frame (that's got to mean first "if" fires 16.(6) times as often as the second one... right?). Then it slowly drops. And even so, it stays higher than 1, so "while(true)" must be firing at more than 60Hz.
  6. Um, I didn't quite get it. Are you saying VSync stalls the rendering function until the display has finished drawing the previously presented frame? So the "while(true)" only fires once every 16.(6) ms?   Regarding the "physicsAccumulator": I've considered passing the time since the last physics iteration to ProcessPhysics(), so that it would advance the game world by that amount, but then, if a game were to freeze momentarily, there would be a skip. I thought it would make quite a mess of things, so I've decided to use a fixed step size.
  7. I apologize if this is the wrong subforum, but I couldn't quite figure out where to post this. Anyway, I'm currently trying to make my physical calculations independent from rendering. What I've done is make every physical object store its transformation matrices, which are then modified during physical calculations or used for rendering. Calculations and rendering are initiated in the message loop as follows: timer.Update(); //this essentially does the QueryPerformanceCounter(&tickCount) if((timer.tickCount.QuadPart-timer.memory1.QuadPart)>=(timer.tickFreq.QuadPart/GlobalParams.PhysicsFreq)) { ProcessPhysics(ObjectList,GlobalParams.PhysicsFreq); timer.memory1=timer.tickCount; phystick++; } if((timer.tickCount.QuadPart-timer.memory2.QuadPart)>=(timer.tickFreq.QuadPart/GlobalParams.MaxFPS)) { FramePass(); timer.memory2=timer.tickCount; phystick=0; } Notes: timer is a custom object; tickFreq is initialized via QueryPerformanceFrequency(&tickFreq) in the constructor; memory1, memory2 and phystick are pre-initialized to zero; phystick is displayed during rendering using ID3DXFont interface. Also, let's assume MaxFPS to be 60 and PhysicsFreq to be 1000. And I'm using a laptop.   Now, I've decided to do the whole "count the ticks" thing to check that "physics-to-frames" ratio stays the same. And here's the problem. Without VSync (D3DPRESENT_INTERVAL_IMMEDIATE), it's fine. With VSync (D3DPRESENT_INTERVAL_ONE), it stays level for around 5 seconds and then gradually drops to roughly 1/3rd of its original value. All movements slow down as well.   I've tried commenting out the physics call, updating tickFreq every Update(), but nothing works. FramePass() is executed at stable intervals, I've checked. What in the world could I be missing? (Also, feel free to point out if my concept is a waste of time.)