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

clashie

Members
  • Content count

    111
  • Joined

  • Last visited

Community Reputation

632 Good

About clashie

  • Rank
    Member
  1. DX11

      Yes, my font is just packed into a texture. I wrote a tool that generates bitmap fonts and it also creates the glyph data I need alongside the actual texture.   So when I pass a character, it's indexes to an array with information for drawing it so I have the character's bounds, texture coordinates and whatever else I needed.
  2. DX11

    I just do the naive thing with 2D and it seems quite fast. Even on older hardware I could throw tens of thousands of them around like it was nothing.   I pre-fill a static 16 bit index buffer and create a dynamic vertex buffer for my sprites. I create the sprite geometry each frame and do some basic sorting and batching. It's pretty easy to batch large amounts of the sprites into a single draw call. Buffers for it are created once up front and destroyed only at the end.   Since the index buffer was 16 bit, I capped the number of sprites at 10922 per draw call.   (10922 * 4) * sizeof(Vertex2D)... which was 32. So 1398016 bytes for the vertex buffer. About 1.4mb.
  3. OpenGL

      The drivers at release were indeed broken. It's since been fixed, so redownload them.
  4. OpenGL

      You and me both. And what looks like others, according to google.   AMD goof?
  5. I dunno if it's optimal how I have my stuff set up, but I have a simple sprite batching class that I use to draw quads with. I don't really do anything special at all.   SpriteBatch manages the state, etc. It's really dead simple and really doesn't do that much work internally. Just tracking a few things, starting a new batch, finally issuing the draw call, etc. I pre-fill the index buffer and cap how large batches can get. Adding a sprite to the batch just needs a Rect for the position and another for the texture coordinates.   A batch is a simple struct like this struct Batch { Vertex2D* verts; Texture* texture; u32 numSprites; u32 numVerts; u32 numIndicies; };  Then keep a vector of them. Batches hang around until you explicitly purge them, so once you add a bunch of quads, you don't need to re-add them and the only thing that needs to happen is the draw call (and prior memcpy() to push whatever batch verts to the underlying vertex buffer).   It's not fancy or super robust, but I don't see why I couldn't draw an entire UI with just one or two draw calls. Drawing thousands of textured quads costs practically nothing, and my framerate is still well into the thousands. What's GWEN doing that's taking so long?
  6. If you trip the thermal limit, the machine will just likely shut off instantly before the part is damaged. It's also not unusual for the driver to crash if the hardware is extremely hot.   When my GTX 260's fan died, I was pushing nearly 110c with even the most minor activity. The driver would crash continually and if it kept climbing, poof, computer would just turn off. The metal backing was actually so hot that I probably could of burned myself on it. Check your temperatures!
  7. The actual logic behind a console system isn't too hard to put together, I have a simple Cvar class which uses template specializations for the argument types I support (float, int, string, and nothing) so when you create a Cvar object, it sets an internal flag accordingly for the type you tried to give it so it knows how to act on it later. It uses a FastDelegate internally for the function pointer stuff.   Then I just dump them into a map<string, Cvar> for the lookup. The Console class has an exec() function which just takes a string -- if there's 2 parts to it (like "test 500") then I split that into to name and argument, use the name for the lookup, and 500 is converted and handled accordingly. It's not really robust, but it's really tiny and simple, I think the whole thing is like around 150 lines.
  8. DX11

    Seems kind of weird that they just leave things off their list, but whatever, I guess it doesn't really matter. Now that things are working, I made it into a starfield. Pretty neat how I can just draw the whole thing in one call, and they can all be uniquely scaled, rotated, etc. https://dl.dropbox.com/u/10565193/d/starfield.png edit: Also solving things shortly after I post seems to be a trend of mine. I'm apparently incapable of working things out before I get annoyed and go to ask for help.
  9. DX11

    Actually I'm retarded and solved that. I done goofed somewhere and I wasn't giving CreateInputLayout() the right number. I have pretty triangles spread about again. Still curious as to why the MSDN list of semantics is apparently incomplete, and if I should be trying to pad stuff out to a certain size.
  10. DX11

    Which is one of the problems, why doesn't MSDN have the complete list of these things? It doesn't even mention that WORLDVIEW exists. :/ Ok, before I just used a single vector for my instance position, but I want to be able to rotate, scale, etc, so I figured I'd just make use a matrix instead. So before, I just did something like this:layout[2].SemanticName = "TEXCOORD"; layout[2].SemanticIndex = 0; layout[2].Format = DXGI_FORMAT_R32G32B32A32_FLOAT; layout[2].InputSlot = 1; layout[2].AlignedByteOffset = 0; layout[2].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA; layout[2].InstanceDataStepRate = 1; ... VOut vs(float4 pos : POSITION, float4 col : COLOR, float4 ins : TEXCOORD0) { VOut output; pos.x += ins.x; pos.y += ins.y; ... Ok, bam, works. But I'm not sure what I'm doing wrong here trying to access my matrix. I changed my input layout to this:layout[2].SemanticName = "TEXCOORD"; layout[2].SemanticIndex = 0; layout[2].Format = DXGI_FORMAT_R32G32B32A32_FLOAT; layout[2].InputSlot = 1; layout[2].AlignedByteOffset = 0; layout[2].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA; layout[2].InstanceDataStepRate = 1; layout[3].SemanticName = "TEXCOORD"; layout[3].SemanticIndex = 1; layout[3].Format = DXGI_FORMAT_R32G32B32A32_FLOAT; layout[3].InputSlot = 1; layout[3].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT; layout[3].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA; layout[3].InstanceDataStepRate = 1; layout[4].SemanticName = "TEXCOORD"; layout[4].SemanticIndex = 2; layout[4].Format = DXGI_FORMAT_R32G32B32A32_FLOAT; layout[4].InputSlot = 1; layout[4].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT; layout[4].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA; layout[4].InstanceDataStepRate = 1; layout[5].SemanticName = "TEXCOORD"; layout[5].SemanticIndex = 3; layout[5].Format = DXGI_FORMAT_R32G32B32A32_FLOAT; layout[5].InputSlot = 1; layout[5].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT; layout[5].InputSlotClass = D3D11_INPUT_PER_INSTANCE_DATA; layout[5].InstanceDataStepRate = 1; ... The post I linked makes it look like I can just do something like this: VOut vs(float4 pos : POSITION, float4 col : COLOR, float4x4 ins : TEXCOORD) { VOut output; pos = mul(pos, ins); ... The shader seems to compile fine, but the runtime immediately complains that:D3D11: ERROR: ID3D11Device::CreateInputLayout: The provided input signature expects to read an element with SemanticName/Index: 'TEXCOORD'/1, but the declaration doesn't provide a matching name. [ STATE_CREATION ERROR #163: CREATEINPUTLAYOUT_MISSINGELEMENT ] On creation of the input layout.
  11. I want to use a matrix for my instance position and stuff instead of just a vector, but I don't see a semantic for anything more than float4. I'm using a second vertex buffer for my instance data. Looking here, I see nothing for a matrix / float4x4. http://msdn.microsoft.com/en-us/library/windows/desktop/bb509647 This, however, makes it look like I can do it, but I have to have 4 seperate parts for the input layout, then I can just simply use it as a float4x4 in the shader? Is that right? http://www.gamedev.net/topic/608857-dx11-how-to-transfer-matrix-to-vs/ But what is WORLDVIEW? Why isn't it on the MSDN list? Also, should I be striving to pad my structures out to a specific size?
  12. Make sure that you're definitely ending up picking the 10 feature level. You'll also need to change the shader profile argument for D3DX11CompileFromFile. It's probably "ps_5_0" / "vs_5_0" right now. Change it accordingly -- on your card you'd need to use 4 instead.
  13. It's probably just drawing straight to the window itself, not a specific control. If you're in need of a framebuffer to just dump pixels to, the simplest way on Windows is probably a DIB Section. It's just a few lines to init and you'll just get a pointer directly to the data, BitBlt() to the screen when you're done.
  14. Why not just mod Skyrim? The base is there and you have everything you need to make a completely new game. Look at Nehrim for Oblivion. It uses the assets (and I'd assume plenty of their own as well), but it's still an entirely new world in the end.
  15. [url="http://stereopsis.com/doubleblend.html"]I[/url]'ve used this before: [url="http://stereopsis.com/doubleblend.html"]http://stereopsis.com/doubleblend.html[/url] and have another SSE version for images where I can take advantage of operating on multiple pixels at the same time. Also why are you using VB6? It's dead.