Mitch Walker - MSFT

We've been combing the forums and the Connect database for bugs, feedback and suggestions around the application model. We still have a small amount of time to consider any other feedback you may have. So this is the thread that you post your latest likes or dislikes with Game, GameComponent, services, etc. Please scan the other threads before posting here, I'd like to just gather things that haven't already been discussed or reported elsewhere.

Thanks!




Re: XNA Framework Game and GameComponent Feedback

Matute

I think that the XNA Framework must include basic components, but useful, with the same philosophy that Windows forms.  

I believe that an necessary component is a SceneGraphComponent, is as basic as it is it the Form class for Windos Forms.

Matias






Re: XNA Framework Game and GameComponent Feedback

Matute

proposed components to include

MenuComponent
CameraComponent
RadarComponent (2D postion view of objects in 3D world)
TerrainRenderingComponent
StatusComponent (Display info)

and ..

SceneGraphComponent

Matias






Re: XNA Framework Game and GameComponent Feedback

Serapth

Of what I have seen and used of components sofar, I think the biggest need is going to be a "manditory component" option.

Perhaps I am thinking of components the wrong way, but I kinda viewed them as lego blocks used to build a game. Thing is with LEGO, you have tons of different blocks, but in the end they all just work. With components, if you want one component to use another component, you need to write code to make both components compatible. I know in essence, you cant really get around this.

However, my suggestion is to make some form of manditory component system, or I suppose a super component system. This way, someone can create a component that is actually a heirarchy of components. So if create a scene graph components, if I depend on a grid component and camera component someone else has written, I could either a) optimally create some form of compound component ( or package ) out of all the various components that are required. Or b) worse case, raise some kind of runtime response that X component is needed and perhaps information on how to acquire it.

I just think as more and more people develop components there are going to be more and more interdependancies and that needs to be addressed now.

Hope I made sense there.





Re: XNA Framework Game and GameComponent Feedback

thedo

One thing which i find rather strange is that the Game.Starting event seems to be raised after GameComponent.Start has been called. I only discovered this as i initialised the AudioEngine, SoundBank, etc in Game.Starting, but it was null in the Gamecomponent. Placing the Audio Initialise in the Game constructor fixed it, but it seemed like odd behaviour to me.

Neil






Re: XNA Framework Game and GameComponent Feedback

Keith Newton

I agree that XNA shipping with some pre-made components would be a great idea. Some of the things I think could potentially be helpful would be camera components such as first person, arcball, etc..., basic terrain rendering from a heightmap (I think I saw something similar to this in one of the XNA videos), a skybox/skydome, some basic primitives like cubes and spheres, a component for rendering text, and emitters. I think many people who are trying to learn 3d programming just want to have a very simple 3d world that they can get running without too much hassle and play around with. The starter kits XNA will ship with may be a bit too daunting at first for some people who are beginners and these components could present an acceptable alternative. These components could even be attractive for more experienced developers who just want to quickly prototype something and are trying XNA for the first time.





Re: XNA Framework Game and GameComponent Feedback

Matute


Definitively is correct. Something that I believe that is also necessary is that the components include designers and wizards of configuration, much more intuitive that PropertyBox.




Re: XNA Framework Game and GameComponent Feedback

Amadrias

Hi all,

I already submitted in some previous threads what I think about the XNA Game Application Model. In summary: it is really good but it lacks a tree or node system.

I did propose some conceptual designs but I think Microsoft has just provided us, .Net developers, the best one I ever saw for another product: Windows Presentation Framework!

I recently installed Windows Vista RC1 as I will be developping for the .Net 3.0 in a short time (professionally, I mean) and I also bought the excellent "Application=Code + XAML" Charles Petzold book explaining in a step by step approach the Windows Presentation Framework.

WPF comes with a really interesting concept of Routed Events that get through a Visual and Logical tree of "elements" that you could understand as Windows Form Controls (sort of). These Routed Events provide a managed way to raise events over multiple controls either from the root element to the leafs (the Window to the single Label element stored in a Button) or from one leaf to the root.

This allows every element to capture events and react on them and either let the routed event follow its path to the tree or stopping it because you consider the event has no reason to be handled by other elements.

Really, this design would perfectly fit, in my sense, to the XNA Application Model and would provide us with an easy while controlled way of handling Update() and Render() calls (have a look on the MeasureOverride and ArrangeOverride methods in FrameworkElements XNA architects).

I know this would mean a lot of work on the XNA framework and with the timeframe Microsoft has until a full release, it seems obvious to me that moving into such design can't be achievable (requiring too many deep changes in the core of the XNA), however, I think you should try to get closer to the WPF team in Microsoft and gain from their approach for some higher level patterns.

My 2 cents.





Re: XNA Framework Game and GameComponent Feedback

Matute

I believe that patterns of standard applications can be reused in games applications, but I believe that all standard patterns is not good or useful to make games, I believe that a handling of the nodes based exclusively on events can have a bad performance.

I believe that the ideal is to obtain a standard architecture of 3D engine, but based on components.
This article has some interesting ideas on the matter

http://www.thehazymind.com/archives/2006/09/scene_graph_and.htm

But I believe that the XNA Team would have to propose their solution.






Re: XNA Framework Game and GameComponent Feedback

EvilOneSD

I'm against the GameComponent stuff. I just don't see the point in this. This is high level logic, that is application dependent and surely don't have to be in the core libraries. I even don't see the point in adding my the graphics device to the game components...

If we have to live with the game components in the future, I don't think it's a really good idea, to add some "default components" and bloat the library with them. There are enough websites out there where components can be added/downloaded. This just don't belong into the core.








Re: XNA Framework Game and GameComponent Feedback

AndyL

EvilOneSD wrote:
I'm against the GameComponent stuff. I just don't see the point in this. This is high level logic, that is application dependent and surely don't have to be in the core libraries. I even don't see the point in adding my the graphics device to the game components...

If we have to live with the game components in the future, I don't think it's a really good idea, to add some "default components" and bloat the library with them. There are enough websites out there where components can be added/downloaded. This just don't belong into the core.

Hear hear.

It seems to me the whole component idea is half baked at the moment, and shouldn't be released until it is properly figured out and working in a full size game (if that ever happens). This kind of over-simplistic model rarely cuts it in the real world.





Re: XNA Framework Game and GameComponent Feedback

Matute

Let us take the example from ASP - Asp.Net, before were not used components, now that exist components that application of the real world does not use them




Re: XNA Framework Game and GameComponent Feedback

AndyL

Matute wrote:
Let us take the example from ASP - Asp.Net, before were not used components, now that exist components that application of the real world does not use them

Apples and oranges - one has a simple and well defined problem domain (HTML), the other does not. That makes it hard to do properly.





Re: XNA Framework Game and GameComponent Feedback

Matute

May be ..




Re: XNA Framework Game and GameComponent Feedback

Shildrak

I think Serapth state a very important concern about components, as they need a way to state their dependencies. I had a suggestion up on connect that the xna team should remove the Game property from GameComponent class, and advice developers to inject dependencies explicitly. This would at least demand game components to declare their dependencies instead of just hoping necessary components have been installed and initialized in a specific more or less unknown sequence.

link to suggestion on connect: https://connect.microsoft.com/feedback/ViewFeedback.aspx FeedbackID=200827&SiteID=226

I am also in the camp with a nagging feeling that the game component concept feels half baked. Don't get me wrong, its very easy to use and implement, and probably great to lure new developers in to xna, but they have not been practical for me when there are interdependencies. They are also hard to test in isolation due to the tight coupling to Game (though I realize most probably dont care about tdd and unit tests).