Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Flimflam

Member Since 27 Oct 2005
Offline Last Active Dec 28 2013 10:01 PM

#5108587 DirectX 9.0c: DrawTextA() Onto DirectX Texture?

Posted by Flimflam on 11 November 2013 - 07:35 PM

Didn't you ask the very same question yesterday? Why make a new thread?




#5108426 Why XML is all the rage now?

Posted by Flimflam on 11 November 2013 - 02:42 AM

Honestly, I think XML might be hated a bit too religiously these days. Many of the biggest things make the biggest targets for criticism. Unless you're going full-featured in your XML usage, it's plenty readable and if you make proper use of attributes, it isn't that much bigger than things like JSON.




#5049597 Visual studio like app on MFC

Posted by Flimflam on 03 April 2013 - 10:17 AM

Please don't use MFC for new code.

 

It's ancient, unsupported, non-idiomatic C++, and full of evil pitfalls and gotchas. It really needs to just go die in a corner somewhere.

 

I really wish Microsoft would create an appropriate replacement for it. I always wondered why C++ didn't get some sort of WinForms library. Then again, these days things like Qt are around. 




#5045122 Drawing sprites without a texture

Posted by Flimflam on 20 March 2013 - 09:20 PM

If you're using ID3DXSprite, it requires a texture to use. If you want to continue using that interface, the best choice you have is simply using a 1x1 texture. This will have completely negligible effects on performance. 




#5044436 The games that everybody writes.

Posted by Flimflam on 18 March 2013 - 08:07 PM

- MMOs (You know, ripping players of their money while making them feel they're a part of a bigger community)

Why the chip on your shoulder regarding MMOs?




#5038013 D3D11CreateDevice failed

Posted by Flimflam on 01 March 2013 - 08:03 AM

Microsoft's decisions lately have generally left me feeling disappointed... They look eager to rid themselves of "freeloading" developers despite their products being a positive thing for the platform. I knew the moment Microsoft tried to get rid of the proper Express editions where we were heading. 




#5037979 Should I use XNA?

Posted by Flimflam on 01 March 2013 - 06:14 AM

Absolutely. XNA is still a fantastic framework for its intended platforms. Don't be discouraged when you hear about a tool or utility you use is no longer receiving updates. It is true that could easily spell death for a product that either has stability problems or needs long term maintenance but for something like XNA which is already very solid, there is little to worry about.




#5037548 Trying to move sprite towards mouseclick

Posted by Flimflam on 28 February 2013 - 04:59 AM

Change this line:

direction = (Vector2)mousePosition - Position;     //get the direction from arrow to cursor 

 

to this:

direction = target - Position;     //get the direction from arrow to cursor 




#5037535 Trying to move sprite towards mouseclick

Posted by Flimflam on 28 February 2013 - 04:24 AM

You need to define your target vector outside the scope of the function, so each time the function gets called, target doesn't get reset. Move your declaration of "target" to the same place you defined oldState, then remove the "target = mousePosition;" line.

 

Also, unrelated but in your distance checking code, you can replace "move.Equals(true)" with just "move".




#5035908 Close file sooner or later?

Posted by Flimflam on 23 February 2013 - 05:57 PM

... suggesting that your modify your...

 

Oh no, I didn't mean to imply that. I am honestly just wondering how others parse their files, either parse while reading or parse after copying to string and closing file.

 

If you're working with large files then it would make sense to parse the data as you read it, otherwise you could run into memory problems and the like. For small files, this isn't really something you would generally need to concern yourself with, so the standard open -> read -> close -> parse would make perfect sense. 




#5035661 How would I include Xna dlls with my app so the user won't have to downlo...

Posted by Flimflam on 22 February 2013 - 08:57 PM

You can't give them the individual DLL files that constitute the XNA redist, however you can include the redist installer with your application, so they won't need to go to Microsoft's webpage to get it.




#5032167 Why old games are so compact? (NES, SNES..)

Posted by Flimflam on 14 February 2013 - 02:53 AM

They were compact because they had to be (space on those cartridges was very limiting), and because the method of storing/creating the information was different. Since size and power today is not a big issue anymore, we can get away with cutting a lot of corners, and using much higher quality assets. Sounds are stored as full waveforms, Graphics are large, etc. Back on older consoles, music was somewhat similar in nature to the old MIDI format we have on PCs, and graphics were very optimized tiles that tended to compress well, rather than large images rendered onto the screen whole. 




#5029047 What are some libraries and techniques that game dev's should know?

Posted by Flimflam on 05 February 2013 - 09:37 AM

(It still amuses me that C++ remains one of the only languages where people go out of their way to avoid the standard, library instead of learning how to use it properly, based on 10 year old hearsay and rumours...)

People are just too obsessed with optimization, and I think when they consider how the library is designed (templates in templates in templates), think they can trim the fat and reap the benefits. I think the biggest problem is a lot of people don't even consider the standard library part of C++. That it was something tacked on after the fact, and started off pretty poorly. 

 

Then there's missteps like Microsoft's implementation doing silly things that degrades performance on simple operations unless you add messy definitions to disable them, even in release builds. It just puts a bad taste in everyones mouth and confuses the issue, perpetuating the idea that it's slow.

 

It took me quite a while before I trusted the standard library before I ultimately moved to C#. I still feel weird about std::string sometimes, and I don't even know why. It just feels so external to the core language for something so fundimental.




#5019762 Best Language for Cross-Platform Content Pipeline

Posted by Flimflam on 09 January 2013 - 10:45 PM

C# requires very heavy weight dependencies, .NET on Windows, and Mono on everything else.  You are looking at increasing your install process upwards of a gigabyte or more.  Although it is possible to use C# on non windows systems I wouldn't really call it a practical solution.  There is always Java but my personal opinion is that this can cause some slight lag in the loading process (traditionally Java performs a bit slower than C++ due to the interpreter that must intercept and parse the byte code).  If you are using lightweight graphics and don't mind adding a few extra seconds to your loading screens I would recommend java.  If performance is critical your a little stuck with C++.

 

I'm curious under what circumstances you would ever need even close to 1GB or more space using C# under any OS? The Client Profile for 4.0 which is all you need to do most projects (unless you need some really obscure .NET features--unlikely), is a 30MB download in its entirety, and mono can be even smaller.

 

C# won't require a bigger set of dependencies than Java would. It's more than a practical solution these days.




#5011558 Multi-threaded Rendering

Posted by Flimflam on 17 December 2012 - 12:20 AM

What you have to realize is that making a draw call has a cost. And so you want to reduce that cost.


If I have 10 mesh in the scene, 5 of them are the same, I have to repeat the following 10 times to draw them all:
- Set world matrix
- Draw

What you mean by reducing draw calls? I think you can't draw more than 1 mesh in one draw call.


You should look into vertex buffers. It allows you to condense a large amount of geometry into a single batch which you can then draw together with one call.




PARTNERS