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

Archived

This topic is now archived and is closed to further replies.

Spiff

Direct3D Lightning on DDraw Surfaces

9 posts in this topic

You can't use Direct3D lighting for this.

The Direct3D lighting module lights vertices. These lit vertices are then sent to the rasterizer. It does _not_ generate shadow-map textures that are then applied across triangles.

You could use D3D lighting if you were to implement your tiles as 3D quads, but this would probably require you to revamp your entire system.

Also, Direct3D lighting (or to be more correct, the Lambertian Light Model with Gouraud shading) is unsatisfactory in most situations.

Generating the shadow-maps yourself may be the best option.

0

Share this post


Link to post
Share on other sites
Can I use 3D hardware to just lay a surface over a 2D screen and change the level of alpha blending of the one from the front to the back? Blend the background (the tile sets) with the foreground (Dark blue) and change the level of blending?
0

Share this post


Link to post
Share on other sites
That is exactly how you should do it. Direct3D can (and in my opinion should) be used to render 2D tiles and sprites by splitting them into 2 triangles, and using screen coordinates (Transformed and Lit triangles).

You can then create "lightmap" textures and blend do either a multipass or multitexture render to create lights, and other visual effects (fog, etc..)

0

Share this post


Link to post
Share on other sites
Funny... I just wrote something similar to that as a test. It really looks very good just with vertex lighting (and is pretty impressively fast, too). What surprised me was how easy it was to do.... with the size of most tiles in isometric/tile-based games, texture sizes are sufficiently small that Direct3D's default texture manager seems to cope pretty well. (I'm getting 60+fps in 800x600x16 in my barely optimized test stuff on my PII-450, TNT2. It runs at a solid 35-40 fps on a PII-233, Voodoo 1.)

Mixing sprites into the rendering loop is proving challenging; I'm relying on an isometric view for hidden-object culling, and since I render my entire landscape in one BeginScene/EndScene pairing, its just not practical to repeatedly lock/unlock and paste sprites. I'm currently going down the road of using a quad (2 triangles) with a sprite on it.... any other ideas?

0

Share this post


Link to post
Share on other sites
What about some billboarding f/x like fog/smoke and fire/flames?

I'd like to see how it turns out, do you mind sending me the .exe? (since I'm working on a similar thing myself)

0

Share this post


Link to post
Share on other sites
Billboarding effects are something I plan to include, but haven't yet. (I've only been working on this project for about 24 hours!!!). I'm also wondering if I can come up with a procedural texture system (a la Unreal's) for some effects.

The project currently displays an 800x600x16bpp screen covered in identical tiles each of which is independently lit on all 4 vertices.... its an ugly test (except of technology concept), but if you really want it my email address is bracket@unforgettable.com - let me know, and I'll send it to you.

I took a look at the Enhanced2D stuff - it looks very good..... but I'll probably end up using stuff I write; not because Tobias's stuff is bad, but because I feel I learn more by going through it and implementing it myself!

0

Share this post


Link to post
Share on other sites
Is there anyone know how can I use D3D lights in isometric Diablo like scene?
0

Share this post


Link to post
Share on other sites
You could either:
a) Setup the scene in Direct3D and set the camera position to be a relatively typical isometric view. This would let you use Direct3D's lighting and similar. I've never tried this, but I'm pretty sure others have. The upside is that you get perspective correction, and can use 3D models relatively easily (ie. you can render from lots of angles easily, although you have to control your poly count which is what kept me from going down this road - my pet artist isn't into low poly anything!). The downside is that you pretty much need a full-scale 3D engine to do Diablo-like psuedo 3D.

b) Render the game like you would a regular isometric view, calculate the lighting by hand and use DrawPrimitive to render the tiles with either a lightmap or vertex lighting. This is actually a LOT easier than it sounds, and can give really good frame rates. The downside is that you don't get perspective correction, you have to write enough lighting calculation code to figure out how bright each vertex is (actually not that hard, especially if you can include basic lighting information in the map structure rather than calculating at run time). The upside is... its fast, lets you use a lot of Direct3D effects (including lighting that is substantially smoother than that in Diablo 1).

I am in the process of developing an engine (eventually for an RPG, but it could equally well be for an RTS with the frame rates I'm getting!) that uses option b. Email me (my address is bracket@unforgettable.com) if you want me to send you a sample and some basic code examples. (My target machine is a Pentium-II 233 Mhz with a Voodoo 1 (4 Mb) or better, so anything much less than that may look pretty bad/slow.)

[This message has been edited by Bracket (edited November 10, 1999).]

0

Share this post


Link to post
Share on other sites
To add a little more feeling to a tilebased game engine programmed in VB6 and DirectX7 I want to enable lightning of the surfaces to create night/day and shadow fx.

Note: if you don't know VB, just try explaining without code since I don't know much C/C++ (sorry)

0

Share this post


Link to post
Share on other sites