-
-
- (268)
-
premium membership
-
Posts
116
|
|
r2d2:Well I for one would like to help eliminate that "devilishly complication" by voting for native access :D
C++ and DirectX. . . .1 vote
You're in the wrong forums then. :) There has been a place for the past 4 or 5 years for developers who pay for DevKits and XDK access. Native access will never come to XNA GS because it's -- unsafe.
As for your concern about the future of XNA GS -- I see where you're coming from. However, I suspect (and this is only speculation) that with the next console especially, you'll see an even bigger push by MS for a unified development platform in the form of managed language development. However, only time will tell.
For now though, I can say that XNA GS has a good many features that are implemented much more cleanly than the XDK side of things. To the point that we were writing code and saying, "man, I wish this API was implemented the way they did it in XNA GS".
My point with all of this, is that in the end I think porting any existing code base / functionality over to C# and XNA would be a good investment. Just my 2 cents though.
|
|
-
-
- (14642)
-
premium membership
Team XNA
-
Posts
9,309
|
|
Dark Flow Studios:Native access will never come to XNA GS because it's -- unsafe.
I don't actually think that's the main reason. I believe the main reason is that Microsoft believes in XNA GS. I believe Microsoft believes in managed development growing and expanding in the coming years. Why else would they sink so much time and resources into XNA GS? Doing that just for hobbyists seems silly to me. To then build up a big managed platform only to then redo the whole thing in native code seems even more silly.
I wouldn't be surprised if in the coming years we see even more push and weight in the managed world. Managed languages can easily reduce development and debugging costs. Once Microsoft works out the performance issues on the Xbox, I could see XNA GS really taking off even more than it has (there are already numerous XBLA titles out using XNA GS). I don't think native development will ever go away, and it certainly will have its uses, but I think more and more developers will start to move over to managed as Microsoft refines the product, adds features, and, on Xbox most importantly, improves performance.
|
|
-
|
|
|
I agree with Nick, maybe even more strongly. The push towards managed code is the future - until something better comes along.
Game hobbyist hell-bent on coding a diabolical Matrix
|
|
-
-
- (8833)
-
premium membership
-
Posts
3,733
|
|
Very interesting topic here!
Ok, so for the sake of trying, how in the world would code that looks like this (this is just one class, but it seems representative of the other ones; plus almost everything else uses it):
| #ifndef GEOM_H |
| #define GEOM_H |
|
| #include <math.h> |
| |
| class Vector; |
| class Line; |
| class Plane; |
| class Matrix; |
| class Transform; |
| |
| const float PI=3.14159265359f; //180 degrees |
| const float TWOPI=PI*2.0f; //360 degrees |
| const float HALFPI=PI*.5f; //90 degrees |
| const float QUARTERPI=PI*.25f; //45 degrees |
| const float EPSILON=.000001f; //small value |
| ////const float INFINITY;////=10000000.0f; //big value |
| |
| class Vector{ |
| public: |
| float x,y,z; |
| |
| Vector():x(0),y(0),z(0){ |
| } |
| Vector( float x,float y,float z ):x(x),y(y),z(z){ |
| } |
| operator float*(){ |
| return &x; |
| } |
| operator const float *(){ |
| return &x; |
| } |
| float &operator[]( int n ){ |
| return (&x)[n]; |
| } |
| float operator[]( int n )const{ |
| return (&x)[n]; |
| } |
| Vector operator-()const{ |
| return Vector( -x,-y,-z ); |
| } |
| Vector operator*( float scale )const{ |
| return Vector( x*scale,y*scale,z*scale ); |
| } |
| Vector operator*( const Vector &q )const{ |
| return Vector( x*q.x,y*q.y,z*q.z ); |
| } |
| Vector operator/( float scale )const{ |
| return Vector( x/scale,y/scale,z/scale ); |
| } |
| Vector operator/( const Vector &q )const{ |
| return Vector( x/q.x,y/q.y,z/q.z ); |
| } |
| Vector operator+( const Vector &q )const{ |
| return Vector( x+q.x,y+q.y,z+q.z ); |
| } |
| Vector operator-( const Vector &q )const{ |
| return Vector( x-q.x,y-q.y,z-q.z ); |
| } |
| Vector &operator*=( float scale ){ |
| x*=scale;y*=scale;z*=scale;return *this; |
| } |
| Vector &operator*=( const Vector &q ){ |
| x*=q.x;y*=q.y;z*=q.z;return *this; |
| } |
| Vector &operator/=( float scale ){ |
| x/=scale;y/=scale;z/=scale;return *this; |
| } |
| Vector &operator/=( const Vector &q ){ |
| x/=q.x;y/=q.y;z/=q.z;return *this; |
| } |
| Vector &operator+=( const Vector &q ){ |
| x+=q.x;y+=q.y;z+=q.z;return *this; |
| } |
| Vector &operator-=( const Vector &q ){ |
| x-=q.x;y-=q.y;z-=q.z;return *this; |
| } |
| bool operator<( const Vector &q )const{ |
| if( fabs(x-q.x)>EPSILON ) return x<q.x ? true : false; |
| if( fabs(y-q.y)>EPSILON ) return y<q.y ? true : false; |
| return fabs(z-q.z)>EPSILON && z<q.z; |
| } |
| bool operator==( const Vector &q )const{ |
| return fabs(x-q.x)<=EPSILON && fabs(y-q.y)<=EPSILON && fabs(z-q.z)<=EPSILON; |
| } |
| bool operator!=( const Vector &q )const{ |
| return fabs(x-q.x)>EPSILON || fabs(y-q.y)>EPSILON || fabs(z-q.z)>EPSILON; |
| } |
| float dot( const Vector &q )const{ |
| return x*q.x+y*q.y+z*q.z; |
| } |
| Vector cross( const Vector &q )const{ |
| return Vector( y*q.z-z*q.y,z*q.x-x*q.z,x*q.y-y*q.x ); |
| } |
| float length()const{ |
| return sqrtf(x*x+y*y+z*z); |
| } |
| float distance( const Vector &q )const{ |
| float dx=x-q.x,dy=y-q.y,dz=z-q.z;return sqrtf(dx*dx+dy*dy+dz*dz); |
| } |
| Vector normalized()const{ |
| float l=length();return Vector( x/l,y/l,z/l ); |
| } |
| void normalize(){ |
| float l=length();x/=l;y/=l;z/=l; |
| } |
| float yaw()const{ |
| return -atan2f( x,z ); |
| } |
| float pitch()const{ |
| return -atan2f( y,sqrtf( x*x+z*z ) ); |
| } |
| void clear(){ |
| x=y=z=0; |
| } |
| }; |
| |
work in XNA?
I have some experience in C++ (I had begun learning it a few years back, but didn't get much farther than some simple console apps), and know most of the syntax, but I'm lost with this mess of operator overloading. I use it where applicable in C# but it's confusing the way it's used here.
And if anyone wants to see more I can upload it somewhere. It's public domain code from the BlitzMax MiniB3D library.
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
-
- (12831)
-
Team XNA
-
Posts
8,518
|
|
Most of those operator overloads will convert directly to C# - just use the C# syntax for operator overloading (which is similar to that of C++) and do the same computations in the same way.
The convert-to-pointer and array indexing operators are inherently unsafe (even in C++, that code isn't guaranteed to work on all platforms and compilers!), so doesn't have a direct C# translation. You could do something roughly similar using unsafe code in C#, but the semantics are sufficiently different that I think it would be better to just remove those operators and change any code that uses them.
Or of course you could just remove this type entirely and change the client code to use the XNA Framework Vector3 type...
XNA Framework Developer -
blog - homepage
|
|
-
-
- (268)
-
premium membership
-
Posts
116
|
|
UberGeekGames:Very interesting topic here!
Ok, so for the sake of trying, how in the world would code that looks like this (this is just one class, but it seems representative of the other ones; plus almost everything else uses it):
That class for the most part already exists as Vector3 in XNA. In fact, the class you show there is doing absolutely nothing special, aside from some of the C++ - isms you see in it. It's all floating point stack based math. At least with XNA, you run the prospect of current or future Vector3 implementations benefiting from SIMD instructions.
I'm with Nick. At the end of the day, managed language development is where the future of Xbox development is headed. Yes, I know, there are things you can do in C/C++/ASM that you cannot do in C#. Been there done that, and I think we all know that by now. Like Nick and everybody else has already said, once the performance is improved it's win-win for all involved.
I ported the bulk of my C++ based engine over starting back in 2008. Been running managed ever since and couldn't be happier. Of course managed brings its own set of problems (i.e. garbage collection, CLR performance, etc) to the table, but none those are insurmountable -- not even close.
|
|
-
|
|
|
Obviously I can't disagree with what has been said.
With all the hard work that the Microsoft groups are doing, and the community's involvement at large, I suspect that XNA GS will be the platform of choice. I think we all can agree it is already for the hobbyist, but it is the professional teams that will ultimately decide.
The argument could be made to maintain two development paths, but that would (and probably does) split the resources from Microsoft down to developers in general.
Beware of programmers who carry screwdrivers – XTalk
|
|
-
-
- (268)
-
premium membership
-
Posts
116
|
|
r2d2:The argument could be made to maintain two development paths, but that would (and probably does) split the resources from Microsoft down to developers in general.
I'm pretty certain there is no argument to have. Going forward there will still continue to be native access with lower level languages like C/C++/ASM. Companies like Epic, Id, Valve, etc. along with 99% of the rest of the retail non-casual developers all have 10-15 years worth of C/C++/ASM code bases that aren't just going to be "ported" to a managed language in a few months. :) That's likely a transition that will take a while. Exactly how long will likely depend on how quickly MS can demonstrate serious "performance" on either the 360 or the next-gen console. I'm willing to bet that it won't be until the next-gen console that MS shows something worth looking at in terms of the compact framework's performance. Again, this is pure speculation.
|
|
-
-
- (20)
-
premium membership
-
Posts
8
|
|
You may be forgetting that most developers still need their code base to work cross-platform. I can't see C++ being dropped any time soon for that reason alone.
|
|
-
|
|
|
Beeski:You may be forgetting that most developers still need their code base to work cross-platform. I can't see C++ being dropped any time soon for that reason alone.
Um... C++ isn't exactly cross-platform... at all.
At least C# is cross-Windows-platform ;)
|
|
-
|
|
|
Beeski has a good point.
But when you develop for the XBox you're using a version of DirectX, which isn't a cross platform API. Of course though studios already have that layered off.
C# does lock developers into a very narrow spectrum, and I can't image too many teams agreeing to this.
So I'll hang on to my compiler and keep my fingers crossed.
Beware of programmers who carry screwdrivers – XTalk
|
|
-
-
- (14898)
-
premium membership
MVP
-
Posts
8,343
|
|
r2d2:C# does lock developers into a very narrow spectrum, and I can't image too many teams agreeing to this.
Well, since C# can run on both Macs and Linux distros about the only thing it locks you out of is PS3 and Wii, and who cares?
Jim Perry - Microsoft XNA MVP If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job. Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki. Please mark posts as Answers or Good Feedback when appropriate.
|
|
-
-
- (268)
-
premium membership
-
Posts
116
|
|
Jim Perry:...about the only thing it locks you out of is PS3 and Wii, and who cares?
Well said, well said! :)
|
|
-
|
|
|
Jim are you saying that XNA GS currently runs on both Mac's and Linux' boxes?
The other two consoles that you mentioned are major players, and unless an organization had a block-buster hit for one of the three, I'd imagine that they would like to keep their options open.
When all is said and done. . .it is about revenue.
Beware of programmers who carry screwdrivers – XTalk
|
|
-
-
- (14642)
-
premium membership
Team XNA
-
Posts
9,309
|
|
r2d2:Jim are you saying that XNA GS currently runs on both Mac's and Linux' boxes?
No, he said C# which does run on those platforms using the Mono CLR. You could probably port the Mono CLR to the PS3 or Wii if you really wanted; it's all open source last I knew. Granted that would be quite a task...
|
|
-
-
- (14898)
-
premium membership
MVP
-
Posts
8,343
|
|
Nick Gravelyn: r2d2:Jim are you saying that XNA GS currently runs on both Mac's and Linux' boxes?
No, he said C# which does run on those platforms using the Mono CLR. You could probably port the Mono CLR to the PS3 or Wii if you really wanted; it's all open source last I knew. Granted that would be quite a task...
And I'd imagine there are other requirements if you want to sell games on those consoles.
Jim Perry - Microsoft XNA MVP If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job. Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki. Please mark posts as Answers or Good Feedback when appropriate.
|
|
-
-
- (20)
-
premium membership
-
Posts
8
|
|
BShields:Um... C++ isn't exactly cross-platform... at all.
A good engine will wrap around all the quirks of each platform and allow the game team to develop with a single set of tools.
Jim Perry:about the only thing it locks you out of is PS3 and Wii, and who cares?
Most of the developers currently building AAA games...?
|
|
-
-
- (14898)
-
premium membership
MVP
-
Posts
8,343
|
|
Beeski:Most of the developers currently building AAA games...?
And there's how many of them here? I'll give you one guess.
Jim Perry - Microsoft XNA MVP If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job. Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki. Please mark posts as Answers or Good Feedback when appropriate.
|
|
-
|
|
|
Isn't that the point.
IMHO, if XNA GS does not mature enough to create AAA then it will always be looked at as a novelty, or a learning tool.
When you develop with XNA GS it's an all or nothing deal. There is no amount of abstraction you can do to take sections to a different console. What are the chances that the other console manufacturers will adopt C# and the framework. History speaks volumes to this.
For people tying to make a living, it is about revenue streams. Approximately 80% of my living has centered around Microsoft, but even today there is a push for different platforms (Android, iPhone, etc.)
Let me finish with this - I love the idea of XNA GS, and I LOVE my XBOX(es), but for me to develop for the XBox is somewhat of a challenge because of my background. Like I have said, if it were C++/DirectX then I wouldn't be discussing this. . .lol
And no I don't have barrel of cash outback.
Beware of programmers who carry screwdrivers – XTalk
|
|
-
|
|
|
r2d2:IMHO, if XNA GS does not mature enough to create AAA then it will always be looked at as a novelty, or a learning tool.
Ignoring the casual games market is not something to be done light heartily…
r2d2:[…] if it were C++/DirectX then I wouldn't be discussing this
So it is C#/DX + some convenient wrappers. Big difference, esp. as DirectX is as much as a lock into MS technologies as C# is, which is available for the iPhone/iTouch and others…
We are boki. The rest is known. The not so known part of the rest: It is Björn or Bjoern, but never Bjorn. Twitter ~ Bnoerj ~ SharpSteer ~ SgtConker.com
|
|
-
-
- (14642)
-
premium membership
Team XNA
-
Posts
9,309
|
|
r2d2:IMHO, if XNA GS does not mature enough to create AAA then it will always be looked at as a novelty, or a learning tool.
That seems like an awful narrow view of the world. What about all of the XBLA segment? You can use XNA GS for those right now and make a professional game. Numerous studios already have. Just because you can't make the next Halo or GTA with XNA GS doesn't make it simply a novelty or learning tool.
But really I think it's kind of silly to debate this at this point. Obviously XNA GS could not be of AAA quality and performance a mere three years after it's first release. It will likely take a few more years for Microsoft to continue adding features and working performance before we'll really see where they are taking XNA GS. I like to think they're just getting started with managed code. Maybe their end all goal is simply for XBLA or maybe they do hope to get up to the AAA segment. Only time will tell.
|
|
-
|
|
|
@Bjoern - except that I routinely use DirectX, OpenGL (ES), and my own software rasterizer within the same codebase (Assembly, C, C++). Additionally I target multiple platforms with differing capabilities.
@Nick - it's not what I can do, but what I want to do.
I have a few teen-bop games that I am putting together for the purpose of developing a framework for bigger things, and with any luck generate some sort of revenue.
I consider myself the next target audience - I don't need to learn to program, and I don't need to learn about graphics - but I am interested in seeing if I can make a living with these tools.
Beware of programmers who carry screwdrivers – XTalk
|
|
-
-
- (14642)
-
premium membership
Team XNA
-
Posts
9,309
|
|
r2d2:@Nick - it's not what I can do, but what I want to do.
Fair enough, but that still doesn't mean XNA GS is a novelty or learning tool. That was my point. There are companies out there making money using XNA GS right now.
|
|
-
-
- (268)
-
premium membership
-
Posts
116
|
|
This is the last I'll say regarding this topic, hopefully. :)
r2d2, I understand completely where you're coming from. However...at the end of the day you're going to find people who balk at XNA and people who embrace it. The people who embrace it are likely going to dive in head first knowing the limitations and develop accordingly. And in the end, they win because they'll be shipping product. You may win somewhere else (iPhone, Android, Palm, Flash, etc), and that's great. But just like with XNA, you choose to develop for those platforms knowing what their limitations are.
As I've said before your concerns are perfectly valid. And at the end of the day you have to weigh what you want to do and which platforms you want to do it on. And if C# is just too much of a leap, then yeah, XNA GS probably isn't the place for you, for now. However, that very well could change in the future for reasons we've already touched upon (performance, large developer base, etc).
Good luck with your decision.
|
|
-
-
- (14898)
-
premium membership
MVP
-
Posts
8,343
|
|
r2d2:if XNA GS does not mature enough to create AAA
It's already mature enough to create AAA games, unless by "AAA" you mean "bleeding edge Rage-level". "AAA" is more than just that IMO (and I'll bet others' opinions as well).
Jim Perry - Microsoft XNA MVP If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job. Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki. Please mark posts as Answers or Good Feedback when appropriate.
|
|
|