Website may be up and down over next few months. I'm currently doing a complete overhaul of everything. Going back to simple individual .htm pages, new overall site theme, sanitizing and cleaning up html of all pages and blog posts, attempting to implement a new tooling and publishing system etc etc.

I am currently tinkering with a Map Editor for a game engine I am in the process of making. I should also say that I may stop working on the map editor and focus on creating a MAXScript export script for gMAX/3DS MAX. That way I will not have to create a map editor and focus just on the engine itself. I am still trying to decide on this.

To the gamer, the Game engine will appear to be a 2D tile based game engine, but in fact it will be a full 3D engine, that uses a OrthoOffCenterLH projection matrix to render geometry on the screen in a 2D manner. The geometry itself consists of untransformed and lit 3D geometry, So that the video card handles all of the transofrmations etc.

I have written a sample demo of a map editor that demonstrates creating a simulated tile environment using untransformed and lit 3D geometry. NOTE: That this LEDemo app is a compleatly separate app I made just a few minutes ago, so that I could visually play around with the basic principles of map making using 3D geometry to simulate 2D. And to give me insite as to how the actual map editor will operate when it is finished being written.

This demo also gets back the the reason(s) That I no longer suggest people use the Direct3D.Sprite class to draw 2D images on screen, but rather to use 3D untransformed geometry and render it using a OrthoOffCenterLH projection matrix.

The benifits of using OrthoOffCenterLH projection matrix and 3D untransformed geometry ...

A much more powerfull alternative where as the Direct3D.Sprite class calls upon the cpu to do the rotation and translation math and using 3D untransformed geometry you can push the rotation, translation, and scaling work load off onto the video card.

Greater oportunity to use one type of unified Vertex format throught your entire game engine.

Ability to use/apply vertex and pixel shaders to the geometry. (Vertex shaders do not work with the Direct3D.Sprite class)

Because the simulated 2D objects are actually 3D you have the ability to do deformations, and stretching effects to your geometry in ways that would be difficult or impossible to do using regular 2D.

Saves you from having to create, manage and draw series of textures for your animations and Allow you to replace them with 3D alternatives that are more flexible and dynamic.

For tile based engines, using 3D allows you to have 2 triangles representing a rectangle. Which means you dont have to store and render data for 100 tiles for example, but rather you would only need to render 2 triangles that have the tile texture texture mapped across them.


If you watch the demo and run the app you will get a better idea of what I am trying to describe.

LEDemo (Geocities mirror site)
LEDemo (Geocities mirror site 2)
LEDemo At Planet Source Code)
The LEDemo.zip file includes the fallowing ...

VB.NET 2002 source code
Demonstration video
compiled executable
3 images
the camstudio codec needed to view video

Some more benefits of using 3D to simulate 2D ...


  • Ability to do zooming, panning, and scaling, quick and easy just by manipulating a matrix.
  • You can still use the same code logic for determining what tiles are visible, and where they are located on screen.
  • Allows you to have multi textured tiles.
  • You can use 3D geometry and render over top of an area to simulate lighting effects or even shadow effects.
  • Because the game uses 3D to render 2D tiles you will already be prepared to add and incorporate more 3D oriented features to the game engine in the future.
  • You could use a 3D mesh of a rotating diamond rather then having a texture or series of textures of a diamond rotating.
  • Allows you to use professional apps like gMAX or 3DS Max for creating your game levels and characters etc. Saving you from having to create your own and
    all the problems/hard work that goes with it.
  • Allows you to have multi textured tiles.
  • Allows you to do multi layered platform games like this...

    rise_of_the_mushroom_kingdom.html

    Pay attention to the scene at the beginning when Mario comes out of the castle and starts doing exercises, then jumps into the pipe to the left of the scene. (The next sequence is what I am talking about when I say people should consider using 3D geometry to simulate 2D tiles games.) The camera then zooms back and starts to show another layer with 2 pipes on it then zooms back even more and you see a whole new layer that Mario begins to run around on.

You would be somewhat hard pressed to implement these type of game features using a traditional 2D base tile engine.


I wrote the sample project because I was curious as to what the speed difference was between the methods I had made myself that converted milliseconds->ticks and ticks->milliseconds and using the types provided in the .NET framework to convert time. Turns out .NET Framework types/methods are 5 times slower then doing it manually.

You can find the "TimeConvert" source code here Code Snips


I noticed IE is blocking cookies on my site and am notifying you that I don't have anything on this site that should generate a cookie. Which means brinkster (my web host provider) is trying to dump the cookie on your machine. Please block any cookies you may be recieving from my site. Brinkster is probably trying to track your surfing habbits. I am going to have to have a talk to them about that.

Also I have updated my Current Efforts and Quick Tips pages.


I came across this kinda stupid quark about VB.NET and varible declorations after doing some code conversions from c# to vb.net.

ConvertCSharp2VB

If you try to declare 2 varibles on the same line and set there initial value like so you get the fallowing design time error...
Explicit initialization is not permitted with multiple variables declared with a single type specifier.

Dim a, b As Integer = 0

Strangly if you declare the varibles like so ...

Dim a As Integer, b As Integer = 0

... You no longer get the error?

I could understand this error if variants were still apart of vb.net. For example ...

Dim a, b As Integer = 0

... Would result in 'a' being a variant and 'b' being an integer. But there are no variants in vb.net. I'm guessing it's a feature the MS team has not discovered or have got around to implementing yet. BTW, I am using vs.net 2002 so this varible decloration quark may have been fixed in laters version of vs.net.


Microsoft Gives some insite...

Published 4/20/2004 by createdbyx in News

In my April 8, 2004 blog I wrote a small doc regarding how to go about Solving the DriverInternalErrorException Exception that gets raised under cirtian circumstances when rendering in windowed mode. This is the responce microsft sent me ...


The following was received from the Managed DirectX development team:

No, it's not really valid, and no I don't believe we should create a bug for the issue.

Before the device automatically resets the backbuffer it raises an event (DeviceResizing), that allows you to cancel this behavior. It is up to the application to determine whether they want to allow the resize or not, not MDX..



You can read the original doc as well as microsofts responce here DX Resize


Funny Spouce Beating

Published 4/12/2004 by createdbyx in News

I have posted a page containing a reply I made to a disscission fourm about opposite sex relations, ...

Spouce Beating


I have written a short doc describing why I think DX raises an DriverInternalErrorException exception when rendering in windowed mode. As well as the solution to solving it.

DX Resize


I am currently starting work on a simple zip utility similar to winzip and winace. Finnaly there is a free zip library that is easy to use and free! Check out the #ZipLib at ...

http://www.icsharpcode.com/


28 Flash cartoon shorts.

Published 3/27/2004 by createdbyx in News

Some well done, 28 Flash cartoon shorts for your entertainment.

Foamy cartoons


MS is holding a tech chat for VB.NET and D3D! on march 30th. Here are the details ...

Do you have questions about how to best use Visual Basic .NET to program DirectX 9.0 graphics? Are you unsure when to use a particular Direct3D feature? Join members of the Visual Basic and Windows Graphics & Gaming Technologies teams and discuss how to leverage the power of DirectX 9.0 from Visual Basic.

Here is the link...
http://msdn.microsoft.com/chats/#vs_dirx0330


Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume