Jump to content

  • Log In with Google      Sign In   
  • Create Account

Squared'D's Journal

Middleware and 3rd Party Libraries in Auxnet - Part 1 - Direct X

Posted by , in Project B, Auxnet 01 November 2013 - - - - - - · 855 views
auxnet, middle ware, middleware and 2 more...
Middleware and 3rd Party Libraries in Auxnet - Part 1 - Direct X

Making a game like Auxnet has been a very daunting and tiring task. I work on a team; however, I'm the only programmer. Making such a game alone wouldn't be possible unless I used various libraries and APIs. I guess it would be possible, but it would have tripled the amount of time spent. In this series of blog post, I'll examine some of the middleware that I used to create the game. I'll examine them by considering the following questions:
  • What is it?
  • How do I use it in the game / engine?
  • Why did I choose it?
  • What are my future plans?
I hope this will help anyone who is thinking about including middleware in their projects.

Direct X
What is it?
Quick disclaimer. In this post, when I say Direct X, I'm actually just refering to Direct 3D. Direct X is the Windows graphics API that I decided to use. Direct X provides an interface that allows me to use the various features of the graphics card. Using HLSL(High-Level Shader Language), it's possible to write per vertex and per pixel programs to create many interesting effects.

Why did I choose it?
I have intention of starting a Direct X / Open GL debate. I've honestly never used Open GL. I decided on Direct X because it was created by Microsoft, and the only platform that I currently support is Windows and with MSDN and all of the Direct X samples included with the Direct X SDK, it was easy to start with. At first, I only supported Direct X 9, but now the game/engine also supports Direct X 11. I've developed a multiplatform framework that I hope will allow me to expand to other operating systems and using Open GL in the future, but for now, I just want to finish the game so I'm sticking with Direct X until the game has been completed.

How do I use it in the game / engine?
I use Direct X for all of my rendering. I've written two frameworks that sit on top of Direct X. One is very high level and uses handles to refer to resources. The other is much closer to the API. This has been working well, but as I've been coding, I've been realizing the benefits of the higher level framework and am considering phasing out the lower-level API-like framework and just and work on making the higher-level version faster. The higher-level framework is built on top of the lower-level stuff so I feel like I'll be able to eliminate a lot of code the and make it faster by just have the higher-level framework directly access the API. I'll continue to experiment with this and make a final decision after this game has been completed. No more major engine changes unless they are 100 percent needed to complete the project.

I make extensive use of HLSL shaders and created my own material system that uses different shader techniques and texture maps to make various effects. Most surfaces use 3 textures--diffuse, normal, effects. The effects texture contains extra per-pixel information for things such as glow and specular. Models are rendered in order based on their shader and texture combination to reduce changing the texture. Translucent things are rendered in a second past using a z-sorted order.

What are my future plans?
There are quite a few graphical features that I'd love to add. I've been doing a lot of reading on deferred rendering systems and feel that I'd be able to get a lot of interesting lighting effects with it, but shadows are what's actually high on my todo list. I'd also like to add more support for other kinds of visual effects like electricity, smoke, and other particle effects.

Posted Image

To follow the project here on Gamedev, you can visit here http://www.gamedev.net/page/indie/project.html/_/action/auxnet-battlegrounds-r18
You can also follow the project on Youtube here: http://www.youtube.com/channel/UC-QAiqVnw6nVrFzW__fZeeA

Google+ Gallery: https://plus.google.com/112888538773179540556/posts/DAQhfYqUMyH

Auxnet:Battlegrounds 2013-10-25 Prealpha Video

Posted by , in Project B, Auxnet 24 October 2013 - - - - - - · 757 views
auxnet, project b
Here's a video of a character movie around an arena. The game is still early in it's development, but we've been making a lot of progress so far. A lot of the artwork that you see here is being refined and redone so we hope the final project will be really good.

Our team also has a new logo now. We will develop under Development Team Alpha Studios. How's the logo?

2013-10-22 Video Blog - Getting Organized

Posted by , in Project B, Auxnet 21 October 2013 - - - - - - · 1,237 views
game development, scheduling and 4 more...

The blog post have been coming out fast these days. This is a video blog that will detail the process that I use when deciding on programming task. I still have a lot of coding to do so I have found the organization is very important when I want to get things done in a reasonable amount of time. More specifically, I need to work on various gameplay elements. The game engine internals are by no means set, but they are at a good enough level for me to focus on gameplay. Later, I'll work on improving things such as the graphics.

I'm also including an Excel spreadsheet of the template that I use.

Also, don't forget to check out the Auxnet: Battlegrounds project page

Attached Files

Project B is now Auxnet: Battlegrounds

Posted by , in Project B, Auxnet 19 October 2013 - - - - - - · 924 views
auxnet, auxnet battlegrounds and 1 more...
I've been working a lot the past few days. Here's our new project page right here on Gamedev.net that will give more information about our game. I'm still coding so I'll give more information later.

Posted Image


2013-10-17 Video Blog - Project B Effects Editor

Posted by , in Project B 16 October 2013 - - - - - - · 828 views
project b, game developmet and 2 more...
Here's a little video that shows some of the effects that I plan to add to the game in the next day or so as I try to get this game playable asap. I guess it's already playable, but I want it to be fun.

Project B - 2013-10-15 - Slowly coming together

Posted by , in Project B 15 October 2013 - - - - - - · 652 views
project b, game development and 1 more...
I have updated in a while, but that's because I've been coding like a mad man over the past few weeks. I had been working on adding PhysX and testing out collision detection, but the main work I've been doing has been adding basic multiplayer characteristics. It took me about 8 days, but now I've got basic peer to peer networking in using RakNet. It was a lot of work, but now multiple players can move around the level at the same time. I'm in Korea and my main partner is in America, but we were able to successfully connect and "play" together. Now I'm working on migrating the special effects system from my old engine and after that, I'll add the basic weapons system. My goal is to make this a fun playable game within the next few days, even if it requires a few all-nighters. The graphics are still a bit rough, but next week when we unveil everything, I hope it'll look a lot better. I'm still waiting on some artwork.

Here are some screen shots. I've done most of the multiplayer testing running two instances of the app on one computer. The first screen shot just shows a basic connection. The second shows two instances running on the same computer, but the game is also connected to a third computer in America over the Internet.

Posted Image

Posted Image

2013-09-19 Project B Update & My First Motion Comic Experiment

Posted by , in Project B 19 September 2013 - - - - - - · 980 views
project b, game development and 2 more...
2013-09-19 Project B Update
It's been a while since I've posted something so I thought it was time for me to release more information. The game has been going well. I had been working on integrating NVidia Physx 3 with the engine. Now I have a character that can run around the level and it can collide with the walls and go up ramps. I love using physics engines. Making good collision code can be a pain and now that I have PhysX 3 integrated I'll be able to do some interesting things.

Do you know what else I love? I love component-based entity systems. For the most part now, everything in the game uses the same entity system, whether they be character entities or level objects. I just have 2 types of physics components so far. One uses a PhysX character controller and can respond to user or AI input. The other just sets up the basic physics bodies and geometry. Adding features using components is so easy. Just build the component, create the system to process it, and add the component to a factory. Then I add the component to an entity, and it just works. I love it.

My First Motion Comic Experiment
Now for the other thing I wanted to talk about, motion comics. Honestly, I was starting to get a little burnt out constantly working on this project. I also wanted something to make the game more special so for the past 3 days, I've been working on a motion comic framework that I'll be able to integrate into my game and GUI system. It basically just applies various effects to still images. All of the effects are currently hard coded in C++, but eventually I'm going to add AngelScript support and all scripted effects add-ons. Here's a small sample of what it can do. It's not great and it's mostly programmer art. Don't worry, none of the images are apart of Project B. A cool project B motion comic will be available in 2-4 weeks, when we reveal the game's real name. (We haven't used the game's real name because we haven't thought of it yet.) One last thing. Sorry for going overboard with the mosaic tile effect.

Project B - 2013-09-06 - Reaching Milestones

Posted by , in Project B 05 September 2013 - - - - - - · 2,325 views
project B, indie, game and 1 more...
Project B - 2013-09-06 - Reaching Milestones

After a long time, and a lot of work, finally Project B is starting to look like a game. It's not a game yet, but we're getting there. Here's the latest screen shot.
Posted Image

I've been happy with my team's progress so far. The game has really started to come together. There's still a long way to go, but now we got a character moving around a level and a model editing tool. So I decided to write a blog post that explains how we got here. This time last year, we were working on Genesis Seed, a game that we thought could be epic, but was really too much for us. Now we're building a much smaller game that we think can be really fun. Here's a little time line of how things have gone so far.

January 2013
In January of this year, I started experimenting with Direct X 11. Upto this time, I had been exclusively using Direct X 9, but I felt it was time to upgrade. I decided to keep Direct X 9 around for testing so I ended up working on a framework that I could use for both APIs. I decided to leave the framework open enough to be able to expand to more platforms and APIs in the future.[/size]

March 2013
In March, I decided to abandon the DXUT GUI. At first, I wanted to change it so the DXUT interface could be used on multiple platforms, but I stopped after learning that this is against the Direct X license. I decided to build a new GUI from scratch with plans to later open source it. I started working exclusively on the GUI and stopped all Genesis SEED work. Later, I renamed the engine and decided to re-brand myself from DSquared to Squared'D as DSquared was already in use..
Posted ImagePosted Image
April 2013
The Genesis Seed project was quickly dissolving so I decided to rejoin Gamedev.net. I actually have been coming to this site for many years, but had stopped posting. I wanted to get more acquainted with other independent developers.

May 2013
I continued to make major GUI progress and decided to discontinue working on Genesis SEED until I got updates from the team. I figured we were all tired of the project after working on it for some years. I started building a text-based game because I wanted to work on a project that I small enough could finish it on my own. I started the project journal onMay 22.

May 24, 2013
My Genesis SEED teammate pitches a new game idea to me called Project H. I initially reject it. The image below is a very early concept drawing. The game's look and feel is different now.
Posted Image

June 3, 2013
After giving the project some though, I saw that it had some merit so we decided to negotiate how to work on the project and how to form the new team. I was provided some mock-ups and prototypes. The images below are not real. They were created by Sung Shin, designer/3D modeler to give me a feel of the game. This was very important. If you're an aspiring designer and want to work with a developer. Provide mock-ups like these. Just draw them in paint if you have to.
Posted Image
June 17, 2013
On this day, I created the initial coding plan and started to build a new post-processing framework to fix the glow effect. The old framework ran on Direct X 9 and used the StretchRect() method. This method doesn't exist on Direct X 11 so I needed to just render to a texture from the first pass. This works better anyway as some graphics cards don't have good support for StretchRect() even when using Direct X 9.

June 19, 2013
On this day I finally finished the new post-processing framework. This allows me to be able to apply effects to the completed scene like blur, glow, etc.

July 1, 2013
On this day, I decided to discontinue my text-based hame and start working exclusively on Project H, now called project B. I announced this on my developer's journal. Albeit small, this was the first public announcement for development of the game.

July 16, 2013
After a lot of work, I finally finished migrating the texture and shader systems from the old version of the engine to the new one. After this, I was sure I'd be able to make a game work on Direct X 9 and 11.
July 23,2013
This was a very important day as I was able to import a model into the model editor. I felt relieved as development had been going much slower than expected.


July 30,2013
This was a major milestone day for me. I finished moving the animation system to the new framework. It supports matrix palette based animations with shaders developed for Direct X 9 and Direct X 11.


August 30,2013
On this day, I finished the basic level stuff. I also added the code that would allow me to start the game in the main menu, create user profiles, and run a level though the menu.

September 4,2013
On this day, I added basic NVidia PhysX support as my physics engine. The character in the game now moves around using a PhysX character controller.



What's Next?
What's next on the docket? I need to develop the levels. My plan is to work on a tool that will allow our team artist and designer to develop the levels and configure them on their own. After that, I'll work on collision detection within the level and then having multiple characters in the stage at once. The next big milestone will be connecting RakNet to the engine again and making it multi-player.
I'll continue to provide updates on this site.

Thanks for reading.

Project B - 2013-08-26 Update

Posted by , in Project B 25 August 2013 - - - - - - · 727 views

Project B - 2013-08-26 Update

Finally, I've been making some real progress. Most of the code to read a level file and to load it is working, and everything is running well in the current single player version of the game engine framework. Don't worry, I'll extend it to multi-player soon enough. There are still quite a few things I need to work on before I say the level test is complete. I need to get controls and basic physics in so you can walk around the level. As of now, the model is just stationary.

If you look at the background of the level, you'll notice a mountain like scene. That panoramic view was created using a 6-texture sky box. I didn't make it. It came from this site http://www.3delyvisions.com/skf1.htm . There are some good tutorials on that site about how to make skyboxes. The level is temporary as I wait for my team to give me more artwork.

Posted Image

What I Have Been Working On -- Engine Layout

Posted by , in Project B 13 August 2013 - - - - - - · 971 views
progamming, project b, indie
What I Have Been Working On -- Engine Layout

If you've been reading my post, you'll likely know that I've been upgrading my game engine to be able to work on both Direct X 9 and Direct X 11 with hopes of future multi-platform capabilities in the future. I've also stopped using the DXUT GUI and built my own system from the ground up with the exception of fonts which uses the bitmap font generation tool from Angel Code. As I've been upgrading my code, I've also been adjusting the basic code architecture a bit. Here is my current road map.
Posted Image

Now let me explain this a bit. This IS NOT UML, and the boxes are not classes. They represent static libraries and namespaces. Libraries higher on the chart can see and uses libraries connected to them and lower levels. So DSquaredGame can access classes in DSquaredCore, but DSquaredCore doesn't know DSquaredGame exists. Now not everything in a higher level library knows about everything in the lower level ones. Remember, this doesn't connect classes. So the lines stand for "can be seen by". So this show library dependencies more than anything else. It's helpful as it has been forcing a lot of structure on the code. Everything is still a work in progress, and with new versions of the engine,

If you're wondering about the naming convention, the original name for the engine was D'Squared. I changed it because quite a few others were already using it. I didn't want to change the code too much so I just kept the name for all strictly internal code. Squared'D is for all outwardly facing code. After that, I decided to make Squared'D make online game development identity.

Different libraries do different things. For example, DSUtilities is just a basic utility library. It's mostly just for math, but it also includes some string manipulation code and some other legacy code. Later I plan on cleaning it up, removing some of the code, and maybe reorganizing some of the code into other libraries. DSquaredGame's main job is to provide graphical support to the engine. DSquaredNet uses RakNet add multi-player support.

SquaredDPublic is code that I hope to one day open source. Right now, it's basically just a GUI library and the code that supports it. The GUI on it's own doesn't have any rendering capabilities, but I have written default renderers for it. Earlier GUI screenshots use the default renderers, but the newer ones use an engine supplied one. Both are very similar as I coded both of them. SquaredDPublic needs some work done to it overall, and probably in November or December, I'll try to fix some of its problems. Basically, there's code in SquaredDPublic that doesn't fit and needs to be moved out of the namespace and library.

DSquaredCore has the basic functionality to make a game. I want to be able to make a server only implementation that doesn't require graphics so all the core non-graphical elements are here. DSquaredCore contains the basic game framework. The framework is very component based that uses "plugins" to add functionality. I designed the engine so programs can be made with it and only include the libraries needed. The engine is not 100 percent composition based, but with every iteration, it so becomes more.

A full game wwill need everything, but a server only game would just need DSUtilities, DSquaredCore, and DSquaredLogic. Most tools need DSUtilities, DSquaredCore, DSquaredGame, and SquaredDPublic. I had to build a very simple subsriber-based event system for everything to work nicely. For example, the code to fire a projectile is in DSquaredLogic, but in a multiplayer game, this will need to be sync'd with the other players. To do this, when a projectile is fired, an event is raised, and any callbacks that have registered to receive the event will get it. This will allow the projectile sync code to be notified when a projectile is fired.

This isn't everything, just a guide. There are a lot of other things such as some middleware libraries like RakNet, Nvidia PhysX, Rapid XML, and AngelScript (AngelScript support is still very early). Is this the way you should make a game engine? That's up to you. This isn't a guide. It's just "What I Have Been Working On."

Recent Comments

October 2016 »

2324 25 26272829