Navi Menu
main blog files profquotes Zygote Asylum contact link junk

19day

2005-11-13

Asylum Dev journal update

Filed under: Asylum — 19day @ 22:37:07

I’ve been making inching progress toward my new engine, if you can call it that, there’s still nothing. Really, what I’ve been doing is playing around seeing if the underlying capabilities are easily usable so that I might port my existing engine. I’m still going to have to rewrite a lot of it since the old code depended on a wrapper that won’t exist anymore, but I’ll just write my own wrappers to expose the functionality I need to those ported areas.

I’m going with C++ under visual studio .NET’s IDE, with DirectX 9, but it’s still being quite a chore. I managed to adapt the video rendering to a texture example from the SDK without too much trouble, unlike my previous .NET adventures in the same area. But of course, having taken that step forward, I move a step back.

I tried to see if MP3’s would work ‘out of the box’ without needing to do too much. I stole my MP3Music class from Asylum’s old code base and plugged it in and took a look at it to see what I had done, as it was just an adaptation of the movie player in the old code base which just happened to work. Well, it turns out that it was very nearly what was already in the shiny new video code, except it just took the file and built the render graph completely, rather than what the video to texture example was doing, which was, confusingly, adding input and output filters, and then asking DirectShow to fill in the rest, which didn’t seem to save anything, but whatever.

Anyway, tried playing an MP3, didn’t work… hmm, well, I guess that was to be expected, hey, I’ll just put an MP3 file in my call that renders to a texture, wonder if it will handle that without crashing. Nope, conked out there too.. hmm, always the same problem, all the helper threads spawned by GraphBuilder’s Render function were exiting with error code 0×2, and finally the main program would exit with the same problem. Odd, 0×2, accoriding to the DX error lookup utility, was File Not Found… but earlier checks already present in the routine assured me that the file existed… and then I tried it, rather futily, from the executable rather than starting it through the IDE, and it played. Wha?

This problem only presented itself whenever running through the IDE, debug or release builds, but worked properly through the executables themselves. The interweb was of no help, I tried lots of searches to no avail. The best I was able to come up with myself through debugging was that for some reason, the graph automatically built by the graph builder was wrong under the IDE but fine under the exe alone. It was also able to run as long as the debugger wasn’t attached, either in Debug or Release mode.

I tried a few things futily, was playing with just building the filter myself in Graph Edit and then doing it in code, but in the end I decided that it would probably be best to let the builder do the work (try the filters until one works). I decided to try OGG format, knowing it was a friendly MP3ish thing, converted a test file, and it seems to run file with the graph filters attempts, in all methods. So for now, OGG is what I’m going to use.

Funny that movies haven’t given me this problem, as they are more complex, oh well.

I’ve also just received a new book that I ordered, Game Coding: Complete, Second Edition by M. McShaffrey. I’m both impressed and dissapointed, but I guess I should have read the fine print on the recommendations of the book. It’s really good in the sense that it talks about a lot of high level stuff that is interesting if I was trying to make a breakneck speed game (which asylum isn’t, but might be handy later on) and on how to handle yourself if you were working on a grand project as part of a company. Unfortunately, I thought there would be more actual code, with specific utility in mind. But this is a general game programming book, and not a directx one, so I can only blame myself. It has enough good stuff to keep me occupied for some time, but it won’t be a replacement for the message boards I’ve grown to loathe. I wanted a better resource for the problems seen and sometimes half solved on game programming or directx forums. This book isn’t it, but it covers lots of things I wouldn’t have anticipated needing to do, like rolling my own memory manager, and also tries to get me to do things I still resist against but should do for proper coding, like separating the game logic from the input logic, for example.

Anyway, so at least, for now, progress is being made. All I need to do is write a sprite class (or wrap the existing one on offer from the SDK to give me better functionality) and then I can port some of my crap over. But I think I should give a lot of it a rewrite, since some of the fundamental stuff, like “View” representation is really sucky.

But that means rewriting the View Editor, which is a task I think I’ll put off for a little while.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress


Page by 19day (S.B.H.)
Everything here is property of 19day productions, unless it isn't, and cannot be claimed by anyone else regardless, sort of like a copyright, but in many more words.
Last modified: September 07 2009 18:21:00.
Valid XHTML 1.0! Valid CSS! CWH Get Firefox