I'll make it work with the configuration data so that you basically only get it once based upon version ID (new version means config dialog shows again)
Printable View
I'll make it work with the configuration data so that you basically only get it once based upon version ID (new version means config dialog shows again)
Right, that will work.
frmSettings must be the start-up form, or the form to show before AgrDX is used.
If settings exist, it will load and init AgrDX.
If the settings must be re-entered, the main menu will have an options>renderer button.
It will then pause the main menu loop, unload AgrDX and show frmSettings again. Once frmSettings reinits AgrDX (the pause in the main menu loop is while AgrDXInit=False), frmSettings.visible=false and re-init the graphics.
Also, we should have a seperate sub to load the graphics (meshes,textures,terrain). So every time AgrDX is reset/loaded, for any reason, it will reload the graphics.
Edit: Put frmSettings as the start-up form. It will run on the first run (config variable is not true), then set a config variable in one of your config files to true. If you click options>renderer, the config variable is set to false, the exe is closed and run again. Perhaps not closed and run again , but the main menu form is unloaded, AgrDX is unloaded (DXUnload), and frmSettings is shown.
Also, I just realised what a large project this is, I'll (try to) be around the whole way.
I'll try to make the renderer as self-contained as possible, easier to manage, but if you want anything changed in it, thats why I'm around. :wave:
The settings form will eventually control the entire renderer, and more special effects can be toggled, such as particle effects to projectiles, pixel shaders, stencil shadows (pixel shaders are easy to add to the framework, 2 or so lines to load a pixel shader, 2 lines to use the pixel shader), etc and to see what's supported and what's not supported. I'm working on the settings form (enum hardware support) and the mech's interaction with the terrain atm.
Rendering resolutions from now on, will only be 4/3. I will add code to only support 4/3 ratio resolutions as other ratios
A. might cause problems later on, don't know what now but it could pop up
B. looks freaking wierd!
Edit #2: Adding MWBGRenderer.bas, to contain rendering settings (in a udt), control pixel shaders, etc, but all terrain rendering things will be in TerrainRendering.bas
Edit #3: I will upload the current code (OutdoorRendering) to the FTP sometime later today/tomorrow morning (probably long before you wake up) and I will not work on it anymore...
...instead I expect to next work on it as part of the MWBG project ;)
So, we sync code bases to yours tomorrow, good luck...
Later Edits...
#4 - Parse the XML data for the map and hand it in to the sub InitTerrain
#5 - Default res is now 800x600
#6 - Settings form now allows you to toggle usage of pixel shaders(none at this moment tho), shows usable vram, best z-buffer format, stencil support(depending on z-buffer format) and graphics card name. This stuff will need to be written to a log once we merge our codebase. If someone has a problem, they just send us their log and I got the renderer pretty well covered (idiot proof)
#7 - A clsXMesh object will have special properties if you set MeshIsBot=True in its InitFromFile when loading. It will allow it to align itself to the terrain and some other stuff for mech meshes.
Sounds good :)
'but all terrain rendering things will be in TerrainRendering.bas' - as long as you keep them as variable that can be modified :)
I'm also pondering on creating a console in-game like Quake and Unreal and such.. tap the ~ key and you get a nice window dropping down where you can enter script commands to change/modify etc. (with TAB support to finish up lines)
Edit: oh! Make that MeshIsActor instead of MeshIsBot.. as other things will need some aligning also :)
"Also, we should have a seperate sub to load the graphics (meshes,textures,terrain). So every time AgrDX is reset/loaded, for any reason, it will reload the graphics." - Yeps, The best way would be to store in a udt which files were loaded before the reset and reload those. This way we can actually edit video-settings in-game.
On the resolutions I think we should go for 1024x768 and 800x600, and maybe 1280x1024. This due to the fact that I need to create the menu handler to support multiple resolutions and would have to resize everything depending on that resolution.. The source images would have to be in 2 or 3 sizes for every resolution to work and I hate that kind of work ;)
So I'll prolly make all the base images for 1024x768 so it can easily resize 1 step up and down without too much image loss.
Right, sure...
Any chance of you coming on msn right about now?
Yep :)
Ookay; I've implemented AgrDX into the Main core which is available for download at it's usual place.. Though there is one slight little problem... I run it and I get a BSOD..
I've located the problem in the TerrainRendering code and it's between line 267 and 359... Search the code for 'DEVION' and you'll see a few comments.. There is also a big bad ass bug in DXGetDynamicTexturePixel (Subscript out of range where the Cpointer is higher then the array...)
Due to that bug my landscape looks like err weird? :)
Example:
And that's just a few.. though I just noticed that if I don't turn on Pixelshaders it actually runs semi-stable :PCode:AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:1 Y: 256 - Ubound: 262144 CPointer: 262148
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:2 Y: 256 - Ubound: 262144 CPointer: 262152
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:3 Y: 256 - Ubound: 262144 CPointer: 262156
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:4 Y: 256 - Ubound: 262144 CPointer: 262160
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:5 Y: 256 - Ubound: 262144 CPointer: 262164
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:6 Y: 256 - Ubound: 262144 CPointer: 262168
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:7 Y: 256 - Ubound: 262144 CPointer: 262172
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:8 Y: 256 - Ubound: 262144 CPointer: 262176
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:9 Y: 256 - Ubound: 262144 CPointer: 262180
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:10 Y: 256 - Ubound: 262144 CPointer: 262184
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:11 Y: 256 - Ubound: 262144 CPointer: 262188
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:12 Y: 256 - Ubound: 262144 CPointer: 262192
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:13 Y: 256 - Ubound: 262144 CPointer: 262196
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:14 Y: 256 - Ubound: 262144 CPointer: 262200
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:15 Y: 256 - Ubound: 262144 CPointer: 262204
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:16 Y: 256 - Ubound: 262144 CPointer: 262208
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:17 Y: 256 - Ubound: 262144 CPointer: 262212
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:18 Y: 256 - Ubound: 262144 CPointer: 262216
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:19 Y: 256 - Ubound: 262144 CPointer: 262220
AGR:: DXGetDynamicTexturePixel Error [Subscript out of range] @ X:20 Y: 256 - Ubound: 262144 CPointer: 262224
Edit #1:
Most crashes seem to occur after AGR:: Parsing Partition Data... (LOD, Vertices) (look in source and log ;))
Edit #2:
Some more info on the BSOD... It's NV4_DISP.. Going to update my drivers and see what happens ;o
Edit #3: Nope didn't do anything...
Turning on Pixel Shaders does nothing, its just a checkbox enabled if supported, disabled if not :P
I'm downloading the main base. Fast of you to pull it off in 1 night. :)
Cant Run! Crashes on
MsgBox "Error while initialising " & GLOBAL_INTRO & ". Please make sure that the location of Milestone has write-rights.", vbCritical + vbOKOnly, "Error :: Could not initialise log. "
Error comes from
InitCommonLib(pstrLogFile As String)
Edit: Actual error is "The specified module could not be found" (Automation error).
If comLog.HookObject(Nothing, ListBox, True, pstrLogFile, True) Then
Yep, so I cant run it, I've made a file called MWBG.LOG in the main dir, still doesnt work...
Also, I got a lot to fix (one ovbious thing in the actors handler... if any of the arrow keys is pressed, all actors act as if they were controlled by it instead of just the player :p )
Edit: I can just poke the code around a bit but I cant test it because I still have the aformetioned problem.
Edit again: Whoa, I just realised the extent of changes you did ;)
Scince AgrDX is different, evertime I add something to it, I will add it accordingly into MWGBAgrDX(until I think of a better name) in the same format that you've arranged it in.
Edit once again: I'm commenting it, so you can see what is going on in my parts of the code. Also, some places of the code, you didn't quite get/convert so I have labelled them with a comment README, just search through the code, and read them, it should help you alot.
Edit: Got it to run...
Now, I see what you mean by subscript errors, you've made too major changes to the rendering code and messed something up somewhere, I'll take a look...
Got an unpartitoned map to be geometrically correct, rendering MapVerts, so it must be the partitioning...
I am still unable to fix it, so I'm uploading it to the ftp as MWBG_FixThis.zip
Please try porting TerrainRendering.bas to this again as I am unable to determine what the problem is.
Also, the main frm flickers when in fullscreen, the settings dialog box fails to hide itself, etc, etc...
:confused:
Since the loose Rendering crashes and MWBG crashes also it's directly related to a certain DX setting/call. Since this happens on a Nvidia and doesn't on a radeon mmh..
I'm going to run MWBG on several systems and see what happens.
The partitioning code I'll take a look at vs. the old code and see if I changed something dramaticaly (by accident prolly)
Latest base has been uploaded (with the fix for the settings form :P)
\Source\MWBG_Main.zip :)
Code is synced with your FixIt rar.
Also: There is a music.rar in the Resources (Not Source) directory on the FTP, which can be put in the /Resources/Media/Music dir and be used by using the comKeys.Key("FS_MUSIC") & "\whatever.mp3".
And has FixIt.rar been Fixed.rar? ;)
Edit: Evidently not...
Its worse than before, now the textures dont show, but plain green vertices when infact the vertices are white!
Atleast we wont have to merge codebases again after we get this right...
And, for those (patiently) following our thread, you can see we're having fun... :wave:
The next screenshot should be after me and Devion merge into a single code base.
For now, this is a screenshot from the final version of my attempt at rendering terrain with a bot walking around. Any enhancements I make to this will now affect MWBG and not just a test app. The red tile under the mech shows how the mech is rotated to be aligned to the ground under it.
Well I still get the BSOD on your test app (Nv4_DISP) - which I think is somewhere related to certain functions that are RADEON_ONLY or something alike?
I wonder if our readers have any expertise on this little 'problem'...
Anyway; Nice screenie :)
Any luck so far fixing the MWBG Main app code?
No luck fixing the main app
Radeon specific functions; none I know of...
Edit: You know your systems better than I do, so please just rip out terrainrendering.bas and stick in the outdoorrendering version, with your modifications (such as xml) in a helper bas, so that it has as few modifications as possible.
Also, please fix that flickering problem in fullscreen, when I move my mouse over where my taskbar/icons are, that didnt happen in outdoorrendering...
First things first... We need to fix the damn reboots and replacing the current code with your external mod code isn't going to work as it will still reboot....
Flickering and such... > Later priority then a spontanious BSOD every time I try to debug code :P
I've been fiddling with the code a bit and i'm busted on why it's crashing. (Multiple Nvidia cards tested now.. GF3, TI4200 and 6800) so it's has something to do with the code vs. nvidia :P
So we won't be getting no 'The way its meant to be played' award.. :)
I'll see what I can do today, to re-write using your blank base as a shell...
Right, I've figured out the issue with fps is related to Amd 64, as a guy with an Amd 64 and a radeon 8500 got 170 fps, but on a P4 with the same card, 60 fps. We should get a pre-alpha tech test/demo out sooner or later, so people can test how MWBG will run on their rig. Got confirmation that 8500 and 9600 Xt run, btw.
Got an empty shell working now, miniature main menu, going ingame just shows fog (No terrain yet) and pressing esc goes back to the minature main menu, pressing esc again exits. So, now I'm gonna try porting terrainrendering.bas back in. But now, so many bugs are there, I think it has to do with your main base code...
:confused:
Im uploading it AGAIN as fixme :mad:
So, right now, there are 3 choices, as the team leader, I leave it up to you
1. You reimplement OutdoorRendering again
2. Fix the zip I upload (seems least possible)
3. I make a base and hand it to you, you add all your stuff to it
3 will take the most time, I really dont want to.
But, to fix most problems, MWBG should run in a windowed form (maximized)
Edit: This seems to fix rendering problems related to AgrDX/DirectX (Now there is only windowed mode, no fullscreen) and so I am now uploading it as MWBG_Ref.zip and following option 2 myself ;)
Download and see if this gives you any problems. There is no terrain in this zip, ingame is just a blue screen (Not a BSOD, a D3DClear colored blue ;) ). I'm going to try terrain next...
... It's not the engine that's causing the problem but the terrain creation together with D3D functions you call which crashes nvidia cards it seems.
1) Won't help.
2) Your main menu and blue 'world' works without problems
3) The base app I made works fine as it is.. why change that when the problem is quite clearly the init of the terrain?
Yeah, I (sorta) figured that out now, as I said, I'm going to try the terrain next...
Edit: I'm going to make a bunch of different exe's for outdoorrendering and upload them, please tell me which of them works best for you...
Edit: I've made 11 exe, including one TryThisFirst.exe, I think its the vertex mesh creation, I've removed that. It caused problems RANDOMLY on my ati card until I got it fixed (code, not the card), but it seems nvidia requres a different method, so I disabled it entirely...
Uploaded in \Source
:afrog:
Tried 2 so far:
TryThisFirst = BSOD
TryThisFixMeetc whatever it's name was = BSOD
NoGround Render = BSOD
NoRedim = BSOD
NoOptimizedthingy = BSOD..
I'll stop testing now as I'm kinda getting bored with seeing BSOD's every 3 minutes...
I think this is another of this insolvavle bugs, scince the old terrain loader worked for you, I can rewrite the loading. I'll go do that...
Okay;
Well I've started working on the menu handler modules.. so far things are actually working as they should but.. I'm still a bit spooked to implement AgrDX 2D into it until we can get rid of the BSOD problems.
Anyway; The log now also outputs what the GUI Handler is doing :)
Only created 3 so far; Though they support parenting (button_StartGame is a child of frame_Window) so if frame_Window isn't rendered to the screen button_StartGame will not be rendered also etc. Still missing a few things though.. like I want a focus-check for the mouse.. if it's on a layer it should go from semi-transparent to opaque (can be set by a node in the xml.. <LostFocusOpacity>.Code:MNU:: Layer 'Background' created...
MNU:: Layer 'frame_Window' created...
MNU:: Layer 'button_StartGame' created...
MNU:: Loaded 3 layers into memory.
At this point most of it is done and I'm awaiting the new terrain init code to see if that solves things... in the mean time I've asked Johna (of NemoX) if I can check out the new version of his engine which supports DX9. If it's in reasonable state and we can't get the BSOD away the new NemoX engine might be the way out of BSOD hell.
Edit: Guess I need to fix something though (really unimportant though)..
2 little errors in the SYS_INFO fetch... A) I got 3GB mem.. B) 0MB in use is a little err.. weird - I'll fix this whenever I'm bored.Code:SYS::Info initialised.
- Win:Windows XP [5.1 (Build 2600)]
- Cpu:Intel Pentium compliant
- Mem:2097/2097MB (In use: 0MB)
Scince I now have a very good idea of terrain rendering, I think, I will rewrite a whole new more efficient(code-wise) terrain render straight to MWBG :)
Should be easy to do.
I'll post my results in about 12 hours...
Edit: BSOD is, I suspect, due to crappy terrain management, I'll fix that ;)
Good, hope to see something cool tonight then :)
Starting now, making it directly into MWBG...
Feel free to implement the pixel shader texturing (instead of multitexturing) and detail map/light shading based on sun direction. =)
Oh and no App.path usage.. use 'ComKeys.Key("FS_Textures") & "\yourextradirs\yourfile"' instead so that it's easy to adjust via the script :)
I'll leave that to you... ;)
I think I found your nvidia incompatible problem, but I've dumped that architecture, you can try it if you dont mind the 50% chance Im wrong and the BSOD that comes with it.
Got the 3D camera to work, I think terrain loading works, but nothing shows up, so I'm going back to experimenting...
I should have something working sooner or later (today), I will keep you posted if you come on msn.
Edit: I think I found out why the map buffer is redimmed to the correct size, but doesnt render...
If X >= XM And Y >= YM And X < XM + PartitionSize And Y < YM + PartitionSize Then
With Partitions(I)
ReDim .Verts(UBound(.Verts) + 6)
End With
End If
:lol:
Going back to experimenting...
Edit: Got a really cool darwinian style scene... going back to experimenting...
Edit: Terrain is up and running! :wave:
Untextured, unoptimized, but it works :)
All in the space of 1 hour, from scratch...
Edit: Textured now ;)
Odd, textured gives a higher framerate than untextured...
Edit: Terrain now looks exactly like the screenshots except for the lack of subtle lighting (not so visible, but makes it look very real), and the lack of a mech :D
Also, oddly enough, the terrain rendering code with a blank TerrainYIntersect function is 256 lines
Uploaded as MWBG_Main_Sep13-Cade.zip in the usual dir.
Please note that when you "click to go ingame", the app has not jammed, but is loading the map. Perhaps a loading map splash screen is in order? ;)
:afrog:
I'll fix it up so it has a loading screen and so on and on ;)
Right, so what should I work on for now?
Edit: Client-Server protocol?
Edit again: My 9800 Xt seems to beat 9800 Pro by about 5 fps.. :confused:
Please test the zip I uploaded (vbp,MWBG) and see if it runs without crashing (it should not crash, it has no optimizations beyond very basic fustrum culling and partitioning...)
Client-Server protocol has a lower priority then actually getting meshes in there and being able to run amock with physics included.
Bieng able to run amok is possible by adding a clsActor with bIsPlayer set to true ;)
Ill go into MWBG and try that now...
Quote:
Originally Posted by Cade
Why is that strange?
- ØØ -
Because before, they had the same performance (old mesh code)
Devion; clsActor seems useless...
I've got 2 mechs to show up ingame by using a modified Create Actor, one mech is the player, the other mech stands there.
Edit: Not quite, I'll get back to you...
clsActor is all but finished, will work on that prolly one of these days when I finish up some other stuff first.
Something messed up the mech class in the port, I cant seem to get the mechs to move away from 0,0,0 on the map...
Edit:
Screenshot 1 - The big bad maddog is back and controllable once again ;)
Screenshot 2 - And a NPC maddog standing around...
Quote:
Originally Posted by Cade
Well the XT has a higher clock frequence, so it should do better....
- ØØ -
Right you are :)
Does it animate yet? :)
I have only got one frame to work with...
And alotta vertices, so I aint gonna animated it by hand!
But, I've uploaded the code to the server, consider this a semi-alpha ;)
So, decided on how we will animate meshes?
Edit: When LOD goes bad...
Probably MD2 or something alike.. I'll check if I can get a few classes for this that will work better then the prev. one :)
The prev one works nicely...
What will be use for terrain editing? Terragen?
And mind making a list of Todo's or a roadmap? It's helpful to see which direction we are headed in. :)
ToDo will be up as soon as I can get the source up and running - ie. No BSOD :P
As at that point I can make a quick inventory to where we are at this point in the development plan.
How long till you can test the code I uploaded?
Ingame singleplayer should be fairly simple, I've got multiple bots to work in the source(just run, you don't need to change anything) so a simple AI could control them and just run around taking potshots...
I'm driving home in +/- 30 minutes.
Looks to be working quite good, little bug though, partitions might not be rendered if you turn to the extreme right or left with the camera..
So I take it, it works :D
I know, that is due to primitive fustrum culling, I'll add more to the renderer...
Edit: And fix proper culling
At this stage - yeh it does. no crash yet.
Im gonna make better visibility checking, then testing methods to render terrain more efficiently.
Edit: I have now tested how to BSOD nvidia cards... setting the Flexible-Vertex-Format to use more textures than specified in the vertex data. And I wrote the terrain renderer all over again :sick:
Edit #2:
Using smaller partitions
Advantage: Increased FPS from 50-70 to 90-100! Woo!
Disadvantage: Scince, on a 256x256 map, instead of 256 partitions, 1024 partitions now need to be created so load times go up 4 times, but its still under 10 seconds, so it's worth it
Edit #3:
Number of total partitions is now x4
Partition size is now /4
Number of visible partitions is only x2
Partition distance is now /2
No visual difference, but the fps sure goes up
:D
To test the visiblity system, I only have to go someplace on the map, then pause exe, comment out
Partitions(I).PassedVisTest = PassedVisTest
and resume. It will now only render the partitions it calculated to be visible when I was there.
When I'm done, I will upload the code as MWBG_Main_Sep14-Cade.zip
From now on, that will be the naming style of zips I upload.
Good :)
So next on the line is the detail map, lightning support based on a sun coordinate and particle engine (required for most weapon effects)
Edit #1: Added to the Images Devion on the FTP some mech textures (Steel, Camo-colors). Feel free to implement that on the naked mechs we currently have ;)
Edit #2: Worked a small bit on the menu handler again. Seems to be making progress.. just need to implement the render-base on it and it should work. Going to make the menu handler handle 1024x768 for now. That will be the standard resolution. It will down-scale to 800x600 or 1280x1024. Any higher or lower would require some hardcoding to handle such small or large res.
Anyway; When you upload your code tonight I'll fix it all up (leaving your code-standard intact for the renderer and such so you can keep working on it) add the menu handler and such and upload it again so you can work with it also.
I suggest we sync code every few days due to the changes we make during the day.
I cant edit .x/.3ds files, I don't have any 3D editor on my pc...
Edit: Please make a list of ToDo's for me, I'm uploading the code now.
Here ya go;
Terrain/Render stuff has highest priority as we need to get an alpha up and running with animation and preferably the menus in place ;)
ToDo
Tech:
- Border check on terrain. Mechs should not be able to get to the border at all.
- Minimap in the top right corner (using scaled map as minimap)
- Improved script engine to handle internal code in Actor/Object/Map XML.
- Physics engine
- Visual Effects module (FadeIn; FadeOut; Flash Screen etc)
- Particle Effects Generator/Engine
- .X/.3DS Animation support (or MD2/MD3/MDS/MDL)
- Multiple Textures on terrain (Detail texture/Section textures (aka Stain Maps))
- GUI Handler (Menu + GUI)
- Input Handler in module (not in frmMain)
- Sound Engine (AgrDXMM?) with udt for sound storage (SoundPool)
- XML Actor loading (all actors are stored in a XML file, seperate XML for each actor with templates attached to them)
- Console (Pressing ~ to drop down a command line interface) with <TAB> support to auto-complete commands.
- AI Handler for Tutorial
Client-Server Tech:
- Network Code (Client -> Server)
- In-game chat.
- XML Creation code for automatically generating Client-XML (Client-Info in XML)
- Dynamic Updater and Data Fetcher (requires Network code finished)
- Anti-Cheat module (requires Network code finished)
- Login authentication using back-end database (also for storing rank data and such.. could use a simple ini file for this though?)
Content:
- Mesh objects (like trees and such.)
- Wait screen (Loading Screen) -> Dynamic due to map information. (Got mock)
- Menu: > Main Menu (Got mock)
- Menu: > Mech Lab (No mock yet)
- Menu: > Options (No mock yet)
- Menu: > Multiplayer (Join) (No mock yet)
- Menu: > Multiplayer (Create) (No mock yet)
- Menu: > Credits (No mock yet)
- Menu: > Quit (No mock yet)
CodeWise:
- Clean up code of Agr Terrain renderer when it's reasonably done (ie. Tabs, correct variable naming, deletion of affix var tags which are redudant)
- Implementation of certain modules and classes into an ActiveX Plugin DLL for easier updating.
- Redo ComLog.hooklog logging for new terrain renderer
Working on a HUD atm then...
HUD should be via the menu handler as an overlay layer. At this point that''s all but finished but feel free to work on it.
Edit #1: Added AI Handler for tutorial to todo list (kinda forgot all about that).. Also missing the menu todo for it.
Feel free to work on that minimap thing as it requires some coding probably :)
Coding on HUD
Minimap
Camera position on minimap
Spiffy 3D view of your mech
Screenshot soon
Partial Document - missing Actor XML Details/SkyBox XML details, etc etc.
Implementing those a bit later :)
Code:Final Properties Document for Maps/Actors
-----------------------------------------
Due to the changes during the document creation this is the final Properties document for Map XML, Actor XML, Smaller XML like SKYBOX XML.
* All XML documents start with the MWBG tag. *
Map listing is done by enumerating all XML files in %FS_MAPS%. There is no master index list for this and enumeration is only required for the client if they create a server. Joining a server will result in the server sending the map file name and if it exists load it else it will transfer the map XML to the client.
All Map filenames start with a 3 letter prefix.
DMM_ - Deathmatch map
TDM_ - Team Deatmatch map
OVL_ - Overlord map with AI Map nodes in the XML
CTF_ - Capture the Flag map
KTH_ - King of the Hill map
If the map file has no 3 letter prefix it will show under generic deathmatch maps.
MAP XML
-----------------------------------------
<MWBG>
<Map Name="%Name">
<Description>%Desc</Description>
<Size>256x256</Size>
<Textures>
<HeightMap>%HM</HeightMap>
<DetailMap>%DM</DetailMap>
<BaseTexture>%BT</BaseTexture>
<Screenshot>%SS</Screenshot>
</Textures>
<Frills>
<Frill Direction="0" LocX="30" LocY="100" LocZ="40" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree1.x" />
<Frill Direction="0" LocX="3" LocY="120" LocZ="10" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree3.x" />
<Frill Direction="0" LocX="-30" LocY="100" LocZ="20" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree2.x" />
<Frill Direction="0" LocX="130" LocY="110" LocZ="30" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree1.x" />
<Frill Direction="0" LocX="70" LocY="120" LocZ="20" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree2.x" />
<Frill Direction="0" LocX="40" LocY="110" LocZ="10" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree2.x" />
<Frill Direction="0" LocX="-130" LocY="100" LocZ="20" Visible="Yes" Mesh="%FS_MESH%\Trees\Tree3.x" />
</Frills>
<Script>EchoVoice("HelloWorld.wav", "Hello World!");</Script>
<Options>
<Option Value="Yes">GenerateBSPNodes</Option>
<Option Value="Yes">UseFog</Option>
<Option Value="SKy_ROCKY">UseSkyBox</Option>
</options>
</Map>
</MWBG>
Descriptions:
%Name - The map name of this particular node. It's a single key word used through out the loading process.
%Desc - Description of the map. This is used during the loading to inform the player of some details of the map. Mostly content-related.
Size - The size of the map in units.. for instance.. 256x256 or 512x512.
Textures- The textures for this particular map.
%HM - Heightmap file.
%DM - Detail map file
%BT - Base texture file
%SS - Screenshot used in loading process.
Frills - Frills are static objects around the map. Large stones, Trees, etc. They only have attributes attached to them.
Direction: - Angle of the mesh around it's X
LocX, LocY, LocZ: - Location of the mesh.
Visible: Yes or No - Sets it to be rendered or not.
Mesh: Specify the mesh filename.
Script - Contains a script that will be run at map start.
Options - Contains ooption that can be set to Yes or No or a value.
GenerateBSPNodes: Yes,No - Allows generation of BSP nodes for AI.
UseFog: Yes,No - Set Fog Visible or not.
UseSkyBox: Value,No - Set Skybox or not. Value is a keyname used in Skybox.xml
Im experimenting with Render-To-Texture
Code to this is in its usual place.
Coming up next time, on Cade's MWBG screenshots - Whatever Devion feels like throwing my way ;)
Next-Shadows of some sort...
Got anything on your mind, gimme a holler, if not, I'll try to implement Lighting & Shadowing tomorrow...