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

Eric F.

Members
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

264 Neutral

About Eric F.

  • Rank
    Member
  1. Many thanks for the link and information. I will read up and do tests on some different machine.   Much appreciated.
  2. I've been reading in a number of articles that using the discard statement in a pixel shader is a bad idea.    My question is this, if I already have an if() statement in my shader, will the addition of discard in the if block cause any slowdown? Or should I just set the alpha of that pixel to zero?   I'm using DX11 for displaying 2D graphics, so I do not do anything fancy and the shader I will be using the discard statement in will only be used to display text in a specific instance. My tests have shown no difference, but I'm afraid I might be missing something.   Thanks!
  3.   Probably you are measuring CPU time (time to prepare your commands). GPU timings are usually measured by GPU profilers such as NSight/DX GPU query/GPUView/..   Doh, very true! I'l give it a looksee.   Thanks guys. I got things working pretty fast now. If this becomes a problem, then I'll investigate.
  4. I just did some tests while I rewrote my text box parsing and rendering. This is on a Lenovo Ideapad Y560 laptop, which has a Radeon HD5730 video card.   Rendering a screen full of text at 1980x1080 (external monitor), 15750 total characters for 63000 vertices, using a single DrawIndexed call, with a simple pixel shader that does transparency.   The time to render the text varies between 2 and 4 microsecond. That is with no instancing and sending all those vertices to the gpu. I only update the buffer if the text changes in some way.   Strangely enough, if I render 200 characters, I get the same timing, 2 to 4 microseconds. This might be an innacuracy of the highperf counter, but I'm not sure. What I know is that its fast enough for my needs.
  5.   Great idea, I'll definitely do that.      Yeah, you're probably right. Besides, rendering the text in a texture would incur the rendering cost of parsing that text only once. It's probably cheaper to then just render the text texture until it's not needed anymore. I'll check that too.   @Ryan_001, thanks a lot for the link to that presentation. I found the video of that presentation on the GDC website: http://www.gdcvault.com/play/1020624/Advanced-Visual-Effects-with-DirectX along with many other great ones too! Very informative.   Thanks guys.     Yeah, you're probably right. Besides, rendering the text in a texture would incur the rendering cost of parsing that text only once. It's probably cheaper to then just render the text texture until it's not needed anymore. I'll check that too.   @Ryan_001, thanks a lot for the link to that presentation. I found the video of that presentation on the GDC website: http://www.gdcvault.com/play/1020624/Advanced-Visual-Effects-with-DirectX along with many other great ones too! Very informative.   In addition to the above advice, you're almost certainly not drawing enough text for it to be a bottleneck worth addressing.   Yeah, you're probably right. Besides, rendering the text in a texture would incur the rendering cost of parsing that text only once. It's probably cheaper to then just render the text texture until it's not needed anymore. I'll check that too.   @Ryan_001, thanks a lot for the link to that presentation. I found the video of that presentation on the GDC website: http://www.gdcvault.com/play/1020624/Advanced-Visual-Effects-with-DirectX along with many other great ones too! Very informative.  
  6. Hey guys,   I have a DX11 text rendering implementation where I have a bitmap with all the character glyphs that I use to build a list of quads with the position and UV of each glyph corresponding to the string I need to print. I then use one call to draw the text into a texture and can draw that texture wherever I need. Simple functions, simple shaders. I can also easily parse for special character, do linefeeds, limit the width for text boxes, change color, etc.   Today I sat down and decided to tackle the long overdue task of converting the rendering to use instancing, but it just hit me that it might not provide the great gains I previously thought it would. Most characters are of different sizes, so I would either have to handle resizing the geometry or maybe update the bitmap and then draw a fixed size quand and then reposition it based on the real width of the character. Or something else. This seems to break the K.I.S.S. principle.   Anyways, in the case where I do not issue more than 1 draw call to render the text, would there be any real benefits of using instancing to render text?   Thanks!
  7. Ah, indeed!   Thanks to you both. "Priority queue" lead me in the right direction and I now have it working. Now to test it and continue on my merry way!   :D
  8. Hi all,   I am currently converting the JPS pathfinding code from C++ to Delphi and the code I'm converting uses the std::heap to manage the open node list.   Now, I never used the heap before and I was wondering what structure in Delphi I could use in its place or if there was a heap class for Delphi anyone had already done.   My knowledge of the STD is kinda abysmal as I usually never need to use it in my daily work, so any help on this would be met with untold gratitudes ;)   Thanks!
  9. Hi all,   I was wondering if it is possible to create a HLSL shader to highlight objects like in baldur's gate or pillar of eternity, ie:     Or if this is done using a semi transparent texture on top of the object.   I'm not an expert with shaders, so I dont know if it is possible to detect edges like that.   Thanks for any help!  
  10. Hey all,   I was wondering if it was better to have my multiple smaller shaders, for example a shader for tiles without lighting, one for self-illumination, another for normal mapping and self-illumination, etc, or if it was fine to hale a larger one using IF/ELSE for different functionality.   I read that conditionals in shaders should be minimized due to their cost, but I wonder if it is better to hahe the IF/ELSE on the CPU side or if a few IFs will keep the shaders fast enough.   I'm only making a 2D tiled game.   Thanks for any input!
  11. After reading the replies, I went back to my code and had a good look over, taking what you guys said. Turns out, I didn't follow proper rasterization rules which was causing all manner of problems in my code.   This bit from MSDN might help someone having the same problem:   "Non-antialiased line rendering rules are exactly the same as those for GDI lines." https://msdn.microsoft.com/en-us/library/windows/desktop/dd145027(v=vs.85).aspx   Thanks!
  12. Hey all.   I read in the MS article about differences between DX 9 and 10/11 that you dont need to add half a pixel when placing your polygons now. I was glad to see this gone, but I am having a super hard time aligning everything properly.   For some background, here is how I define the world, view and projection matrices: (Pardon my use of Delphi ;) ) D3DXMatrixIdentity( World ); D3DXMatrixLookAtLH( View, D3DXVector3.Create(0, 0, -10), D3DXVector3.Create(0, 0, 0), D3DXVector3.Create(0, 1, 0) ); D3DXMatrixOrthoOffCenterLH( Projection, 0, DisplaySize.Width, DisplaySize.Height, 0, 1, 100 ); // updated when display size changes. . All other objects are setup so that I can draw lines using line lists, draw images using quads, etc. Everything works, except that I seem to have some alignment problem.   My problem is as follow. Say for a viewport of 640 x 480 pixels, I need to provide the vertices coordinates 1-based instead of 0-based. As such, if I want to draw a quad that fills the whole viewport, I need to set it from 1, 1 to 640, 480 instead of 0, 0 to 639, 479.   Am I doing something wrong? Do I really have to subtract 1 from every vector I pass to the API?   I dont want to start fiddling with the projection and move it or kludge my renderer with code that might/can/will break on some platform combo.   I could post more code, but I'm not sure what's relevant and after working on this for five+ days, the mapping of the buffer and vertices assignment is pretty straightforward. And I use generic shaders that do not perform any extra processing, based off the Rastertek tutorials.   Any suggestions?   Thanks!
  13. Thanks for the suggestions guys.   I moved my rendering from DX9 to DX11, and oh my, how different it is. As soon as I'm done with the basics I'll get back on track with the lighting and investigate what you guys proposed.   It's taking me several days to put back in what was in D3DX9. I could use like, DirectXTK, but I want to learn and stay lib-free.
  14. Hey all.   I have my own editor (Direct2D) and engine, and its all coming along nicely. I now need to add lighting (and possibly later shadows), and after spending the whole day yesterday and today researching on google and reading articles on Gamedev, I'm 100% confused and unsure on how to proceed. I dont want to start on a path that will lead nowhere or make the engine slow to a crawl because of bad implementation.   My game is tile-based, and I would like to add several lighting effects, such as:   - objects emitting light (candles, torches, camp fires) - global lighting (to have the whole screen appear with a blueish tint, for example) - particles emitting light - a light radius around the player - each light source needs to modulate depending on other light source, if possible.   I read about using alpha bitmaps you draw on top of your objects and such, but I feel that this is an old technique that would be taxing if several "light maps" would be used. It also raises the question of Z-order of the tiles vs player vs lights and shadows, etc.   Then I read about shaders--which I have ZERO experience with--and seem like what I should be using to add lighting to my game.   I would welcome any suggestions, and I am starting the lighting system from scratch so whatever is the current norm is fine with me. I wish to stay with Direct2D if it is an option.   Are shaders the way to go? If so, are there any web/reading material focused on 2D I could read?   Thanks a lot! Sorry if this topic has been covered before, but none of what I found so far was helpful.   PS: As a reference, I am trying to accomplish something similar to how Delver's Drop does lighting to start with:     with a mix of he old Diablo games: