Thread: Back to the drawing board

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607

    Back to the drawing board

    Well as most of you know I've been working on a 2D/3D tile engine in Direct3D. Unfortunately I've learned that there are several issues with my design and structure that are making it more difficult than it should be.

    So much to my chagrin, I'm trashing the code and starting over. However, I probably will keep the sound engine portion so all is not lost.

    The reason for all of this is I came across several articles concerning pixel by pixel scrolling. I already knew how to do it with one tile, but did not put two and two together to get how you do it with a tilemap.

    Well now I finally understand and I've tried it in the old DOS BC45 first. It absolutely flies. The code in DOS outperforms the DirectX which clued me in that using Direct3D for 2D might sound ok, but its really not much of a benefit. It is true you can do lighting rather easily, but its not easy to scroll since you do not control the rendering - only the grid.

    I'm going back to my DirectX module and simply getting two pointers - one to the back buffer(secondary surface) and one to the primary surface. I'm going to blit to the primary surface via assembly language because I've tested it and the assembly is faster than the hardware blitter. Don't ask me how this is possible because I simply dont know.

    I will post the game here as soon as I have a working build. Mind you that with the new algorithm I will probably have to slow it down a bit because the scrolling is so fast.

    Happy coding and thanks to those who helped me with my questions concerning the old engine.



    I'm going to attach a sample of the DOS exe with its test bitmap so that you can see what I'm talking about. This is nothing special, but I'll tell you that if you add a small bit of code to the main loop and tiles and a tilemap - along with code for multiple layers - you could very easily make a game with it.
    Last edited by VirtualAce; 02-29-2004 at 04:56 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Going back....Way back
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 51
    Last Post: 06-05-2008, 10:43 AM
  2. Slow drawing code
    By tjpanda in forum Windows Programming
    Replies: 5
    Last Post: 05-09-2008, 05:09 PM
  3. Projects board
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 12-13-2004, 09:33 AM
  4. Board back online
    By webmaster in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 08-08-2002, 10:16 PM