Advertisement Jump to content
  • Advertisement

alphatrak

Member
  • Content Count

    60
  • Joined

  • Last visited

Community Reputation

163 Neutral

About alphatrak

  • Rank
    Member
  1. I realize I should post in Microsoft's Forums. Guess that Sticky titled "XNA - NeHe style (Projects 1 - 10) Source Code" (written by moderator JWalsh) doesn't belong in this forum either. Thanks anyway.
  2. I don't know if this is even possible but, I have an XNA windows game that runs in a window (not a fullscreen window), and the behavior that I would like is that, when I click the title bar with the mouse, I would like the game to keep rendering/playing. As is, when clicking the mouse down on the title bar, the Update and Draw functions are no longer called, halting the game in it's tracks. Is there a way to put update/draw in a separate thread than the message loop? Or is there another way this can be accomplished? Or is this something beyond XNA entirely? Seems like it should be possible since in an online game, allowing everything to stop for some time could result in several issues, including loss of connection. Sorry if this has been answered before. I couldn't find a similar post via search. Thanks
  3. I want to be able to support Korean in my XNA 360 game. There are a couple things I'm not sure how to go about doing for this though... There are no fonts installed on the XBox, so you pretty much have to use the SpriteFont object, which creates a customizable xml file where you can specify the font file, along with multiple character ranges, from which the content manager will use to generate a texture file upon building your code. The game I want to create is a short RPG. Being a unicode newb, I tried including the entire set of Hangul syllable blocks (11000+ characters?). The comp was crunching and crunching forever and I eventually killed it. The texture file would've been WAY too big. Just how do Asians write games with such large character sets? Apparently they only include what they need, according to a post at http://forums.xna.com/post/23183.aspx, which is fine if you don't need input in your game. So that leaves the question, how do they support input using XNA on the 360? In the same post, the guy suggests creating multiple textures (SpriteFont objects in the case of XNA) each containing a subset of the language. To me, this seems like that would kill texture memory REAL fast. And I can't imagine using such a technique on the 360. I would imagine load time would be horrendous. Not to mention, how does input work for such languages on the 360 if there is no "IME" support on the 360? I'm guessing a Korean 360 would work similarly to how the Hangul IME works, in that they would use Hangul Jamo to create syllable blocks. I can't imagine they would use the controller to navigate through all 11000+ syllable blocks, choosing one at a time. Perhaps a custom IME would have to be programmed in XNA, which would be hell. Maybe my problem is, I'm expecting too much from XNA :) Any thoughts?
  4. alphatrak

    Sound Engine Todo

    I haven't gotten much done so far this weekend on the sound engine. I keep opening Visual Studio and realizing that I'm not sure what task to work on next, then I find myself watching some Air Gear, or ordering 600 bucks worth of guitar equipment. In an attempt to reorganize myself to work on the sound engine, here's my todo list: -Code for case when mod is not looping -turn on DirectSound debugging to see if any resources are not released during testing -ability to mute entire sound system -ability to disable entire sound system -test non-looping wav/mod/ogg. -add optional callback at end of non-looping wav/mod/ogg -add callback that could be used for displaying a load progress bar (at loadtime of sound) -test static wav/ogg (must use wav/ogg shorter than 3 seconds, otherwise it is automatically streamed) -test loading/playing more than one different static wav/ogg at once -test playing more than one same wav/ogg at once (duplicate buffers) -volume, pan, frequency get/set functions -fade functions (volume/pan/freq set-functions over time) (see advanced section of dx9 documentation regarding optimization) -loading directly from mem buf (zip/pack file, etc) -Calculate current position in entire song. (harder than it seems, because dsound might loop the circular buffer back to the start before the next chunk of the song is rendered; essentially moving "backwards" in position). Will need to increment a total var everytime the buffer halve changes, then add current position to that. Reset var when sound restarts. -Test various streaming buffer sizes -Enumeration and selection of DirectSound devices When the sound engine is complete, I was contemplating writing an article for gamedev.net, but I'm not sure yet. The existing article on Streaming Wave Files with DirectSound is old, but a lot of the info I would provide would be redundant. That, and I'm pretty lazy. I'll probalby just release the source. So far, the engine can play streaming/static wav, ogg, and various mod formats. As you can see from the todo list, there's still quite a bit of functionality to add though. As for the guitar equipment, Raging Hermit has helped me pick out the following: http://www.musiciansfriend.com/product/Guitar/Electric?sku=516643 http://www.musiciansfriend.com/product/Guitar/Amps?sku=480022 http://www.musiciansfriend.com/product/Guitar/Effects?sku=150846
  5. alphatrak

    Things Falling Apart

    You know you play too much WoW when... I went to the bar downtown Columbus last night with a coworker friend. We were feelin pretty good by about midnight and the place started to get hoppin. A bunch of girls came in along with two guys. Friend says, "There's only two of em, we can take em". I said, "No way man, the girls might aggro". Hrmmm maybe you have to be drunk to find that funny? [smile] Anyway, I get home to install my new Audigy 2 Zs card (been using a Live for ages). I install it, I have sound once again, life is good... That is, until I realize the network connection no longer works. I uninstalled the audigy card, and tried everything imaginable to try and get it back to the same state it was before the audigy card... still no go. Time to head to micro center for a lan card. /sigh On a side note, I believe Nine Inch Nails tickets go on sale today for a concert in Columbus. I saw them in Detroit not too long ago. Awesome show, but it must be funny to see one preppy guy in the middle of thousands of goth. [smile]
  6. alphatrak

    Thread synchronization = head hurts

    Thanks for the welcome. Mushu, Big thanks for the mutex code. I still couldn't get the critical section functions working as expected, but the mutex code works perfectly: The sound engine can now stop/pause/start/update the buffers all safely now. Thanks! -Gordon
  7. alphatrak

    Thread synchronization = head hurts

    I finally made the jump to GDNET+. I've been posting to my own site for a while now. If you want to see those posts, they're at http://www.illusivestudios.com/journal/index.php?finger=Nightshift. The past month or so, i've been working on a sound/music engine for custom game engine using DirectX 9. The sound engine works great in the main thread of an app, but I'd like to put the sound engine in it's own thread, so that window messages don't interfere with filling sound buffers. The problem is I'm not very good with multithreaded programming. Even though I've been programming since high school (96), I still haven't played much with threads (at least not in Windows). Within the sound engine test app, I create a separate thread, in which all it does is check to see if all sound buffers need to be updated, and updates them if needed. (Yes, it polls.. I simply haven't gotten around to setting up notifications just yet). The problem is that when stopping the buffer from within the main thread, DirectSound could potentially stop the buffer while it's being updated in the other thread, which makes things sound out of place if Play( ) is called again. So I thought I could use the CRITICAL_SECTION related win32 functions, but when I press the key that calls Stop( ), sometimes it takes a good 5 seconds before the buffer actually stops playing. I also tried writing my own "critical section" code.... so basically, in the Update and Stop functions, I do this... // at start of both Update and Stop... while(g_bLocked); g_bLocked = TRUE; ... // at end of both Update and Stop g_bLocked = FALSE; The problem with this is that when I call Stop, it gets stuck in the while loop and never actually stops the buffer. I think that because it's not getting back to the main message loop, the process never does a context switch to the other thread. (Again, it goes back to me not understanding threads). Unless anyone can clue me in on what i'm doing wrong, I think how I'm gonna fix it is have a Queue object within the sound engine, and that's how it would determine what operations to perform next... so when I call Update in the thread, it will "Queue" a call to Update in the main thread. Calling Stop will also Queue up a stop event in the main thread, which will cause the sound engine to "wait" until the Update for that particular buffer is done. The problem then becomes one of syncronizing reads and writes to the queue. I'm not sure why the CRITICAL_SECTION related win32 functions would not work. Aren't these supposed to be pretty effecient? Makes me wonder how long the Updates are taking. I know the Updates are NOT taking 5 seconds tho [smile] EDIT: I think I found out what I'm doing wrong with the CRITICAL_SECTION functions. I'm only calling InitializeCriticalSection once upon engine initialization, and calling DeleteCriticalSection once upon engine shutdown. Wups. Now I just need to get out of work, so I can go home and try it out.
  8. alphatrak

    The Learning Curve and Spore

    Wow. Spore looks great. Will Wright has a great sense of humor :) The mating scene and some of the characters he showed are hilarious. As for fun factor, it's really hard to tell at first. The game genre is obviously an exploration/sandbox/god style, but on a huge scale. My issue with games of this genre is that even as you explore, consiously, you always know there is a limit to functionality, so once you accomplish certain things, the game can quickly get redundent. In Spore, however, the variety in the character/city/vehical/planet exploration/building/interaction looks stellar. Also being able to browse other player's worlds is a huge plus, as well as blowing up entire planets :) -Gordon
  9. I'm trying to learn Windows Forms using C++ .NET 2003 for game tools development, but upon going to New -> Project -> Windows Form Application and I create the project, I get the following error message when trying to display the form designer: "An error occurred while loading the document. Fix the error, and then try loading the document again. The error message follows: The designer could not be shown for this file because none of the classes within it can be designed." I've searched for it and I can't seem to find a fix/workaround. Does anyone know what I need to do to be able to use the form designer? I'm using WinXP SP1 with .NET Framework 1.1 Thanks, Gordon
  10. Thanks, but the MSDN page doesn't provide a full example. It's just snippets of code, and they also only work off an existing menu: it doesn't create the menu from scratch. I'll check out some book stores for some info. If anyone else knows of some contrete sample code or a tutorial, please let me know.
  11. I've been searching for a tutorial or sample code that shows how to use straight win32, that is, not MFC, to create/manipulate owner drawn menus. Does anyone have a good example or know of where to find one? Thanks, Gordon
  12. alphatrak

    Flush standard input

    Thanks a ton... this was a huge help!
  13. I've written a win32 console app in visual c++ 2003, and I have a function called WaitForEnterKey() that I call which calls _getch() until it finds a '\r'. The problem that I'm having is that while I'm writing text out to standard out... it is possible that the user could press the enter key several times, and so when the next call to WaitForEnterKey() is reached, the Enter key presses have been queued in standard in, so WaitForEnterKey() immediately sees that Enter has been pushed and so it doesn't technically wait. I tried calling fflush(stdin) as well as _flushall() at the top of WaitForEnterKey(), but the Enter key presses are still in the input buffer. Is there a way to clear the input buffer, so I can prevent this from happening? Please help, Thanks, Gordon
  14. alphatrak

    Stream Redirection Question

    Just what I was looking for... you rule!
  15. I need a way to have a console app send input characters to a thread in order to shut it down (Pressing the Enter key shuts it down, but I need it to be automated). Basically, the problem is that we have a java app that doesn't have a built in schedular, and we need to be able to restart it at certain times, so I would imagine the easiest way would be to write a console app that starts up the java app, and safely shuts it down (by sending the Enter key to it's standard in). I have looked into Stream Redirection, but I can't seem to find an example or a function to use. I can use either C/C++ or Java. Please help! -Gordon
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!