Jump to content
  • Advertisement

Modena_au

Member
  • Content Count

    180
  • Joined

  • Last visited

Community Reputation

172 Neutral

About Modena_au

  • Rank
    Member
  1. Modena_au

    OMG? First thread?

    Honestly, if you don't care about the best of the best and just want a solid processor for normal gaming loads, you can't go wrong with either. The Core 2 Duos and the AM2s are both awesome chips, and will more than handle most work loads. As for quad cores... I honestly haven't looked into them that much to say either way.
  2. Modena_au

    Greetings...

    If you're becoming comfortable with Python, I would suggest you look into PyGame. There are many resources available for this library, and should take a lot of the complexity out of the way. It is plenty quick for simple 2D games, and anything really intensive can be re-written in C++ and used by your python application (it's a bit to learn, but not a bridge you'll have to cross for a while :)).
  3. Modena_au

    Shuffling of a card deck.

    Quote:Original post by JohnBolton Here is a simple, efficient, and effective algorithm: for i = 0 to 51 r = random number between i and 51, inclusive swap deck[ i ] and deck[ r ] BTW, Modena_au's code is ok, but it doesn't do enough iterations. 1000 iterations instead of only 52 would be better. I'm pretty sure we're both trying to say the same thing here ;). My code, unless I'm missing something, intends to do the same thing (only written in C).
  4. Modena_au

    Shuffling of a card deck.

    Your approach will certainly work, but I think it is possible to simplify it :). The way I've written mine is something like this: int iNew = 0; int iTemp = 0; for (int i = 0; i < 52; ++i) { iNew = rand() % 52; iTemp = myDeck; myDeck = myDeck[iNew]; myDeck[iNew] = iTemp; } What this does, is to iterate through each card in the deck, replacing it in any location (including the original, that's random too). It uses less memory, and should shuffle faster. If you wish to rearrange the deck even more, you can call the function several times, though it shouldn't be necessary.
  5. Modena_au

    Render an Mesh into an Texture

    To render to a texture you'd want to do something like the following: LPDIRECT3DSURFACE9 lpD3DsOrig; m_lpD3DDevice->GetRenderTarget(0, &lpD3DsOrig); // Save the original render target m_lpD3DDevice->SetRenderTarget(0, lpD3DsRenderTarget); // Set renderer to our surface // Render your mesh m_lpD3DDevice->SetRenderTarget(0, lpD3DsOrig); // Restore the original render target
  6. Modena_au

    How much D3DX slows performance?

    D3DX is a fine library. The earlier versions were denounced by many programmers as being too slow for real development, but that has definitely been rectified in DirectX 9. Most programmers would have a very hard time implementing a more efficient version of this functionality.
  7. Modena_au

    Criticism Wanted

    I think it's fantastic. You've got an original idea, and you aren't getting caught up in the snazzy new technologies. I think the text based path is a great way to develop your story and game mechanisms. Also, if you decide to move on to 3D graphics at some point, you'll have a great story line/source of inspiration. I find the problems that often stall my projects are rarely technical, but inspirational. I really think you've got your bases covered there. Now: go code it! I want to play :D.
  8. Modena_au

    Common Lisp - where to start?

    I've always been a fan of clisp, (http://clisp.cons.org/) and yes it works just fine in windows. As for ide.... umm.... I used the windows version of Vi, which I realize is not to many peoples tastes. There was a decent little IDE For windows but the name/address escapes me at the moment. I have a decent book at home which I will post a link for after work. It's definately no 'for dummies book' and should get you up to speed reasonably quickly.
  9. That's correct, once you convert an older visual studio project into a newer version of visual studio, it will convert it to the newest version available. It's just a gentle reminder from Microsoft that everyone should be using their latest and greatest. So Visual Studio can always read older project formats, but never write to them. That being said, there used to exist converters to convert VS .Net 2K3 projects back to VS6, and I'm sure it wouldn't take too much work to find one, though I haven't really looked to see if there are any for VS 2k5 (yet).
  10. Modena_au

    DirectDraw7 scaled Blt problem

    No, it's an S3 chipset I believe. And I'm working with much larger surfaces, I'm scaling an 800x600x16 surface down to about a third of that. There is never a system lock though. It only fails to blit and keeps going on it's merry way. I am also passing in the DDBLT_WAIT flag to the blit operation, however.
  11. Modena_au

    DirectDraw7 scaled Blt problem

    Thanks for the ideas guys. After some further testing, I've found that not scaling, but just cropping into place will not cause the error (though it won't give the desired effect). Also, if I force both surfaces into system memory, it works, although is slower than desired. Also, the paramaters to the blit are defined in constant ints at compile time, as they are never ment to change. I'm 99% sure the target system is running the latest drivers available to it.
  12. Modena_au

    DirectDraw7 scaled Blt problem

    The framework I'm using provides information on resource usage, and to the best of my knowledge is acurate and working (has been in use for a long while). The problem only pops up intermittently when there is less than 9mb of video memory free, and only then after the system has been running for a long time. The surface in question is an 800x600x16 surface being scaled blted. The error code being returned is DDERR_UNSUPPORTED. I know the operation is actually supported, however, because the operation works 99% of the time.
  13. Ok... so I'm working with a framework built around DD7, and in one specific situation, where the system is low on video ram, my scaled blt can fail. Now both surfaces are valid and have already been created. The target hardware is guaranteed not to change. What I'm wondering is, does a Blt require any video memory outside of the target and destination surface, or are there any other low memory situations that could cause the Blt to fail? The error code returned is vague and of no help :(.
  14. Modena_au

    How long have you been programming?

    I started a little over a decade ago with QBasic then turbo pascal. Didn't get serious with it until later on in high school when I started learning C++, so about 7 years ago.
  15. Modena_au

    ridiculous

    Ok, the first thing I see when looking at your code is the section if(str.charAt(i) >= '0' && str.charAt(i) <= '9') { int x = (int)(str.charAt(i) - ASCII_OFFSET); if(numNests == 0) ng.group.add(new Number(x)); else pointer.group.add(new Number(x)); } This will only work for positive numbers between 0 and 9. If you want to add any number, positive or negative, Create an instance of the Double class (upper case D, not the primitave double). use Double.valueOf(string str) to convert the area of the string to a double. For example, if you have the string strMyString with a value of "My string -3.41 is Pi times -1", you would keep parsing the string, and if you find '-' followed by a digit, or a digit, you would parse in a while loop count forward how many characters are in this number, so for the example given, your first number would start at 10, and end at 14, so then with your Double class, you could get that number by saying: myDouble.valueOf(strMyString.substring(10, 14)); Now, that's the major problem I've seen in your code thus far. Mind you, I've been working long hours lately, and programming all day doesn't exactly leave you with much mental power left in the evenings. If you've made any more progress narrowing down your problem, I might be able to help more though.
  • 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!