• 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.
  • entries
    625
  • comments
    1446
  • views
    1006476

Gives us the happy juice!

Sign in to follow this  
Followers 0
ApochPiQ

266 views

I'm officially addicted to this.


Today I've moved up from a single quad to a vertex buffer and index buffer, generating a flat mesh of several quads. The idea is to eventually turn this into a heightmapping system of sorts. Step one of course is to actually generate the mesh data.

I got the mesh generation working pretty quickly with the help of some Google and a little elbow-grease. I think that having a fairly comprehensive amount of experience thinking in 3D coordinate systems (from the Freon project) is making this a lot easier to go through. Despite the fact that I've barely touched polygon rasterization engines since I wrote my own software rasterizer 6 years ago, a lot of things are familiar and make a lot of sense.

The main thing I'm having trouble wrapping my head around at the moment is how I'm going to structure the code so that I can acheive optimal batching to the video hardware. I'm aware of all the tricks like texture baking (so multiple surfaces can be textured with a single SetTexture() call) and all that, but I've yet to really grok how to make my code do all this elegantly. This is of course made slightly more complex by the fact that I'm trying to learn C#'s design paradigms at the same time.

Once that's all sorted in my brain, I still have to find out how programmable shaders fit into all this mess. Incidentally, if anyone knows of a good online site that explains how all the modern pipeline stuff works at a reasonably abstract level, I'd much appreciate a link.

Needless to say, I'm finding all of this ridiculously fun [grin]


Anyways, once I got the mesh generated, I wanted to confirm that it was working. A little bit of Google turned up the ever-handy FillMode flag, so I swapped the renderer over to wireframe mode. That, however, renders the edges of each polygon textured, which I wasn't wanting - I wanted to see nice white lines. So a little bit of playing around with IntelliSense turned up the appropriate flags, and I figured out how to render solid white wireframe overlays on top of the actual textured surface.

The actual technique is pretty stupid, as it basically brute-force renders the entire scene twice, but IMHO it's not bad for a DX newbie [grin]

I absolutely love Managed DirectX, though. The code boils down to basically this:

dev.RenderState.FillMode = FillMode.Solid;
dev.TextureState[0].ColorOperation = TextureOperation.SelectArg1;
dev.TextureState[0].ColorArgument1 = TextureArgument.TextureColor;
geo.Render();

dev.RenderState.FillMode = FillMode.WireFrame;
dev.TextureState[0].ColorOperation = TextureOperation.SelectArg1;
dev.TextureState[0].ColorArgument1 = TextureArgument.Constant;
dev.TextureState[0].ConstantColorValue = 0xffffff;
geo.Render();


So much more readable and sensible than the C++ bindings. It's borderline orgasmic. Anyways, here's the rendered result:

Spicy.


So far it's just a blob of polygons on a flat plane; my next project is to build in proper world and camera transforms so I can look at this from a more isometric-style angle and show the effects of the heightfield. Woot.

0
Sign in to follow this  
Followers 0


2 Comments


Nice, thanks.

That prompted me to surf around a bit more, at which point I discovered that I suck [grin]

0

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now