• 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

123 Neutral

About simon_brown75

  • Rank

Personal Information

  1. You wanna have a look at the game Hired Guns by DMA Design.  You should be able to find the PC version floating around somewhere bundled with Dosbox.  I don't know whether you mean block based dungeon crawler, TBH it doesn't really matter, Hired Guns should definitely give you some thematic inspiration.
  2. Thanks very much for the help [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Yes the VBs are WRITEONLY. TBH I should only be rebuilding the VBs when the text on screen changes, but I dunno if it's worth the effort to figure that out since there's greater potential for performance gains elsewhere in the code, and the text does change a lot during gameplay.
  3. Thanks. Well I've ammended the code so I'm now creating all my vertices in 5 vertex arrays (1 for each coloured font I have) in system memory, then once per frame I'm copying all those verts to the corresponding 5 VBs and rendering the fonts. So I now have just 5 lock()s and 5 calls to SetStreamSource/SetTexture/DrawPrimitive per frame. I'm also using DYNAMIC VBs in DEFAULT pool and using LOCK_DISCARD. By doing all this it has just surpassed the old method by about 2%. If you take a look at my options menu above, using the old method of creating, filling, drawing from and destroying a VB for every text entry (there's 28 of them on that screen) I was getting 760 fps and using the new method where I'm not creating or destroying any VBs and just doing 5 locks per frame I'm now getting 780 fps. It's a better piece of code now, and I guess any amount faster is a good thing, but I really expected more than that. Oh well, it's not worth worrying about. The text drawing is only a tiny fraction of the time taken per frame while actual gameplay is happening. Time to move on.
  4. Nevermind, I've just realized I'm being stupid. What I should be doing is appending to my local array of vertices (and not the VB) every time my Text function is called and only copying the whole thing to the VB before my Draw function is called. In fact I could just store the text and it's properties each time Text is called and then build all the vertices in memory at the same time, and then copy them to the VB. uggghh....where's that embarrassed smilie when you need it [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
  5. Well I finally got round to fixing this, by having one big VB for each font (enough for 512 characters), and appending vertices rather than creating and destroying VBs every frame, and to my shock it's actually much slower this way. It seems like locking a specific section of a VB is so slow that it's actually quicker to create a VB and lock the whole thing, than already have a VB and lock a subsection. I'm [i]very[/i] surprised about this. It's quite possible I'm using the wrong flags on either creating or locking my VBs though. I've tried MANAGED and DEFAULT pool, and both DYNAMIC and WRITEONLY usage, but every combination was still a lot slower than the old method. I didn't try any of the lock flags yet though, I dunno if any of them are applicable TBH. Anyone know what's going on? Thanks.
  6. Thanks guys.
  7. Thanks, but I've never used vectors or the STL, so TBH I don't really know what that means. I was just wondering if there was a way to do it in the c++ lanaguage. Of course I can just make a member function do the same thing (and I've already implemented it like that), but I like elegant solutions, and the thought occured to me that it was odd that you don't seem to be able to pass a value to a constructor if you are creating a dynamic array of those objects, since there doesn't seem to be any syntax for doing that.
  8. Hi, Simple question - is it possible to create a dynamic array of objects while passing a (different) value the constructor of each of those objects? Thanks, Simon.
  9. I do understand that you can draw a subset of the verts in a VB but I thought it would get messy with multiple fonts (i.e. textures) and needing to sort by texture, but I can just have 1 VB for each font. TBH I'm never going to have more than a few hundred characters on screen so the size of the VBs shouldn't be a problem. I did kinda forget you can append verts to a VB though. FWIW the framerate hit is smaller than I realized, I'm dropping from 260 to 250 fps during the most demanding part of a level. The drop is numerically higher during less demanding sections, but it's also less relevant there. I do need to figure out why my mesh background tiling system is dropping me from about 800 to 250 fps though :s Anyway, I'll get my font class fixed tomorrow, thanks for the help guys.
  10. Thanks. Basically I want to be able to display text on screen, for stuff like my options menu, the shop menu (as shown above), maybe some dialogue etc. Obviously the text can change often, so the number of characters drawn per frame changes, so the size of the VB changes. I guess I could just have a VB big enough for say 512 characters and just draw however many polys for the numbers of characters I need to render, but that seems messy to me. The way I have it setup, I can just call one function from anywhere in my code (as long as it's between BeginScene and EndScene)- void CFont::Text ( char* text, int length, int FontIndex, float x, float y, float size ) for every line of text and the function handles everything, creating the VB, building the polys for the text (obviously I'm using texture coords to select the appropirate character from a font texture), copying those polys to the VB, drawing the text and then destroying the local vertex array and VB, and it does all that every frame, for every line of text. It seems like a really clean solution, and it was quick and easy to program, but it is slow, but then again if it's for the menus that doesn't matter, so it depends how much I need to use it during actual gameplay.
  11. Well, to answer my own question, yes you can create VBs between BeginScene and EndScene, and yes it's fairly slow, but I can probably live with it. Creating and destroying 5 VB is costing my about 50 fps (300 down to 250) but that includes building some vertices and then copying them to the VBs. If anyone is curious it's for a text display system for my scrolling space shooter game.
  12. Hi, just a couple of really quick questions - Can you create a vertex buffer between calls to BeginScene and EndScene? (directx9) And Is creating and destroying Vertex Buffers every game loop likely to be too slow to maintain a good framerate, even in a fairly simple game? Many thanks, Simon.
  13. Thank you, that explains some very rare oddness in my game, and how to fix it. Cheers.
  14. Hi, just a quick question. Am I right in thinking that rounding is always done down in integer math in C++, and therefore the following line- [code]int ExplosionType = rand () / ( RAND_MAX / 3 );[/code] would give equal occurances of 0, 1 and 2 with a very rare (1 in 32767) chance of a 3. (Compiler is VC++ 2010 Express if that's important) Thanks, Simon.
  15. Thank you very much. SendDlgItemMessageA solved the problem [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] My Win32 skills are 10+ years out of date it seems.