Results 1 to 17 of 17

Thread: "The Engine" Project [News/Updates]

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default "The Engine" Project [News/Updates]

    Good afternoon everyone!

    I recently began a thread (found here) in which I gave a relatively detailed summary about a game engine development project I am currently engaging in for commercial purposes; the primary objective of which was to seek new programmers (and other skilled persons) to press on its development. This new thread, however, is primarily for the sake of providing news and updates about the engine's development process. This is where I will try to post periodically to let everyone know how things are going, since more than a few of our members were very interested in following its progress. Without further ado, here is the first of many updates!:

    ENGINE [WIP] UPDATE -- 9/12/2012

    Since my last post in the "recruitment" thread things have progressed rapidly; very far, very fast. The engine now has well over 60 new core types (classes, structures) and a large number of smaller types (enumerations, helper types and such). Almost all of the mathematics API is complete, including both 2D and 3D math. This includes implementations of types such as Vector2, Vector3, Matrix (4x4), Quaternion, etc. All of these are complete; only the Matrix decomposition algorithm is uncompleted and uses a bit of a platform-specific "hack" through DirectX, but that will be fixed.

    The internal rendering engine for Direct3D10 is almost fully implemented, and will be ready to actually render graphics as soon as the material/shading/lighting system is hashed out. That is what I am currently working on: a platform-agnostic shading engine, fully functional under DirectX, OpenGL and any other rendering APIs, which allows for the creation of new, custom shaders, materials, lighting, etc. This is a very tricky thing to implement for multiple platforms without creating a huge, ugly monolith of "dirty" code that works but is too tightly coupled and nasty to work with. Such a thing simply isn't acceptable in a commercial engine, so it's taking me quite a bit of time and care to implement the core of the shading engine.

    I'm hoping to soon finish implementing all the basic types of lighting (point, directional, spot, etc), cameras (first-person, third-person, tracking, orthographic, physics-based, etc), materials and resources and other such things. However, I'm not yet satisfied that I have an elegant enough solution that adheres to the data-driven architecture of the rendering engine. Hopefully, some of the good folks at GameDev.net will help work the kinks out of the design so I can worry only about the code implementation. When these basic constructs of the shading system are ready the engine will finally be able to render its first scenes; scenes far more complex than a "mini-tri" example.

    That's about all for now... stay tuned!

    Regards,

  2. #2
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: "The Engine" Project [News/Updates]

    Cool, keep it coming.

  3. #3

    Default Re: "The Engine" Project [News/Updates]

    For you other techies and tech-junkies out there, here's a little technical glance at things...

    The engine is smart and knows how to generate meshes from data. So in the test application code, creating a quad, for example, is as easy as this:

    Code:
            void _createMesh() {
                var vertices = new IVertex[] {
                    new VertexPosNorm(new Vector4(-1, 1, 0, 1), Vector3.Forward),
                    new VertexPosNorm(new Vector4(1, 1, 0, 1), Vector3.Forward),
                    new VertexPosNorm(new Vector4(-1, -1, 0, 1), Vector3.Forward),
                    new VertexPosNorm(new Vector4(1, -1, 0, 1), Vector3.Forward),
                };
                MeshDataIndexed mdi = new MeshDataIndexed(vertices, new uint[] { 1, 0, 2, 3, 1, 2 });
    
                triMesh = MeshIndexed10.FromIndexedMeshData(mdi, context);
            }
    "IVertex" is an interface that all vertex-type structures must implement (in this case, VertexPosNorm -- a vertex-type structure that holds only a position and normal vector). This not only makes the code that handles vertices and meshes within the engine much simpler but means user-code can implement custom vertex types the engine has never seen before and they will all work perfectly and seamlessly!

    If you're familiar with DirectX you might be wondering how it's so simple... where's all the Input Layout data for the input assembler? How is this data serialized? How is it bound to the GPU? The answer is the engine! It's smart enough to do all of this behind the scenes as long as it has a little information. When you create a new vertex-type for example, the engine has a special attribute class which allows you to specify HLSL input information for fields in the vertex. Here's an example of it:

    Code:
    // Example fields from the VertexPosNorm structure:
    
    [HLSLInputBinding(HLSLSemantics.Position, Format.R32G32B32A32_Float)]
    public Vector4 Position;
    
    [HLSLInputBinding(HLSLSemantics.Normal, Format.R32G32B32_Float)]
    public Vector3 Normal;
    That's all there is to it! The engine reflects the type of vertex and reads in the HLSLInputBinding attribute to gather the necessary information for generating InputElements... And the Input Layout for the Input Assembler is generated on-the-fly!

    When you actually want to draw your mesh you will find that it is equally easy and pain-free. All you have to do is create a simple render operation; implemented in the engine as the "RenderOp" class. Here's an example of the code used to draw a mesh:

    Code:
    var op          = new RenderOp(triMesh, mat, setup); // We pass in the mesh, material and shading setup
    
    renderer.PushOp( op ); // One way of doing it
    And that's it! Your mesh will be drawn on the next draw cycle! There are many ways to customize it and do all sorts of neat things, but that's just a basic way to draw a mesh with engine.

    EDIT:

    I didn't explain the concept of this "Shading Setup" I mentioned. Basically, it's a way to convey information to or control a shader. For example, you can use a shading setup object on a HLSL shader to dynamically select different techniques and decide which passes therein to include/exclude. Furthermore, you could use it to apply data/variables on the instance or batch level. There's a lot of stuff you can do with it! Though it's not implemented yet, it will soon be possible to actually script a shading setup in a custom (and very simple/easy) scripting language. If you don't specify any shading setup for a render operation it will just use the default technique and all of its passes. So it's not necessary, but is quite handy and powerful!
    Last edited by keinmann; September 23, 2012 at 03:36 PM.

  4. #4

    Default Re: "The Engine" Project [News/Updates]

    Hey guys, sorry I have posted recently or been around! My internet here at home is out, and the ISP has STILL not fixed it! The only way I'm online now is because I'm jacking some wifi from a restaurant down the street lol, but the signal is so weak/slow I can barely use it. I managed to "sweet-talk" the waitress there into giving me their wifi password though, lol, so here I am. :-)

    Anyway, I have an announcement to make... The engine works!

    It was a long time coming, but now we're finally rendering actual geometry. I took a screen shot of the engine's first ever triangle:




    It's black because I didn't implement lighting in the shader... I just returned {0,0,0,0} in the pixel shader. However, I'm working on some basic lighting effects (e.g., point lighting, directional lighting, texturing, bump mapping, etc) right now so that I can render a more complex scene to test/showcase the engine.

    If you're unfamiliar with rendering and game development you might be wondering what's so great about rendering a black triangle and why anyone would consider it a "milestone". Well, the answer is simple... EVERYTHING you see in the vast majority of modern video games is made up of triangles. That's right, even super-complex character models rigged and animated with motion-capture...they're made of triangles. So if your engine can render a triangle, it can theoretically render anything you send to it.

    It's hard to explain the vast amount of work that went into getting to this point. Rendering a triangle with plain old DirectX or OpenGL is a trivial operation. However, try writing a completely platform-agnostic engine with complex components and getting from nothing to a triangle and you'll see what I mean lol. The triangle isn't merely a vertex and index buffer, it is actually a dynamically generated mesh. It's really hard to explain all of this though if you haven't seen the code yourself.

    Anyways, I'll be working on extending the engines features, making it more robust, debugging and soon rendering a pretty and much more complex scene!

    Regards,

    ATC

  5. #5

    Default Re: "The Engine" Project [News/Updates]

    Hey that's looking pretty good. I actually recognized what your rendering code is doing there, I've impressed myself, lol. So how are you planning to handle model importing and shading properties? I've got some good ideas in that department though I assume you probably have it figured out, but my two cents anyways.

    I would lump together textures and models into the same resource file, along with shading and material flags. I've thought long and hard about this, because this is as far as my engine project got. What I was gonna do was:

    Assemble resources (make a tool for it.)
    Something like >Import Mesh>Import Texture> Generate material that flags what texture goes with what mesh, shading flags, AO toggles, vertex coloring, etc.
    List resources to load in flat file.
    Scan folder for all the resources.
    Load resources with mesh names as reference id's.

    Anyways, just some loose unstructured thoughts on how to keep it moddable and flexible. Then you get to actually rendering the meshes in the engine, once they're loaded.

    Now if it's OpenGL, you're gonna add GLSL, right?
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  6. #6

    Default Re: "The Engine" Project [News/Updates]

    Quote Originally Posted by Bolkonsky View Post
    Hey that's looking pretty good. I actually recognized what your rendering code is doing there, I've impressed myself, lol. So how are you planning to handle model importing and shading properties? I've got some good ideas in that department though I assume you probably have it figured out, but my two cents anyways.

    I would lump together textures and models into the same resource file, along with shading and material flags. I've thought long and hard about this, because this is as far as my engine project got. What I was gonna do was:

    Assemble resources (make a tool for it.)
    Something like >Import Mesh>Import Texture> Generate material that flags what texture goes with what mesh, shading flags, AO toggles, vertex coloring, etc.
    List resources to load in flat file.
    Scan folder for all the resources.
    Load resources with mesh names as reference id's.

    Anyways, just some loose unstructured thoughts on how to keep it moddable and flexible. Then you get to actually rendering the meshes in the engine, once they're loaded.

    Now if it's OpenGL, you're gonna add GLSL, right?
    I will take your thoughts into consideration. Maybe you can help me (at least with ideas) when I get there. I actually haven't done any real work on the content pipeline. Been totally focused on writing a bar-none, AAA-grade renderer!

    BTW, yes, I must support GLSL if I plan on getting any pixels on the screen with OpenGL!

    I just fixed a major bug in the engine that was preventing lighting calculations from working correctly. I won't even try to explain what the bug was because it would take several paragraphs to convey the information and it still might not make sense lol. But essentially, I was improperly generating Input Element data for vertex structures because I was treating fields within the InputElement structure incorrectly (e.g., I was treating "Slot" as if were a mere indexer of vertex fields and "AlignedByteOffset" as if it were the offset from the last field in the vertex rather than from the base address of the vertex itself).

    Now that this bug is fixed everything suddenly works perfectly lol. Imagine that!

    Here's a picture of a rather trivial scene in which a point light is lighting an untextured quad:


  7. #7

    Default Re: "The Engine" Project [News/Updates]

    Quote Originally Posted by Bolkonsky View Post
    Hey that's looking pretty good. I actually recognized what your rendering code is doing there, I've impressed myself, lol.
    Isn't it funny how it happens sometimes? lol

  8. #8

    Default Re: "The Engine" Project [News/Updates]

    Here is a youtube video of the same rendering test shown in the above picture. Note that the crappy quality in the video is not how the 3D rendering actually looks. It's due to poor video compression and screen capture on my part, just to make the file tiny and easy to upload to youtube. So don't hate! It's the video, not the engine!


  9. #9

    Default Re: "The Engine" Project [News/Updates]

    Just upgraded the HLSLVertexInputBindingAttribute (formerly HLSLInputBindingAttribute) class to be "smarter"... Now it's no longer necessary to specify a DXGIFormat, aligned byte offset or anything else (though you could if you need more control over mapping/binding to HLSL vertex shader input). But now it's as simple as:

    Code:
    // this way:
    [HLSLVertexInputBinding(HLSLSemantics.Position)]
    public Vector3 Position;
    
    // or this way:
    [HLSLVertexInputBinding(VertexElementUsage.POSITION)]
    public Vector3 Position;
    When it's being mapped to Direct3D/HLSL input, the engine can infer the proper DXGI Format from the type field (Vector3 in the above example). Furthermore, it can infer the size of field from its type (or Format) and the aligned byte offset from tallying up accumulated byte offsets from previous fields. Makes things a lot simpler for engine users (and me), as changing/editing code is super easy.

    Now I've got to go back and fix some minor problems in 3D data types and 3D math... I tried to save a little memory in the math API and it ended up causing a problem.

  10. #10

    Default Re: "The Engine" Project [News/Updates]

    Good news! It appears I will now have some much-needed help from some very talented people!

    I have just joined forces with a very skilled and competent British programmer, Reegan Layzell. He is a C++ and C# programmer with experience in the various fields of game development. Today he sent me a demo of some of his programming skill: his own version of the classical game "Asteroids" which he completed in only six days for a school project. It's a rather impressive version of the timeless classic and pretty damned fun lol... has good AI, nice 2D graphics, fluid asteroids-style physics and excellent gameplay. I will attach the game in a Zip archive for those who'd like to try it.

    System Requirements:
    *Up-to-date Windows w/ .NET 4.0 installed (your pc should have this if you update)
    *XNA 4.0 Redistributable (available here -- small 6MB download from Microsoft)
    *Game download added as attached ZIP file -- just unzip it wherever you like! (only 9MB)

    *If your PC is out of date and you don't have .NET 4.0 then get it here.

    If you have any problems with it let me know!

    Anyhow, I'm very glad to have Reegan aboard. He's currently working on some of the base structure types for the engine (Vector2, Vector3, Vector4, Quaternion, Matrix, etc) to clean up, document and optimize the code... getting an introduction to the engine's architecture and conventions before implementing any major changes in its important systems sub-systems.

    I'm also hoping to have another professional programmer join up in the next few days. He's the ex-CTO (Chief Technology Officer) of another game/engine development company whom I once worked with for a short time. I will wait to make a formal announcement on it until I know for sure whether he is jumping in or not. But I think he will, and will be a major asset to this project. He has been looking for a project like this to get involved in and I hope we can get him aboard too!

    Regards,

    ATC

  11. #11

    Default Re: "The Engine" Project [News/Updates]

    A lot more progress has been made as of late... I'm almost completely finished with the instanced drawing implementation and the full interface of the data-driven renderer with the D3D10 back-end. The engine will be PC-ready a lot sooner thanks to the new help! It makes me a lot more optimistic to finally have some team players who really know their stuff.

    EDIT:

    Instanced drawing is now all but complete! Will run first tests tomorrow and get it debugged and running smoothly if anything is wrong. Instancing is what allows us to draw multiple instances of the same mesh with different sets of parameters (e.g., positioning, rotation, etc). This is how games draw tons of similar objects like grass, leaves, rocks and other environmental objects or anything that needs to be repeatedly drawn over and over (like the planes in squadron of F-22 Raptors, for example; same mesh different parameters).
    Last edited by keinmann; October 06, 2012 at 01:50 AM.

  12. #12

    Default Re: "The Engine" Project [News/Updates]

    Yesterday we opened some new forums for our company and development team. Originally, I was planning to just create some private forums for our developers and our engine project. However, I figured why should we be a bunch of secretive weirdos and not interact with the public and the development community? So I decided to go ahead and create a public forum anyone could use, and just create our own private sections for our projects and developers. So the forums are now open, and we will actually be using them in the future as a means of communicating news/updates with the public. I hope that a small, niche community, at the least, will spring up here. It could be good for helping us find new programmers and establishing some public relations. But since the forums just went up yesterday it feels like a "ghost town" lol. From past experience I know how hard it is to get past the ghost town stage with forums because people aren't compelled to make threads and posts in a place where there's no activity!

    So, I really could use some help here. All of you a hereby "officially" invited to the forums. I would be extremely pleased if you would be so kind as to sign up (a simple, 20 to 30 second process) and help us "break the ice" and test the forums out. Even if you're not a programmer you can just jump in the "General" section and make posts in the off-topic, political, news & current events and games & entertainment sections. We will be there to make conversation and will be bringing in more traffic and activity to get rid of the ominous "ghost town feeling" it currently has lol. If anything just join up and make a thread about your favorite video games, movies, etc. It will be extremely helpful. You're not obligated to keep coming back every day if you don't want to, but it would be cool if you do! :-)

    I'm also writing some programming tutorials to help attract newbie programmers. Newbies are the lifeblood of a programming community. So I'm hoping some solid tutorials on programming languages and game/graphics APIs will be attractive to newbies and those wanting to learn programming. I just finished the first tutorial... a tutorial on developing a game class for SlimDX w/ DirectX10. It explains every bit of code and I provide the complete source as a download-able attachment. If you're interested in learning game programming perhaps it could even be helpful to you. :-)

    Anyway, there's also a "Forum Administration" section for making suggestions on how to improve the forums or reporting any bugs/problems. You're welcome to use it if you'd like to report any problems or suggest something. Anyhow, I greatly appreciate any of you who are kind enough to come to the forums and help us get things fired up. Perhaps I will, someday soon, find a way of thanking you for your kindness! ;-)

    Regards,

    --ATC--

    http://atcware.boards.net

  13. #13

    Default Re: "The Engine" Project [News/Updates]

    Do yourselves a favor and get a web-host and SMF instead of ProBoards. It is arguably the worst forum software on the planet.
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  14. #14

    Default Re: "The Engine" Project [News/Updates]

    Quote Originally Posted by Bolkonsky View Post
    Do yourselves a favor and get a web-host and SMF instead of ProBoards. It is arguably the worst forum software on the planet.
    We will move in the future. But right now Proboards is: 1) free 2) easy!

    BTW, since you're interested in game dev check out the SlimDX/D3D10 tutorial. It ought to help you get up and running in the DirectX world and help you migrate away from the dying XNA Framework. :-)

  15. #15

    Default Re: "The Engine" Project [News/Updates]

    Quote Originally Posted by keinmann View Post
    We will move in the future. But right now Proboards is: 1) free 2) easy!

    BTW, since you're interested in game dev check out the SlimDX/D3D10 tutorial. It ought to help you get up and running in the DirectX world and help you migrate away from the dying XNA Framework. :-)
    Well, makes sense enough.

    And I definitely will, just as soon as I muscle through these loads of homework assignments I've been procrastinating around.
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  16. #16

    Default Re: "The Engine" Project [News/Updates]

    Quote Originally Posted by Bolkonsky View Post
    Well, makes sense enough.

    And I definitely will, just as soon as I muscle through these loads of homework assignments I've been procrastinating around.
    Sounds great! And thanks for joining! It's a pleasure to have you at our forum!

  17. #17

    Default Re: "The Engine" Project [News/Updates]

    It's been a while since our last update, but this time I have some eye-candy!

    We're starting work on a tech demo to showcase the engine. It's a racing mini-game where you get to drive the Mercedes-Benz SLS AMG at break-neck speeds across beautiful German countryside. Here is a pic of the actual 3D model of the SLS:



    If you think this is only half as beautiful as I think it is then I'm sure this is pretty exciting lol!

    We are trying to work as fast as possible to get this playable. Youtube video in HD will be available first though so you can watch the progress as it is developed. Keep in mind we're implementing only one world/track and this one car right now. We may decide to add more cars and make this into a real game, but that is still undecided. At this point it will remain a fun and beautiful tech demo for the engine!

    Regards,

    --ATC--

    EDIT::

    You can't tell from this pic but the model is built to exacting specifications... all of the parts move (doors open, trunk and hood pop, windows roll down, etc), it has an actual engine under the hood and the interior model is STUNNINGLY well-made... looks just like the real SLS AMG! I recently (couple months ago) had a little in-person preview of the SLS AMG at my local Mercedes-Benz dealership, but I plan to go back to gather some more intel on the car.
    Last edited by keinmann; November 03, 2012 at 09:37 PM.
    CEO & Lead Developer at ATCWARE™
    "Project X-1"; a 100% managed, platform-agnostic game & simulation engine

    Please visit our new forums and help us test them and break the ice!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •