GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Mutiny Engine Page Previous  1, 2, 3 ... 12, 13, 14, 15  Next
View previous topic :: View next topic  
Author Message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Tue Jan 08, 2013 1:05 pm    Post subject: Reply with quote

Quote:

If you don't want to mess with Shader programming. Stick with DirectX9.


Really? I thought DX10/11 were supposed to make the whole shader thing easier on a bunch of levels. Although that's just what I had read somewhere, and I have no experience with DirectX's 3D stuff at all.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Tue Jan 08, 2013 5:04 pm    Post subject: Reply with quote

Actually yes, especially DX11 (which I'm holding off on for a couple years since not everyone's got the hardware for it yet). Shaders are awesome and my reason for making this transition.

The reason for my comment is that the regular old non-shader rendering has been removed from DirectX10 and up. That means you can't even get anything on the screen without getting into shaders.

Perhaps DirectX11's documentation/tutorials make this easier but from what I've seen of the DirectX10 SDK, it's not too beginner friendly. It's obvious they were looking out for established development teams/companies when they released this.

They also removed a lot of other legacy stuff. Like support for the x file format. In fact, there aren't any 3D formats supported at all.

So not only does Johnny beginner not have anything on the screen, he can't load anything to put there in the first place.

That's just the stuff I've ran into so far aside from the usual changes one might expect. I'm sure when it's all said and done my code is going to be slim and sexy. And hell maybe half of my problem is that I'm having to re-learn so much and figure out what stays and what goes. Maybe Johnny beginner won't have such a hard time since he's starting with a clean slate.


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Tue Jan 08, 2013 5:16 pm    Post subject: Reply with quote

Thanks for clearing that up.

Quote:

That means you can't even get anything on the screen without getting into shaders.


Wow, that's failure of epic proportions. There should always be some sort of bare-bones mechanism for setting a frame buffer and writing to it, even if for no other reason than testing. IMO, of course.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Tue Mar 12, 2013 10:05 am    Post subject: Reply with quote

Life got in the way as usual but I'm hacking away again.
I think I have my models loading now. At least there are no errors. But so far I've only got a single triangle rendering at the moment so it may be awhile. At least the ball rolling. I tell ya finally seeing A triangle was an event after coding for so long with nothing visible to show for aside from a log file.

-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
mikedoty
Developer

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Tue Mar 12, 2013 11:08 am    Post subject: Reply with quote

Getting that first triangle going always seems like one of the harder parts to me. Once you get that kind of prototype going, you at least have something that works, something you can build on more easily with your real stuff.
_________________
The end of the game, yes, is pretty much getting the weapon and killing off the population.
mashup games . com | Finally! - A Lode Runner Story
View user's profile Send private message Visit poster's website AIM Address
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Thu Mar 14, 2013 4:25 pm    Post subject: Reply with quote

Next little milestone has been reached:



This doesn't look like much, and after the years of working with this engine it really isn't. But like Mike said above, getting that first thing on the screen can be what opens the flood gates.

What this textured quad means is that my texture loader is working, my basic rendering code is working, my basic vertex shader is working and my basic pixel shader is working.

The only thing I've coded and haven't been able to confirm yet is my mesh loader. As I mentioned before, this is a feature that no longer exists in DirectX. So I did what many others have resorted to, which is to shoehorn a DirectX9 loader into the engine, then convert the meshes to DirectX10+. This is a shit way to do things but it'll have to do for now if I ever want to get Diversion released. Once Diversion's final I'll roll my own mesh deal.


Next I'll be implementing this new code into the existing font renderer so I can see the menus again (I've been navigating by sound since the last Diversion release).


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1652
Location: Your consciousness.
PostPosted: Fri Mar 15, 2013 8:15 am    Post subject: Reply with quote

If you need to rewrite major parts of the rendering and texture/mesh/etc. loading code anyway, this might be just the right point in time to switch to OpenGL.
_________________
0xDB
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Fri Mar 15, 2013 9:10 am    Post subject: Reply with quote

Perhaps later on when Microsoft becomes less relevant and/or I shift focus to Android. Right now I'm excited about the move to DirectX10 & Shader Model 4.0
It's been a lot of work changing over but I'm now seeing how much better things are in these later versions.
Who knows, maybe the next Xbox will have an indie scene (doubt it).

-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Fri Mar 15, 2013 2:02 pm    Post subject: Reply with quote



Things are going well now. I can now paint any color I want using an alpha mask. I can mess with the texture UV cords and fade the whole thing's translucency. This will all be implemented into the existing font code. The result will be considerably faster and with more features.

The only problem now is that I'm leaving to Orlando for the weekend. So the fun here will have to wait till next week..


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Sat Mar 16, 2013 1:29 pm    Post subject: Reply with quote

Quote:

The only problem now is that I'm leaving to Orlando for the weekend. So the fun here will have to wait till next week..


First PoV, now you... EVERYBODY IS LEAVING MEEEEEEEEEEEEEEEEEEEEEEEE!

*sob*
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Mon Mar 25, 2013 4:43 pm    Post subject: Reply with quote



Wooo! Been coding my ass off today! Learned a lot about how things work in DirectX10.

I think I previously said some people ought to stick with DirectX9.
I am now retracting those statements. DirectX9 is so different and inferior I now think it would be a mistake for anyone to take it up at this time.
There are example shaders out there and within the SDK which you can use so even if you have no desire to program shaders you can still plug something in and forget about it.

Having to unlearn DirectX9 to take on DirectX10/11 has been more challenging then anything. I basically started from scratch (as the above screenshots show). But I feel I've got a decent grip on things now.

At this point I'm implementing what I've learned into Mutiny. With any luck I'll be running around in an ugly game world within the next few days.


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Tue Mar 26, 2013 8:50 pm    Post subject: Reply with quote



Ever spent your night debugging only to discover that there was nothing wrong at all aside from your method of testing? ...yeah

So this doesn't look like anything exciting but believe me the stuff powering those letters is the same stuff that will be powering the whole game's graphics.
I didn't want to start applying my work to the real shit till I have my stupid letters.

Tomorrow, shit gets fun!


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
mikedoty
Developer

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Wed Mar 27, 2013 1:57 pm    Post subject: Reply with quote

All that text reminds me how much I loved the "credits" section in Diversion. :)
_________________
The end of the game, yes, is pretty much getting the weapon and killing off the population.
mashup games . com | Finally! - A Lode Runner Story
View user's profile Send private message Visit poster's website AIM Address
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Wed Mar 27, 2013 8:31 pm    Post subject: Reply with quote



hehe for the first time in weeks (months?) I was able to view that credits screen today :)

I've been having a lot of those moments where I'm looking at my old code and becoming disgusted. That's the bad thing about a multi-year project. You're going to learn and improve a fuck-ton before the project is ever finished.

It's been much easier to rewrite a lot of my code from scratch with DirectX10 then to try to make sense of things I did years ago. Things are coming out much cleaner. In part because I've improved, but also because DirectX itself has improved.

I had three functions that display meshes. One was a generic function for whatever. One was a simplified version of that. And the last one was specific to game-world objects.
After re-writing the first one, it was so peachy I decided to just delete the "simple" version.

Tomorrow I'll get into that third one and determine if that too can just be deleted. It'd be better to have one function that does everything if it's possible. I believe one of the reasons I have multiple functions in the first place was because some of them didn't support shaders and relied on the stock rendering pipeline. Since that pipeline no longer exists in DirectX10 it should only get easier from here :)


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Wed Apr 03, 2013 4:23 pm    Post subject: Reply with quote



Obviously this looks like shit -BUT! The game is running correctly for the first time since the DX10 conversion started.
The biggest issue was with my collision detection which relies on the way DirectX handles Meshes. This has changed quite a bit since DirectX9. Specifically how index and vertex buffers are locked and accessed.
I've completed the changes though so all is well in the land of Diversion. Except the graphics of course, which has become my focus once again.


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
mikedoty
Developer

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Wed Apr 03, 2013 4:27 pm    Post subject: Reply with quote

Hey, that looks like the spot where I ran out of ammo and got gunned down trying to use the melee attacks. Luckily there was a dumpster for them to drop me in nearby!
_________________
The end of the game, yes, is pretty much getting the weapon and killing off the population.
mashup games . com | Finally! - A Lode Runner Story
View user's profile Send private message Visit poster's website AIM Address
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Wed Apr 03, 2013 4:29 pm    Post subject: Reply with quote

Oh, coolness. Can't wait to see what you do with DX10 :)

Quote:

Hey, that looks like the spot where I ran out of ammo and got gunned down trying to use the melee attacks. Luckily there was a dumpster for them to drop me in nearby!


And I punched a dude so many times I broke my wrist!
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Mon Apr 08, 2013 9:05 pm    Post subject: Reply with quote

DirectX10 does not have an RGB texture format. You're pretty much stuck with RGBA, even if you don't need an alpha channel.
Mind blown


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Tue Apr 09, 2013 11:18 pm    Post subject: Reply with quote

Well it turns out, here in 2013 we use compressed formats. I was up till damn near sunup learning about and implementing texture compression.
DirectX has several compressed formats ranging from 1 to 4 channels using various methods of compression vs quality.

It is possible to load standard file types such as png, jpeg, bmp etc. and store the data in any of these compressed formats in video memory which reduces the required bandwidth.

Of course there is also the DDS file format which uses this same compression. These files can also store MIP and Cube Maps. I'm sure you guys have seen these files before. They're getting pretty common. I've jumped on the bandwagon and converted all of my textures to this format.
This was a long and painful task because none of the batch applications I've found provided intelligent options for the conversion. DDS files can use several formats and it is best to select the format that's best for the content. Although I was able to batch some of this work with nVidia's Photoshop plugin, the bulk of the files had to be fussed with one by one.

Now it's time for cookies and bed..


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10787
Location: Canadia
PostPosted: Wed Apr 10, 2013 5:23 am    Post subject: Reply with quote

I get the impression you may be fighting with the occasional thing that was fixed in D3D11, but I've found D3D in general is missing many niceties OpenGL has (RGBA4444 FTW). But anyway, compressed is rather normal.

TIP: If you want to save space and use compressed textures (DDS), just remember that PNG is a raw image that is zlib compressed. Uncompressing a block of data compressed by zlib is one function call. Zlib includes an easy tool for compressing files on the command line. Almost all files, especially ones that needed to be loaded in full (maps) can benefit from something like zlib.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
mikedoty
Developer

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Wed Apr 10, 2013 7:42 am    Post subject: Reply with quote

Is the main benefit of using the compressed textures load time in the game?
_________________
The end of the game, yes, is pretty much getting the weapon and killing off the population.
mashup games . com | Finally! - A Lode Runner Story
View user's profile Send private message Visit poster's website AIM Address
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Wed Apr 10, 2013 11:05 am    Post subject: Reply with quote

Yeah I found it odd that they removed 16-bit modes. That was an option in Mutiny II that I had to remove in Mutiny III. Perhaps with compressed textures it's no longer relevant.

Zlib looks pretty sexy (although I couldn't find the latest version pre-complied for Windows). Maybe I'll implement that in the future.

Anyway, I've got Diversion up and running with some basic fullbright shaders. I'm re-writing my shaders because quite frankly, I'm much better at HLSL then I was when I wrote the old ones. That's not to say I won't re-use some of the old code but like the renderer itself, I'm finding it better to start with a clean slate.

Before I get too far into the shaders though I'm spending some time to optimize the renderer. So there won't be much to see quite yet.

-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9412
Location: Not Finland
PostPosted: Wed Apr 10, 2013 4:29 pm    Post subject: Reply with quote

Quote:

Is the main benefit of using the compressed textures load time in the game?


As I understand it, yes.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10787
Location: Canadia
PostPosted: Wed Apr 10, 2013 7:18 pm    Post subject: Reply with quote

No. Compressed textures actually take up less video memory (like half the space, quarter, etc). Video cards have extra transistors who's sole purpose is to decode compressed texture formats at practically no additional cost (sometimes faster too, since there's less data for same dimensions). Like JPEG, compressed texture formats are lossy. Great for textures and photos, lowsy for 2D and pixel artwork.

Also zlib is like 2 files (zlib.h and zlib.c). You just copy its source files in to your project. No compiled libraries needed.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Bean
Admin

Joined: 20 Aug 2005
Posts: 3766

PostPosted: Thu Apr 11, 2013 12:05 am    Post subject: Reply with quote

PoV wrote:
Also zlib is like 2 files (zlib.h and zlib.c). You just copy its source files in to your project. No compiled libraries needed.


Oh damn! Good info!

Speaking of JPEG. I'm working on a screenshot feature. DirectX now has a function to save a texture to a file. But there's no parameter for setting the JPEG quality. The output I'm getting is horribly bad.
Then I tried PNG, but as previously stated, DX likes to have alpha channels where they're not needed. The PNG output ends up mixing alpha with RGB which creates a mess (like how Windows Photo Viewer fucks this up).
So here I am in 2013 outputting BMP files.


-Bean
_________________
Kevin Reems | Nuclear Playground | Solid Driver
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Mutiny Engine Page Previous  1, 2, 3 ... 12, 13, 14, 15  Next

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.