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

DevLiquidKnight

2D With direct3d...

4 posts in this topic

I was wondering... I made a small engine that is purely 3D but sense calculation collisons tends to be a pain in 3D, I was wondering if anyone had some good resources (links) on using direct3D to create 2D based applications. Im kinda familiar with the Direct3D stuff now and was hoping to make a tile based 2D engine using direct3d. I reverted my game engine that I had in 3D and tried to make it so it loads a 256x256x5 tile map 5 being used as depth to have like.. cliffs and stuff , I am trying to come up with how to make the tile-based concept work with direct3d. Ive done it in DirectDraw awhiel back it wasn't to complicated but I've found its a bit differnt when using direct3d and was hoping anyone had some links of information and stuff besides gamedev.net on this concept. Main problem im kinda having is using the vertex buffers, I've used them before to make like particle systems but I'd like to find how to correctly use them with a tile based game in direct3d? If anyone has any information on that.. Im assuming its the same, however I have also read about index buffers and I have no clue how those work... But would you be rendering to the view matrix or no? stuff like this im confused with... if anyone has any information it would be greatly appreicated! [edited by - DevLiquidKnight on February 24, 2004 4:37:11 PM]
0

Share this post


Link to post
Share on other sites
You can find help here under "DirectX"

edit: couldn't get the link thing working so I'll just spell it out.

http://www.gamedev.net/reference/list.asp?categoryid=24

Basic idea is to form a "quad" (i.e. two triangles) and texture it.

I've heard you can also use D3DXSprite but haven't seen a good tutorial on that (I don't know why, maybe someone else can answer that?)

[edited by - TreborZehn on February 24, 2004 5:53:06 PM]

[edited by - TreborZehn on February 24, 2004 5:54:09 PM]
0

Share this post


Link to post
Share on other sites
D3DXSprite is actually pretty easy:

D3DDevice is an initialized D3D device object.
TestTexture is an initialized texture object.
TestRect is a RECT that contains the source coordinates for D3DXSprite to draw.

To initialize:

LPD3DXSPRITE MainSprite;

D3DXCreateSprite( D3DDevice, &MainSprite );

And then, to draw:

MainSprite->Begin();

MainSprite->Draw( TestTexture (texture), &TestRect (source RECT), &D3DXVECTOR2( scalex, scaley ) (scale), NULL (rotation center (D3DXVECTOR2)), 0.0 (rotation amount), &D3DXVECTOR2( posx, posy ) (position), D3DCOLOR_RGBA( r, g, b, a ) (color) );

MainSprite->End();
0

Share this post


Link to post
Share on other sites
Intresting never heard about d3dxsprites.... What type of things do they do and exaclty what are they used for? Just 2D stuff? or what eaxctly? can u do like animation sequences and stuff with them for 2D Direct3D stuff?

[edited by - DevLiquidKnight on February 24, 2004 7:02:25 PM]
0

Share this post


Link to post
Share on other sites
Well, I'm sort of at the same stage of learning as you and I made a list of links for my brother to read over that might help you too.

I've number them in the order I think I'd read them. Alot are numbered the same since they are kind of the same level, but just tell different ways of doing stuff. #2 is a very good article I think (though it starts with the complete basics).

(3) 2D Programming in a 3D World: Developing a 2D Game Engine Using DirectX 8 Direct3D
This shows how to use the ID3DXSprite interface in DX 8 and good explanation of how things have changed for 2D programmers after DX 8. However, it's probably more useful for those who either never want to use 3D or who are used to the old way.

(5) Direct3D8 Sprite Wrapper
It has white text on white background so you have to select everything to see it. This is similar to the previous one and is a wrapper for Direct3D8 to act like DirectDraw7 but still using ID3DXSprite.

(5) Dissecting Sprites in Direct3D
This is another sort of wrapper I think, but doesn't use ID3DXSprite. I think it instead sort of rewrites it. (I haven't read it yet.)

(5) Using Direct3D For 2D Tile Rendering
This one actually seems to use Direct3D, but is based on DX7. It focuses on tile-based isometric rendering, which may be what we want. (I haven't read it yet.)

(5) Introduction To Isometric Engines
Another Isometric article which may be useful for us. It is at more of a higher level and doesn't get into any of the details of which API to use. (I haven't read it yet.)

(5) Isometric Engines: Are they for you?
Looks nice. More articles on the main site too, though they're all fairly old. (I haven't read it yet.)

(5) More tile-based and Isometric articles
(I haven't read it yet.)

(5) 2D Rendering in DirectX 8
This shows how to use the real D3D interface (same as you would use for 3D) to do 2D graphics. (I haven't read it yet.)

(5) 2D in Direct3D using Textured Quads
This also shows how to use the real D3D interface (same as you would use for 3D) to do 2D graphics (written for DX 9). (I haven't read it yet.)

(4) DirectX 8 Graphics and Video: A Fresh Start
This looks like good background on how DX 8 is organized and how to work with it. (I haven't read it yet.)

(4) Starting Direct3D9: Setting Up a Window
This covers the basics of getting started in DirectX programming for DX9. (I haven't read it yet.)

(4) DirectX-tasy
This is sort of the history of DX and more on how it's organized, and it might be good for understanding DX in general. It's by LaMothe, but it's old (DX 5). (I haven't read it yet.)

(6) A DirectX Game: Tetris
A complete example with some explanations for making a 2D DX 8 game. It uses a wrapper to the DirectDraw7 interface though, but still may be useful to see how they organize things. (I haven't read it yet.)

(2) Game Programming Genesis series (parts 1-10)
This looks like a good (thorough) discussion of game design. It may help with figuring out how to organize a graphics manager. Some of the details (like DirectDraw) we can probably just skim over, but I'm pretty sure the general discussions are still applicable. (I haven't read it yet.)

(1) Striving For Graphics API Independence (parts 1-4)
This looks like it might be a good option for how to do a GM. He mentions using the COM interface as another option (which some of the DX overview articles above talk about (and I know MSDN does to). So this and COM stuff are probably what we need to read for figuring out how to organize the GM. Although, there may be other options out there too. (I haven't read it yet.)

(6) Magmai Kai Holmlor's Krude ATL COM tutorial
Not sure, but it's an alterative to the "Striving For Graphics API Independence" method. (I haven't read it yet.)

(6) XEngine - The Platform- and API-Independent 3D Engine
An Open-source engine. There are docs and code which might be a good example for us, but it is 3D.

Some links to people asking questions we're interested in:
clicky
clicky
clicky
clicky
clicky
clicky
clicky
clicky
clicky
Not all of these are great (but some are!). They generally have good, related discussions I think, though.

Edit: fixed links
Tadd
- WarbleWare

[edited by - reana1 on February 24, 2004 8:33:39 PM]
0

Share this post


Link to post
Share on other sites