Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Jim Adams, posted on November 01, 2001

Image Description, by Jim Adams

The image is a screenshot from an engine detailed in the upcoming book 'Programming Role Playing Games with DirectX 8.0' written by myself, Jim Adams. The engine allows 3-D models to move around within a pre-rendered 2-D backdrop (ala Final Fantasy 7-10). The demo (w/full source code) that comes with the book allows the model to walk around, blocked by the various obsticals, as well as walking up and down the stairs. The model, called Yodan, was created and used with permission by Scarecrow and is freely downloadable from (a Half-life model). The book also details how to use Half-Life and other format models in your own game.

Check out the book's web site at for more details and some downloadable demos.

Jim Adams

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
Scott Velasquez

November 01, 2001, 01:50 PM

First up!

Nice image. I won't say anything about the art because obvisiously it's programmer art, which is totally understandable.

My only complaint is that the model doesn't seemed to be effected by light nor does it have shadows which looks weird since everything else does.

What type(s) of animation do you discuss in your book?

I'll check out your demos sometime.


November 01, 2001, 01:52 PM

the model seems like it's 2d, in a 3d world. loose the model, i'd say

Shawn Kirst

November 01, 2001, 01:58 PM

hehe. funny thing is, the background is 2D and the model is 3D.


November 01, 2001, 02:44 PM

I like the shadows and textures in the scene.

Here is thought. Arent it "dangerous" to put somthing like "DirectX 8.0" in the title? I mean, the version number will be cool the first couple of month, but obsolete thereafter. Wouldnt it be better just to call it 'Programming Role Playing Games with DirectX'?

By the way, arent monsters supposed to look scary? This little fellow looks a bit lost in the big dungeon :)

Very nice picture anyway.


November 01, 2001, 02:50 PM

I already have the $50 ready to spend baby!

To the person wondering about the "DirectX 8" title, that's most likely decided by the publisher. And besides, it gives them an excuse to publish a new version when DX is updated.

Robert Bear

November 01, 2001, 02:57 PM

Follow his link and you will quuickly see that "Programming Role Playing Games with DirectX" allready exists.


November 01, 2001, 03:33 PM

Also, every time Microsoft updates Direct3d, they change the whole feel of the API. It may sell more copies in the long run to just put "DirectX" on the cover rather than "DirectX 8" but I applaud the ethics of any writer/publisher that actually does the right thing and quantify which version of DirectX their book deals with.

Good luck with the book Mr. Adams.

Shawn Kirst

November 01, 2001, 04:41 PM

Just out of curiousity, why "Programming Role Playing Games with DirectX 8" and not "Programming Role Playing Games". I mean, you'd have a wider target audiance. Why restrict it to a certain API? I think it wouldn't be hard to abstract it away from the API. Like say for instance, if you were to describe the methods you used to hack the depth buffer to get 3D objects to interact with a 2D background like in the IOTD, i think it'd be trivial to abstract from the API. OpenGL and Direct3D both have depth buffering, as do a lot of software rasterizing libraries. Anyone who knows their API of choice is gonna know how to access the depth buffer and then can apply the methods described, if it's at all possible. Just my opinion, I could wrong. But it's stopped me in the past from buying a few books. "How to write with DirectX|OpenGL". I don't want API. That's why I bought the Red Book. I want the tips, tricks and methods of writing the type of application the book is targeted at. Again, these are just my opinions. I'd be curious to know why the book is "DirectX 8 only".

Jim Adams

November 01, 2001, 04:57 PM

Thanks so far for the comments - now some responses.

The book must include DirectX 8.0 per publisher and new Microsoft publishing guidelines.

The series of books was targeted at API's, and my book happended to be targeted at the new DirectX (due to a large part being the ease of use of the API). But - I wrote the code to be non-API driven to a part. The IOTD same shown here for example can be adjusted to work with OpenGL with little work - the demo used a custom wrapper class for everything - just change the wrapper code and all example will work.

As for the graphics - yep, just programmers art! The engine purposely did not use lighting as the printed screenshots would look bad. The engine allows you to add those lights however within like a minute. The model was grabbed from, Scarecrow was pretty much the only one that would give free permission to use it.

Jim Adams


November 01, 2001, 05:17 PM

Hey Jim-- I'm writing a book for the same series at the moment... Lamothe specifically mentions in the New Author guidelines that DirectX version numbers are supposed to be left out of the titles. But then, the Isometric book w/ DX7.0 does the same thing. Has he mentioned anything about that to you?

Nice screenie, btw. A lot better than what you usually find in these kidns of books, heh.



November 01, 2001, 05:43 PM

Interesting stuff, i like very much the fire effects.
You could now implement lighting and shadowing for the model !



November 02, 2001, 01:24 AM

I don't believe they will re-write the D3D API for DirectX 9. The majority will be kept. Microsoft have a lot hanging on DX8 (XBox being one of them) and I don't think they want to introduce radical changes when they release DX 9. Also, from diccussions I had with a microsoft directx guy last year they pointed at DirectX 9 not being all that much of a change from DirectX 8.
On the other hand, you could just make the book focus on OpenGL instead of DirectX :O) That won't change quickly...... I really hope 3Dlabs OpenGL 2 proposal gets accepted and implemented......


Timothy Barnes

November 02, 2001, 02:38 AM

I like it. The image sure fooled me. I always wanted to try this, but it made my head hurt thinking about it so I made a 3D engine instead. It's nice to know that square isn't the only one doing this.


November 02, 2001, 02:59 AM

heheh I like how you do not only have 1 xenon studio, you have many more! i myself would accept 1 well-equipped studio. not a studio like an apartment. a studio like a batcave.

Andreas Magnusson

November 02, 2001, 04:23 AM

Have you made a custom program that renders the backdrops (and saves the zbuffer) or do you have a tool to create the zbuffer?
Btw, the texture on the arc seems a bit warped...otherwise nice image and good luck with your book.


November 02, 2001, 04:30 AM

Heh yeah... I prefer my studios in plural form. :D


November 02, 2001, 04:40 AM

The background being pre-rendered 2D, are the fires animated?

And like some people have said, the model should cast a shadow on the floor. But I guess it's OK, as this is just a demonstration of the techniques to draw 3D models on 2D background.

- Jussi


November 02, 2001, 07:00 AM

"The book also details how to use Half-Life and other format models"

This book is about RPG's so why on earth do you want to read about loading up some file format? That is trivial and I hate to see things like this in books. It's something the reader can find a wealth of information on the internet.


November 02, 2001, 07:35 AM

I have been waiting the the release of this book for what seems like ages.
Yesterday I went to the web site and look at the demos and screenshots. Now I really am looking forward to the release.

"This book is about RPG's so why on earth do you want to read about loading up some file format? That is trivial and I hate to see things like this in books. It's something the reader can find a wealth of information on the internet. "

No way. This is always an interesting subjects,
This book sounds almost perfect.

I am currently writing an RPG and so the book will be an interesting read.


November 02, 2001, 07:52 AM

"This book is about RPG's so why on earth do you want to read about loading up some file format? That is trivial and I hate to see things like this in books. It's something the reader can find a wealth of information on the internet. "

If you hate it, dont buy the book. If you hate it, write your own book. GPG had lots of info on rendering techniques. This isn't specifically for games.

So, unless you have something constructive to say, keep your opinions to yourself, until you do something better.



November 02, 2001, 09:03 AM

I like it...
This prerendered backgroud looks great for programmers-art! (I can not do that myself, so I think it is good)

TheChicken: I my opinion, a book that is aimed to tell you how to render the background and models on it, should also tell you how to load these models... (Just my thought)


November 02, 2001, 09:24 AM

I was under the impression that DX9 was supposed to "reintroduce" DirectDraw in a D3D optimized fashion?

Jim Adams

November 02, 2001, 09:50 AM

Thanks again everybody. To iterate on what I said about the models - the part about detailed model converting was cut yesterday (not enough time to finish it, it was actually too close to being a tutorial on using Milkshape 3-D) :(

Although, the book does detail how to load the models still (from the .X format) and render them, as well as hinting towards using Milkshape 3-D to export models using my custom .X file exporter.

As for the scenes, no I don't have them animated - I just wanted to show people the basics of the technique. Adding animated scene would be pretty easy to do.

Thanks for the responses!

Jim Adams


November 02, 2001, 12:08 PM

"The image is a screenshot from an engine detailed in the upcoming book 'Programming Role Playing Games with DirectX 8.0' *** written by myself, Jim Adams. ***"

I'd expect an author not to make such a crass grammatical error.


November 02, 2001, 12:18 PM

That's what copy editors are for. :D

Dan MacDonald

November 02, 2001, 03:06 PM

Well i expect that you probably couldn't code to save your life.(or write a book for that matter) But the real question is, Does anyone care?

Answer: No.

No one cares about your expectations of other people perfomance so why dont you just keep it to yourself.

Have a nice day.


November 02, 2001, 11:18 PM

Hmm, I wonder why you would be so offended by grammatical nitpicking...

What grade are you in (note: anything above junior high will not be believed, so keep your lie reasonable)? Proper syntax and precision are important when programming. Your post gives you no credibility when attacking someone's coding ability.

Dan MacDonald

November 04, 2001, 10:33 PM

Hey man dont take it personal, I have no clue how well you code. My point was to show you how irrelevant and superflous a strangers estimationcritisism of your performance is.


November 05, 2001, 08:00 AM

blah blah blah
If anyone is like me they value every type of opinion, good, bad, constructive or not. You can ignore it, you can respond to it but telling me to keep them to myself because you don't agree is rather lame. Grow up :)

Now look what you've done. You've made me write a message totally off-topic. Its your sort that destroy newsgroups :-)

Dan Brown

November 05, 2001, 01:23 PM

DirectX (version 8 at least) may not have to let you have access to the depth buffer data at all depending on the hardware/drivers.

I haven't tried it in my engine yet, but my idea is to write a script for the renderer (max, lightwave, etc) to render individual objects (columns, tables, plants, ...)with a bright background, like green/blue screens in movies. These objects would then be overlaid on the background like sprites, but with a more representative depth. Large objects would be split into tiles for a better representation. I'm hoping this will give an acceptable result.

Another option would be to render the room in slices along the z-axis (by setting the near/far range), also with the bright background. Any geometry drawn would be extracted to rectangle sprites and the depth of the slice stored. This would give more quads to draw for the background though, but may give a better result. Any animated parts, like the flames in the IOTD can be put in as seperate sprites and done with little extra cost, except the memory required for them.

The technique I use now is to render a low-res version of the room geometry, and keep thing you can walk in front of to flat edged objects like boxes/tables. This works fine for now, but won't help when I get around to putting in a plant or something round near the front of the scene. The bonus though is that I use the low-res version for collision detection/response anyway, so it isn't any extra to create.


This thread contains 31 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.