Question

Dec 11, 2007 at 12:02 AM
I would like to contribute. I have a fairly strong base in C# and have been learning graphics now for quite some time. However this would be the first time I have ever contributed to an open source project so it's all fairly new, I downloaded the latest change set and got it compiling which is good. I would like to help in any way possible even if it's cleaning up or reviewing code or expanding on the example game, etc. I don't know how much help I would be to the actual engine but I'll try whatever you guys say. So let me know.
Coordinator
Dec 11, 2007 at 12:27 AM
Graphics is something Shaw is currently working on, however I know he is also interested in Physics, he may want to split his work up, or he may not, I'm not sure. There are certainly things we need help with. You can look through the issues in the Issue Tracker section, anything unassigned needs to be worked on. You could pick one you're interested in and ask a few questions about it, play around with it a little bit.
Dec 11, 2007 at 12:58 AM
If there's something specific you want to work on, just let us know and we'll try to match you up with the right person.
Dec 11, 2007 at 1:32 AM
Well, I can work on just about anything, I am really interested in Terrain and graphics in general, but I really don't have any specific area that I really want to work on. I can try anything but I think that they will be small things at first until I get the hang of it. I just got cvs working and it downloaded but for some reason it dosn't find the content folder on my computer, I have to figure that out or I will always have to be going around manually changing where to look for the content at. I am not sure why it would find it on your computers and not on mine...oh well, I will look through the issues posts and pick something small and simple to get my feet wet with.
Dec 11, 2007 at 1:51 AM
Are you referring to the missing font file? If so, that's an issue with LordIkon's last commit. It'll be fixed soon. If not, can you elaborate on the problem? What error messages are you getting?
Dec 11, 2007 at 2:58 AM
No(although the error it gives me is with not being able to find the ComicSansMS font file). The error is that it isn't finding the Content Folder for some reason. So any line that loads something from the content folder throws an error.
Dec 11, 2007 at 3:01 AM
Are you using VS Pro? I haven't tested the project files with Express.
Dec 11, 2007 at 3:14 AM
No I am using Express. I got it to work by just downloading the source and changeing the path, but now that isn't working either. I am gonna keep playing with it until I get it figured out.
Dec 11, 2007 at 2:25 PM
I finally figured it out. Took some tough debugging on my part ; ) but the problem was that the output target for the C# express prototype project was in the target/i386 folder and there is no content folder there. Is there any way we can fix this so that I don't have to keep changing it manually?
Coordinator
Dec 11, 2007 at 2:28 PM


Taliesen wrote:
I finally figured it out. Took some tough debugging on my part ; ) but the problem was that the output target for the C# express prototype project was in the target/i386 folder and there is no content folder there. Is there any way we can fix this so that I don't have to keep changing it manually?


If you've fixed it you can upload a patch of your changes, and we run the patch and if everything works ok then we apply the patch and everything is fixed. See the patches section inside the source code section for details.
Dec 11, 2007 at 2:49 PM
I am not sure how to upload a folder...since I didn't change any files I just put the content folder into the target/i386 folder. I am not sure how to do that in here...
Dec 11, 2007 at 2:58 PM
are you building the solution from inside the Visual studio? Or cna you use the Build Environment?
Dec 11, 2007 at 3:01 PM
I build it inside C# express.
Dec 11, 2007 at 3:02 PM
Ok, I'lll investigate a way of making sure it gets deployed as well, when you build the solution.
Dec 11, 2007 at 3:47 PM
Wait, are you referring to the old prototype code? I only see references to the i386 directory in the prototype code. The new framework code is in framework/code, and the solution file is QuickStart_Windows.sln in the source tree root.
Dec 11, 2007 at 4:13 PM
Just so you know, I use express and am having no trouble with the latest build, save the missing font file.
Coordinator
Dec 11, 2007 at 4:19 PM
Missing font file was fixed last night, just do an update of your source.

'cpc update' should cover it.


mikelid109 wrote:
Just so you know, I use express and am having no trouble with the latest build, save the missing font file.

Dec 11, 2007 at 4:34 PM
All done, error gone. I get an unreachable code warning. Is his known?

Still geting to grips with diffmerge, it deleted my changes :(
Coordinator
Dec 11, 2007 at 4:37 PM
Unreachable code will happen when you do things like

if ( const bool ) ? true : false;

Because on a const value, only one value can be reached. However that statement may only be temporary, a lot of that file is part of the config file discussion.
Dec 11, 2007 at 4:39 PM

mikelid109 wrote:
Still geting to grips with diffmerge, it deleted my changes :(

DiffMerge does a 3 tier merge, this might confuse, I can look into setting it up to be default 2 tier merge.
Dec 11, 2007 at 5:07 PM
Thats the excat line Ikon.

Whatevers easiest Sturm. Ill look into it as I really should learn how to do a 3 tier merge. I just folishly assumed double clcking conflicted in cpc gui and oking everything would do it ;)
Dec 12, 2007 at 2:11 PM
So I have been compiling the wrong version!!! Dammit. New problem though, when I try and run the correct one aka QuickStart_Windows.sln it says that it cannot be opened because that project type is not supported by this instalation(of VS express) I am really not sure what to do.
Dec 12, 2007 at 2:14 PM
I might know what it is. Do you have to have the 2.0Beta of XNA installed to open it? Because I thought I had installed it but I was wrong, I am installing it now. We will see if that solves the problem.
Coordinator
Dec 12, 2007 at 2:16 PM
Try the one under framework/code/common, see if that works. I haven't been using VSExpress with XNA 2.0, so I don't even know if we have a VSExpress solution, if not we'll have to make one.
Dec 12, 2007 at 3:04 PM
I am and it works fine. The latest update has no problems with Express. I think it is the 2.0 at fault as I get a similair error when I load old 1.0 code.
Dec 12, 2007 at 3:11 PM
YUP! That was the problem, 2.0 up and running and the real project loaded just fine.
Dec 12, 2007 at 3:21 PM
sorry for being such a noob. But what program do you guys use to apply patches, svn etc. Because I am using tortoiseSVN and it does not allow me to apply the patch that I downloaded from here.
Coordinator
Dec 12, 2007 at 3:52 PM
I use cpc. You put the patch in the root directory of the project and type: cpc applypatch patchname.patch, or something along those lines
Dec 12, 2007 at 4:14 PM
When I try and patch my code I get an Unhandled exception:

System.NullReferenceException: Object Reference not set to an instance of an object.
at CodePlex.TfsLibrary.PatchEngine.ApplyPatch(String directory, String patchXML, SourceItemCallback callback)

Any ideas?

my command was cpc applypatch GraphicsUpdate.patch
Dec 12, 2007 at 4:32 PM
Did you checkout with cpc or tortoise? If i get an error, i delete the project and re-checkout. Youd be suprised how often it works ;)
Coordinator
Dec 12, 2007 at 4:41 PM


mikelid109 wrote:
Did you checkout with cpc or tortoise? If i get an error, i delete the project and re-checkout. Youd be suprised how often it works ;)


Try these steps:
  • Create a new directory
  • In cmd prompt go to that directory
  • type 'cpc checkout quickstartengine' and wait to finish
  • type 'cpc update' and you should get no changes
  • paste the patch into the root of your new directory
  • type 'cpc applypatch Graphics.patch' and it should succeed.
  • re-compile and run the program
Dec 12, 2007 at 5:24 PM
It worked. Thanks. Tortoise sucks! ; )
Dec 12, 2007 at 5:34 PM
I find TortoiseSVN to be a much better utility than cpc. The problem is CodePlex is not SVN, it's Microsoft's Team Foundation Server. That's why you can't use TortoiseSVN. ;)
Coordinator
Dec 15, 2007 at 1:30 AM
Do you think we scared him off? Heheh, the project is pretty scary at this point, I'd hate to be jumping in right now. Of course in a few weeks I'm sure we'll have something decent ironed out.
Coordinator
Dec 15, 2007 at 1:32 AM
Holy crap, what are the chances he would post in another thread at the exact same time? :oP

Its like putting a coin in a wishing fountain. While I'm at it....:

Do you think I'll get a Ferrari for christmas.....?
Dec 15, 2007 at 1:34 AM
Nope I'm still here. You are right the project is a little scary. And I don't really see where I could be the best help at. I think at the time being, unless someone has something specific that they need help with(since I am much more comfortable taking orders than taking initiative) I am going to wait, study, and play with what you guys are doing so that later on when it is more stable and together I can be more help. Again, I am more than willing to help in any way I can right now, I just really wouldn't know where to begin unless someone told me since this is my first time on a colaborative project.
Coordinator
Dec 15, 2007 at 1:37 AM
The biggest thing that we haven't started yet that I see coming up is a scene/level editor. It will require us setting up windows forms into XNA,which doesn't support it by default. However there are projects out there where people have gotten it working out. It will also require saving and loading, which is an issue being discussed right now (Storage and I/O). It'll also require that most of the engine be running within the editor, as we'll need to display terrain, models, and such. It'll require we setup triangle picking, ray casting. It'll require common features to most windows programs, but that we'll have to code ourselves. Like cut and paste. If you cut a model, you want all of its info onto a "clipboard", and when you paste you'd have to copy that info into a new model pasted where you desired. You have to setup timing for double click I believe, little things you'd never imagine having to do from scratch.
Dec 15, 2007 at 1:38 AM
Weird. Hehe. Thank you for the concern though. And yes, you will get a Ferrari, do you like hot wheels?
Coordinator
Dec 15, 2007 at 1:43 AM
If we're talking about hot wheels I'd rather have the hot wheel scooter that a lot of the guys at work scoot around the building with.
Dec 15, 2007 at 2:16 AM
Alright, I can research that. Some of those things I won't be able to do for lack of knowledge/experience but I am sure once I get it going that some of the more complicated things will be resolved.
Dec 15, 2007 at 2:26 AM
There are two scenarios when talking editors, in-game and ex-game and LordIkon opted for a ex-game editor (as we could start working on this before the engine was ready). When woking with a ex-game editor where will be requirements to the game, lige how to get the scene or the currently selected entity etc.

Have a look at GUI Editor which contains the source for an editor using xna.
Dec 15, 2007 at 2:30 AM
Edited Dec 15, 2007 at 2:31 AM
Also have a look at http://www.visual3d.net and have a look at CryENGINE™ 2 engine which is really hot atm (http://www.crytek.com/technology/cryengine-2/screenshots)
Dec 15, 2007 at 2:41 AM
Oh c'mon, CryENGINE2? I have faith in this project, but... ;)

Screw the hot wheel scooter, the coolest thing I've ever seen was a motorized couch driving around!
Dec 15, 2007 at 3:00 AM
Alright, I am going to start on this. The code in the GUIEditor post will help out a lot, my first order of business is trying to render the same scene that is currently in the graphics engine into the windows forms engine...wish me luck. After that I will work on loading and unloading models and start developing a custom scene file format, which I think I will use xml on, if anyone has any objections to this let me know.
Dec 15, 2007 at 3:10 AM
I found some more editor alternatives over at GameDev.net which might serve as inspiration:
http://www.gamedev.net/community/forums/topic.asp?topic_id=469251
http://www.gamedev.net/community/forums/topic.asp?topic_id=466088
http://www.gamedev.net/community/forums/topic.asp?topic_id=453709
http://www.gamedev.net/community/forums/topic.asp?topic_id=452683
http://www.gamedev.net/community/forums/topic.asp?topic_id=449620
http://www.gamedev.net/community/forums/topic.asp?topic_id=448278

Be aware that the code in the post is neither 2.0 nor any of our code, so you will need to create your own project from scratch and implement our engine into it. But it might serve as a base to see how it could be done.

Also consider using WPF and have a look at Microsoft Expression Blend as it's very good for creating/prototyping UI.
Dec 15, 2007 at 3:13 AM

Taliesen wrote:
After that I will work on loading and unloading models and start developing a custom scene file format, which I think I will use xml on, if anyone has any objections to this let me know.

We discuss that over at IDisposeable and ISerializeable feel free to hijack that thread and post comments regarding serializing the scene.
Dec 15, 2007 at 3:27 AM
I have worked with ISerializeable before. It works very well. I almost have the engine rendering correctly, just a few more glitches to work out.
Coordinator
Dec 15, 2007 at 4:32 AM
I'm ok with an in-game/in-engine editor. It could run off the same core engine, but could be its own project, like the sample game is right now. It would need to be inside of a windows form window though, I'm not sure if the engine could simply be put into it without changing the engine itself. It's silly to re-write the engine into another project just to get a window and some other stuff.
Dec 15, 2007 at 4:47 AM
In-engine would be good, but my vote would be for an out-of-game editor, as a separate application. It'll just give you so much more GUI freedom, and prevent us from having to completely roll our own GUI.

I'm not sure if it makes sense to embed Game in a WinForm though. It'd give us more freedom if a custom GraphicsDevice is created and used outside of the Game framework. How we integrate the rest of the systems, I don't know yet. I need to give that some more though.
Coordinator
Dec 15, 2007 at 6:08 AM
Well if we don't imbed game into a winform we'd have to create our own gui right? I only worked with C++ .net for a few weeks, so I'm super newb at it. Forgive my newbness on the topic.
Dec 15, 2007 at 6:15 AM
I mean don't embed the actual Game instance inside of a WinForm. Create a custom GraphicsDevice on a WinForm Panel and use that.
Dec 15, 2007 at 5:47 PM
WOOT! I got it rendering the graphics teaser. The only thing that didn't work, and I don't know why because all it said was that it was an unhandled exception, was the spotlight. I had to remove it to get it to render. If you have any ideas as to why the spotlight wouldn't work I'd love to hear them. Apart from that I have it rendering. My fps however, on the lowest graphics setting is between 30 and 40 fps which seems to be extremely low for just rendering a model and rotating it. If there is something else the teaser is doing that I am missing I would love to know as well. anyways I am going to start on loading models and adding them to the scene. I also need to work on lights. I need to provide a way to define lights in the editor.
Dec 15, 2007 at 5:53 PM
Did you get the editor to work?? Or is it something completely different you are talking about. If it's the editor do post a screenshot :)
Dec 15, 2007 at 5:57 PM
Nice work! I'd love to see a patch of it.

I wouldn't spend too much time interfacing with the graphics system. In the Terrain thread we're discussing some fairly serious changes.
Dec 15, 2007 at 6:00 PM
alright, quick question. Do you guys want the editor to be able to handle one or multiple scenes at a time. For instance I could have a Load world command, and worlds would have an add scene command. You could only manipulate one scene at a time but it would allow you to quickly switch between scenes in a world. Then, the engine would have to have a load world funcion. I imagine that a world would be a part of the scene manager. Unless the scene manager is the proverbial "world" in which case my point is moot...:S Let me know.
Dec 15, 2007 at 6:13 PM
I posted a screenshot.

http://www.codeplex.com/QuickStartEngine/WorkItem/View.aspx?WorkItemId=4111

Dec 15, 2007 at 6:14 PM
The way I understand LordIkon and Sturm's take on the scene layout, "SceneManager = World" and "Scene = Cell/Block/Piece."

Let the editor be aware that a world has multiple scenes (I don't like that terminology, calling a world cell a scene. Its not an independent entity, its part of a larger "scene." But I digress), but only have one scene open at any one time. It would just be an unnecessary complication and a drain on resources to allow having multiple cells open at once.
Dec 15, 2007 at 6:15 PM
Looking great!
Dec 15, 2007 at 6:26 PM
Thanks. Alright then, I will have a scenemanager from which I will pull all of the info that goes into the panel on the right. Then you will be able to right click on each node(lights, effects, etc) and choose add. Also you will be able to right click on any specific light for instance and change its properties. I might even be able to let you edit an effects file from within the editor save it and reload it.
Dec 15, 2007 at 7:14 PM
Alright, I got the spotlight working, but now the two models are rendered twice. One of the ship models rotates the other one dosn't. I can't find any duplication in my code anywhere. And I can't find any reason as to why this would happen. Actually, I don't even know why the spotlight didn't work, I was going to try and fix it so I turned it back on to start debugging and it worked. IT'S A MIRACLE!!!!! Anyways. I will start working on a making scene and scenemanager iserializable so I can get them saving and loading.
Dec 15, 2007 at 7:18 PM
Are you changing the display settings at any point? You can get a duplicate render queue if LoadContent is called multiple times (like when a graphics device is reset). That should have been fixed in the more recent change set though.

Any chance you could upload a quick patch? I'd like to take a look at the editor, and see if I can spot the graphics issues.
Dec 15, 2007 at 7:28 PM
Two problems. I can't get the new patches applied again...it gives me a different error then before: error: Won't clobber writable <file>.
That happens why I try to apply both of the latest patches that are up.

Second problem is...I don't know how to create a patch. :S

It is very possible that I am recreating the graphics device when I resize the screen etc. Could that cause the duplicate render queue?
Dec 15, 2007 at 7:38 PM
I'm not talking about the latest patches, I'm talking about the latest change set. Running "cpc update" doesn't work?

To create a patch, type "cpc makepatch <patchfile>" That'll create a patch file named <patchfile> which is a patch that can be applied to change set associated with your local copy.
Dec 15, 2007 at 7:51 PM
Hehe, I tried to run update but is says that various of my files are already in a conflicted state...Not sure what I did or what that means but it wont let me update.

Once I create the patchfile I can add whatever files I want to it? Or what does the patchfile actually contain?
Dec 15, 2007 at 8:00 PM
If you dont have a custom merge utility set up, then open the shortcut to Sturm's build environment. There should be a setup.cmd file in the root that you can run to put a shortcut on your desktop or something like that. I've never used it. When you run the build environment shortcut, you should be dumped at a command prompt. Type "cpc status /gui" For all conflicted files, right-click on them and select "Merge..." This will open up DiffMerge (I think that's what Sturm has set up), and allow you to resolve the conflicts between file versions. Once all of the conflicts are merged. Run "cpc update" to grab the latest sources. If any conflicts arise, go back to "cpc status /gui" and merge the new conflicts. Now, in the same "cpc status /gui" window, for all "Unversioned" files that should be a part of your patch (i.e. all new *.cs files, content files, and *.csproj files), right-click and select "Add". After, close out and type "cpc makepatch <patchfile>." That should create a patch file for all of your changes.
Dec 15, 2007 at 8:30 PM
Yes running setup from the root will create a desktop shortcut you can use to open the BE. You won't have to write "/gui" as gui is the default interface in BE. It uses DiffMerge, which allows 3 tier merge so be a little careful when using it.

I you need help just say so, and if you think something needs to change inside BE let me know (There is a thread for it :) )
Dec 15, 2007 at 8:54 PM
Well, it says that there is no merge tool configured, I clicked yes but I dont understand anything that the help page says...any help here? I am working on the functionality of adding and removing scenes to the world. It is working so far but I think that I will need a default SceneManager which dosn't render anything in it for when the program starts up. I can then work on loading scenes.
Dec 15, 2007 at 9:23 PM
did you run setup and are you using the shortcut created on the desktop? Everything should be set up just fine.
Coordinator
Dec 15, 2007 at 10:13 PM
The shortcut on the desktop is not working. I get an error when it tries to open the path to the engine folder. It stops halfway through the visual studio folder name, at "C:\...\...\Visual" is not recognized....etc...blah blah blah
Dec 15, 2007 at 10:20 PM
OK, I'm looking into that, can you create a issue for that?
Dec 15, 2007 at 10:34 PM
Isn't this the same "no spaces in path to QuickStart folder" issue?
Dec 15, 2007 at 10:42 PM
Do you have spaces in your path to the quickstart folder?
Dec 15, 2007 at 10:48 PM
I don't, but from his response: "C:\...\...\Visual is not recognized," I'm guessing he does. That seems like it should be Visual Studio Projects or something similar.
Coordinator
Dec 15, 2007 at 11:20 PM
Yes, I have a folder called Visual Studio 2005, and my quickstart engine folder has a space as well.
Coordinator
Dec 15, 2007 at 11:26 PM
Issue created.
Dec 15, 2007 at 11:47 PM

Sturm wrote:
did you run setup and are you using the shortcut created on the desktop? Everything should be set up just fine.



Yes I did. Yes I am. Nope, it isn't. I went through the steps that Ikon put 1 by 1 and that is what happened. Unless he missed a step...I am stumped.
Dec 15, 2007 at 11:57 PM
When you open BE using the shortcut on the desktop you should get something like this:

---------------------------------------------------------
QuickStart:BE - QuickStart Engine Build Environment
Version: 0.0.0.2a
 
QuickStart:BE compiled by Sturm (sturm.denmark@yahoo.com)
---------------------------------------------------------
 
 
C:\Development\QuickStart> 
Is that correct?
Dec 16, 2007 at 12:25 AM
Nope. That must be the problem. When I run the shortcut, it fails to load something then takes me to the correct folder. So I assume what it is failling to load is the BE. Alright then, figured that one out. On to the other discussion board for a solution. Just so you guys know, I usually only have time to work on this project while I'm at work(I own an english school so I get to do just about anything I want there ;) In other words on weekdays I have lots of free time but on weekends I do not have my main computer with me so I am less active on the developing side of things. Just as background I live in mexico and own an english school and go to college for computer engineering. I am on a 2 month break from school right now, and with the holidays I hope to have lots of time to develop this world editor I am working on.
Coordinator
Dec 16, 2007 at 2:43 AM
Mexicans in Mexico that want to learn English, and Mexicans in America that want us to teach school in Spanish. Anyone see the irony in that. Sorry, I live in Colorado, 3rd highest destination for illegal immigrants from Mexico :op. Anyway, I found that a decent laptop upped my productivity quite a bit. I always have my work with me, and I can work on anything, anywhere.
Dec 16, 2007 at 3:30 AM
Yeah. Feel like chipping in to the Buy Jesse a Laptop Fund?!?!? Hehe. And I totally here you about the immigrants in mexico who don't wanna learn english. But It's because of the type of mexican that normally immigrates to America, they are from the lower third of society, normally extremely poor from little towns in the country. I live in Mexico City where everyone wants to learn english and many speak it fairly well already.
Coordinator
Dec 16, 2007 at 3:44 AM
I'll get right on that, sometime after my student loans are paid off, hit me up in about 20 years....
Dec 16, 2007 at 7:12 PM
Awesome work on the editor. Ill look forawrd to seeing the final build!
Dec 16, 2007 at 10:49 PM

LordIkon wrote:
I'll get right on that, sometime after my student loans are paid off, hit me up in about 20 years....


Thats why I go to school here in Mexico. I pay about 30 bucks a year.


mikelid109 wrote:
Awesome work on the editor. Ill look forawrd to seeing the final build!

Hehe, the final build is a ways off, I am just getting the non graphical aspects and framework in place until the graphics system discussion is concluded. I am hoping soon so that I can work on creating scenes, adding things to scenes, saving and loading scenes, etc. Starting monday the hard work starts. As of right now I have the tree heiarchy working, I changed it to have World as the root node and any number of scenes with their own set of models, textures, effects, etc. Theoretically then you could load a world file and edit any of it´s scenes or load/create a single scene file and edit it. It would allow you to add a scene to a world, take scenes out of a world and save a world or a scene file when you are done. I would like the power to have the engine in the end say "load world <world name>" and have it take care of the loading of all of the scenes and entities within them. But we could also have the engine just load a single scene outside of any world. Let me know what you guys think of this. I am not looking forward to implementing picking and stuff like that and I am 100% positive that when I get around to uploading my first patch for you guys to try out you will all rethink letting me join the project! :D Well maybe not but you will have plenty of corrections I am sure and ways to do things better.
Coordinator
Dec 17, 2007 at 3:13 AM


Taliesen wrote:

I'll get right on that, sometime after my student loans are paid off, hit me up in about 20 years....


Seriously, then you can afford to by me a new computer.
Dec 18, 2007 at 8:16 PM
Alright a little bit of an update. Still working on the basic interface and stuff like that, no real functionality yet. I am adding in all of the property tags and stuff like that for use in the property grid so that it is very intuitive. I spent 2 days getting an extra laptop with a busted screen updated with xna and .net framework and everything only to find out that the gay video card in this laptop dosn't support shader model 1.1. I was pretty pissed, guess I should have checked that before hand, oh well. So all of my developing over the holidays will be on days when I can get away from family to go to work ;) Helps being the owner of the business and everything hehe. I am thinking about a few things I need to know that I am not quite sure on. Will a scene have materials applied to it or only models? Will models have effects applied? If someone could mock up a list of all of the categories of things that would exist in a scene like this but what you guys want/need:

Scene
-Models
-textures
-materials
-Effects
-Terrain
-textures
-Lights

But a complete one so that I can get the UI working well before I actually put any functionality to it. You will be able to right click on scene and add any one of those things plus change scene properties like indoor and outdoor which could be used to optimize it(using bsp instead of quadtree) from the engine side of things. You will be able to right click on models for instance and say add model, then each model will have their own textures and materials list and you will be able to add, remove, set model properties choose textures, etc. Let me know what you guys think and if someone could mock up how they would want that, it would be great. Thanks.
Dec 18, 2007 at 8:31 PM
I'm still working on the graphics rework, so it'll be a little while before I can give a solid, complete answer. Also, you'll have to wait for LordIkon's response for the scene manager/entity-specific design. I can only speak for the graphics side of things. What I can tell you right now is that materials and scenes are separate. A scene can have drawable nodes (models, terrain chunks, etc.), which reference materials. It would essentially be something like:

SceneRoot -> ... -> Player -> Model -> Material
or
SceneRoot -> Terrain -> QuadTree (leaf) -> Material

Lights are just another type of scene node, placed into the scene and handled specially by the graphics system.

Textures and effects belong to materials, which are defined in an XML format. There may be effects defined outside of the material system such as post-process effects, but I may end up implementing them as a special kind of material.

Now, for caching purposes, a scene can contain a list of used materials that can all be preloaded when loading the scene. Then, each material could reference an existing list of textures and an existing list of effects. That's more or less up to you and how you want to handle it in the editor.
Coordinator
Dec 18, 2007 at 9:13 PM
Edited Dec 18, 2007 at 9:14 PM
I'm too busy (at work) to make a whole list now, but I can list off some things from the top of my head:

  • Scene
    • Entities
      • Particle emitters (including weather generators)
      • Lights
      • Sound emitters
      • Spawn points
      • Trigger zones (3D bounding regions, most likely boxes, but possibly not axis-aligned)
      • Skydomes, boxes, and planes
      • Water plane(s)
      • Pathfinding nodes
      • (Entity properties)
        • Models
          • Materials
        • Position
        • Rotation
        • Scale
    • (Scene properties)
      • Gravity
      • Wind
      • Shader effects (atmospheric light scattering)
Dec 18, 2007 at 9:43 PM
I think LordIkon has a good starting point, also have a look at other engines (Visual3D.Net/Torque/C4 Engine/Ogre/Etc) as they (at least some) also have development environments.
Dec 18, 2007 at 10:47 PM

LordIkon wrote:
I'm too busy (at work) to make a whole list now, but I can list off some things from the top of my head:

  • Scene
    • Entities
      • Particle emitters (including weather generators)
      • Lights
      • Sound emitters
      • Spawn points
      • Trigger zones (3D bounding regions, most likely boxes, but possibly not axis-aligned)
      • Skydomes, boxes, and planes
      • Water plane(s)
      • Pathfinding nodes
      • (Entity properties)
        • Models
          • Materials
        • Position
        • Rotation
        • Scale
    • (Scene properties)
      • Gravity
      • Wind
      • Shader effects (atmospheric light scattering)




Alright, first off thank you, that helps a lot. A few clarifications, it seems to be missing an actor entity, or just a plain entity, you have types of entities but a scene would contain a particle emitter, an entity would not. Unless I am misunderstanding obviously. I was thinking:

*Scene
**Entities
**Particle Emitters
**Lights
**Sound Emitters
**Spawn points
**Trigger Zones
**Skydomes, boxes, and planes
**Water plane(s)
**Pathfinding nodes(no idea how to implement them by the way ;) )
***(Properties would be handled by right clicking on each specific entity and selecting properties, for entities and scenes)


Why? Because particle emitters normally don't have models, neither do sound emitters. They might be able to be attached to another entity, so I would give them a "Parent" field in their property settings to allow for that. It would then automatically set position for instance. I will get right on setting this up. Again thank you for your ideas, and if anyone has any more ideas don't hesitate to give them.



Shawn, can an entity reference multiple materials or just one? Thanks for the crashcourse, it was helpful.
Coordinator
Dec 18, 2007 at 10:51 PM
The StaticEntity class will likely be the class that does not require a model, or rendering. I've actually put comments to this effect in the code. I believe entities with models will inherit from StaticEntity, and then (optionally) they'll have an physics model, or actor.

Particle emitters, sound emitters, would be things that would be static entities.

Of course, this hasn't been fully designed, this is just my initial thoughts on the matter.
Dec 18, 2007 at 10:56 PM

Taliesen wrote:
Alright, first off thank you, that helps a lot. A few clarifications, it seems to be missing an actor entity, or just a plain entity, you have types of entities but a scene would contain a particle emitter, an entity would not. Unless I am misunderstanding obviously. I was thinking:

EDIT: There has to be a space between star and the first letter
  • Scene
    • Entities
    • Particle Emitters
    • Lights
    • Sound Emitters
    • Spawn points
    • Trigger Zones
    • Skydomes, boxes, and planes
    • Water plane(s)
    • Pathfinding nodes(no idea how to implement them by the way ;) )


Why? Because particle emitters normally don't have models, neither do sound emitters. They might be able to be attached to another entity, so I would give them a "Parent" field in their property settings to allow for that. It would then automatically set position for instance. I will get right on setting this up. Again thank you for your ideas, and if anyone has any more ideas don't hesitate to give them.


Well anything in a scene is a Entity, Sky/Spawn/Water plane, this also means that anything could be attached to anything. You could mount a particle emitter on a water plane or on the head of a model. I think your scene graph looks good enough to begin with. Just make sure it's easy to load new node definitions, i.e. a dev could create a new assembly create his own node definition put it in the bin folder and next time the editor starts that definition would be part of the graph.


Taliesen wrote:
      • (Properties would be handled by right clicking on each specific entity and selecting properties, for entities and scenes)


There should be a property window, similar to the one in VS, which should just show the properties for the currently selected entity.
Dec 19, 2007 at 12:12 AM

Sturm wrote:
Well anything in a scene is a Entity, Sky/Spawn/Water plane, this also means that anything could be attached to anything. You could mount a particle emitter on a water plane or on the head of a model. I think your scene graph looks good enough to begin with. Just make sure it's easy to load new node definitions, i.e. a dev could create a new assembly create his own node definition put it in the bin folder and next time the editor starts that definition would be part of the graph.


I realize that anything in the scene is an entity, my point was that not all entities contain models, only specific ones do which means there should be a seperate node for entities which contain models(actors, buildings, trees, etc.). I am not sure what you mean by: a dev could create a new assembly create his own node definition put it in the bin folder and next time the editor starts that definition would be part of the graph. I am assuming by that you mean that nodes should not be hard coded, that I should load in the possible nodes from some sort of editable config file? Maybe an xml config file that is loaded on editor startup? Possible, and would be more flexible, the only problem is that there is no way for me to program properties and menus for dynamic nodes that were not planned.



Sturm wrote:
There should be a property window, similar to the one in VS, which should just show the properties for the currently selected entity.


Yup, it's called the property grid. I will be going through all of the necesary classes in the engine and putting the necesary flags and properties in each one to be sure that they work. Once I get this stupid patch thing worked out and can upload my changes you will be able to see an example of what I mean and you would all be welcome to start putting those flags as you go along so that they load automatically into the property grid. Anyways that is for later, right now I still can't figure out how to do a patch because it keeps giving me an error, so I am re-downloading the source and I will be reapplying all of my additions(slow process) and trying it again. Let's hope it works this time. If it works expect a patch from me tonight or tomorrow.