Jump to content
XCOMUFO & Xenocide

Xna Progress Release 0.2


dteviot

Recommended Posts

While I am converting models and adding them so they display on xnet, I droped on in baseview and it doesn't display, do you know what all needs to be done for this?

Not sure what you mean, it works for me. Assuming you're referring to the screen where you lay out the facilities in a base.

 

take barracks.fbx for instance, works great in xnet, all textures there, viewable from every angle.. drop that in as replacement for barracks.x in the facility folder, go to baseview and no barracks shows up it is just blank.

Link to comment
Share on other sites

  • Replies 239
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

While I am converting models and adding them so they display on xnet, I droped on in baseview and it doesn't display, do you know what all needs to be done for this?

Not sure what you mean, it works for me. Assuming you're referring to the screen where you lay out the facilities in a base.

 

take barracks.fbx for instance, works great in xnet, all textures there, viewable from every angle.. drop that in as replacement for barracks.x in the facility folder, go to baseview and no barracks shows up it is just blank.

Not sure. Best guess, model needs to be rescaled and repositioned to match the other facilities. That is, it's in the scene, just not in sight of the camera.

Link to comment
Share on other sites

While I am converting models and adding them so they display on xnet, I droped on in baseview and it doesn't display, do you know what all needs to be done for this?

Not sure what you mean, it works for me. Assuming you're referring to the screen where you lay out the facilities in a base.

 

take barracks.fbx for instance, works great in xnet, all textures there, viewable from every angle.. drop that in as replacement for barracks.x in the facility folder, go to baseview and no barracks shows up it is just blank.

Not sure. Best guess, model needs to be rescaled and repositioned to match the other facilities. That is, it's in the scene, just not in sight of the camera.

If you send me a copy of the .fbx, I'll see if I can figure out the problem tonight. And I'll add the baseview background.

Link to comment
Share on other sites

Figured it out, when you load models into basescape you flip them before you display them, or the camera is on the wrong side?

 

I had to flip the barracks for it to display... everything else was fine

 

Edit ok yeah just check the .x files that were in there, they are backwards, i can edit these so if you flip how it displays we can still see the ones that dont have converted models yet.

Edited by Darkhomb
Link to comment
Share on other sites

Figured it out, when you load models into basescape you flip them before you display them, or the camera is on the wrong side?

 

I had to flip the barracks for it to display... everything else was fine

 

Edit ok yeah just check the .x files that were in there, they are backwards, i can edit these so if you flip how it displays we can still see the ones that dont have converted models yet.

 

New checkin:

  • Added Background image to BasesScreen. Thanks Darkhomb.
  • added showAllXNetEntries attribute to startsettings.xml. Set this to "true" and X-Net will show all entries.

OK, I'm pretty sure I've figured out the problems with using the models on the bases screen.

  • Firstly, the scale of the models. They're over 1000 units long on each side. The "dummy" models I created are only 1 unit long. That said, it should be possible to fix that by measuring the size of each model and then scaling the model to standard dimensions. (Note, the X-Net scene already estimates the model size, and scales, but I would need to do this more accurately.)
  • Second, the models have different "origins", that is, the part of the model that corresponds to (0, 0, 0) is different for the barracks and lab models. You can see this when the models are in X-Net. The barracks rotates around the centre of the facility; the lab rotates around a corner. Again, I can work around this by measuring the model, then adding an offset to move the origin. Although it will probably take me some time to write code to do this.
  • Finally, in the .fbx models, the vertexes making up the polygons are in clockwise order, which means they're being culled by the backface removal. (Google "backface cull clockwise" for the details.) Note, the XNA examples use CullClockwiseFace, so that?s what Xenocide does in the Bases & Geoscape screens. (Culling is turned off in X-Net, because it has odd effects when you look at sides of a model that are not supposed to be viewed, e.g. Underside of a facility.) This is easy to fix in code, just turn off culling, but it would be nice to have models that had correct winding order. (I think this might be what you mean by "flip before display")

Anyway, as an experiment I turned off the culling, and hard coded an approximate scale change and ran the Bases view. Screenshot attached (I hope)

As you can see, the barracks and lab now appear. However, I?m now going to commit heresy and suggest that perhaps 3D models are not what we want for the bases screen. The reason being, the 3D models don't resolve very well, and from a game play view, it might be better to use 2D icons to represent the different facilities.

 

xeno.xna.2007_09_04.BaseLayout.JPG

 

edit: fixed a bunch of typos.

Edited by dteviot
Link to comment
Share on other sites

Hi all,

 

[*] Firstly, the scale of the models. They're over 1000 units long on each side. The "dummy" models I created are only 1 unit long. That said, it should be possible to fix that by measuring the size of each model and then scaling the model to standard dimensions. (Note, the X-Net scene already estimates the model size, and scales, but I would need to do this more accurately.)
This should be handled on the models.
[*] Second, the models have different "origins", that is, the part of the model that corresponds to (0, 0, 0) is different for the barracks and lab models. You can see this when the models are in X-Net. The barracks rotates around the centre of the facility; the lab rotates around a corner. Again, I can work around this by measuring the model, then adding an offset to move the origin. Although it will probably take me some time to write code to do this.
Same here.
[*] Finally, in the .fbx models, the vertexes making up the polygons are in clockwise order, which means they're being culled by the backface removal. (Google "backface cull clockwise" for the details.) Note, the XNA examples use CullClockwiseFace, so that?s what Xenocide does in the Bases & Geoscape screens. (Culling is turned off in X-Net, because it has odd effects when you look at sides of a model that are not supposed to be viewed, e.g. Underside of a facility.) This is easy to fix in code, just turn off culling, but it would be nice to have models that had correct winding order. (I think this might be what you mean by "flip before display")
And here.

 

Greetings

Red Knight

Link to comment
Share on other sites

I thought about the 2d for baseview also, I have already started rendering the bases from the top and pasting the image over what you had for the names. it looks exactly the same, but i started working to get the 3d showing because I thought we were going to be able to move the camera...

 

That said, I have no problem continuing the 2nd portion..

 

For model scale, the everything should be aspect of a 1 meter by 1 meter block i believe was the standard, I will have to find that and check. and I did notice the origins but the barracks was fine..

 

I tried the barracks at 2 diffrent sizes, really large and tiny and it showed up the same in baseview so I think it scales fine now.

 

Edit - what I meant by fliping is that i had to rotate the model 180 degrees and it showed up fine... I loaded the .x's that were created in the standard directx view form the sdk and the .x ( in the facility folder) would not show, I had to rotate them 180 degrees.

Edited by Darkhomb
Link to comment
Share on other sites

dteviot, thanks for the showAllXNetEntries, this will help... Lets go ahead and leave the baseview how it is, If we want to work on the 3d part down the road thats fine, but for now there is no diffrence. Plus we really only have 2 models with the textures, the rest are missing or have not been created yet.

 

Did you look at my FMOD code at all? (j/w)

Link to comment
Share on other sites

Edit - what I meant by fliping is that i had to rotate the model 180 degrees and it showed up fine... I loaded the .x's that were created in the standard directx view form the sdk and the .x ( in the facility folder) would not show, I had to rotate them 180 degrees.

Yup, a 180 degree rotation will reverse the winding order.

Now, before we go too far with this, I'm trying to find out which winding order we cull. There seems to be some confusion on the matter. see this:

Link to comment
Share on other sites

Instead of not viewing anything when we check for .mesh which we use the

 

if (modelName.EndsWith(".mesh"))

modelName=String.Empty;

 

lets change it to

if (modelName.EndsWith(".mesh"))

{

modelName = "XCorps";

}

 

this way when you click on something that doesnt have a model it doesnt still show the last model it shows the Xcorps logo

 

also change private string modelName = "XCorps";

so it shows the logo at xnet start

Models.zip

Edited by Darkhomb
Link to comment
Share on other sites

Did you look at my FMOD code at all? (j/w)

Yes. Using FMOD should not be a problem.

However, we can't use the AudioEngine sample code you found. It's under copyright.

I'll have to roll my own. Not difficult, but will take me a day.

 

Also Red Knight.

I see you've updated the skybox.

Might I suggest combining the skybox and Geoscape techniques into a single effect file, so we only need one effect, with 2 techniques. You might even like to add a technique for the Geomarkers, so that we can dispense with the basic effect entirely, and just use our custom shader.

 

Can you please also tell me why you combine both texture sampling operations into the one line? I'm still learning HLSL?

Link to comment
Share on other sites

Did you look at my FMOD code at all? (j/w)

Yes. Using FMOD should not be a problem.

However, we can't use the AudioEngine sample code you found. It's under copyright.

I'll have to roll my own. Not difficult, but will take me a day.

 

Yeah, I didn't think of that.. was thinking it was open source since he's explaining plus I was happy it was working... Plus if I tried to rewrite it it would look the same but different variable names...

Link to comment
Share on other sites

I see you've updated the skybox.

Might I suggest combining the skybox and Geoscape techniques into a single effect file, so we only need one effect, with 2 techniques. You might even like to add a technique for the Geomarkers, so that we can dispense with the basic effect entirely, and just use our custom shader.

Even though it is posible most of the time, unless you have a defined global illumination shading solution (like radiosity) or deferred shading a unified shader is not the most flexible approach. In fact as both planet and skybox use a very different rendering approach (one just maps the texture as it with a small ambient -one multiply -) and the other perform a lighting calculation + a blending pass and I plan to add an atmosphere too ;) then it had more sense to keep them in separate files.
Can you please also tell me why you combine both texture sampling operations into the one line? I'm still learning HLSL?
That is a resemblance to the computer graphics formal teaching not an HLSL thing :). Basicly because it model better the rendering equation and additivity of the light shown in this equation:

http://upload.wikimedia.org/math/e/5/9/e59e7cdca3994712119b07434098a857.png

That can be found here: http://en.wikipedia.org/wiki/Phong_reflection_model

 

Phong model is a simplification of the rendering equation that looks like this:

http://upload.wikimedia.org/math/7/9/a/79afc7016dee9593d7adf88915acce97.png

Details on: http://en.wikipedia.org/wiki/Rendering_equation

 

So basically you can model any lighting equation with a set of sums and multiplications :) each sum is a blending pass each multiplication is the contribution in that pass. That explains more or less the change. Why I did that will be evident when I finish the bump mapping or when you add an specular term ;) Nonetheless I made a mistake, I shouldnt have commited that yet :P

 

Greetings

Red Knight

Link to comment
Share on other sites

I see you've updated the skybox.

Might I suggest combining the skybox and Geoscape techniques into a single effect file, so we only need one effect, with 2 techniques. You might even like to add a technique for the Geomarkers, so that we can dispense with the basic effect entirely, and just use our custom shader.

Even though it is posible most of the time, unless you have a defined global illumination shading solution (like radiosity) or deferred shading a unified shader is not the most flexible approach. In fact as both planet and skybox use a very different rendering approach (one just maps the texture as it with a small ambient -one multiply -) and the other perform a lighting calculation + a blending pass and I plan to add an atmosphere too ;) then it had more sense to keep them in separate files.

I guess I wasn't clear. I meant one effect, with two different techniques. One for skybox, other for Geoscape.
So basically you can model any lighting equation with a set of sums and multiplications :) each sum is a blending pass each multiplication is the contribution in that pass.

Greetings

Red Knight

That much I get. My point is that (allowing for any error), what you did is mathematically the same as what I did.

The difference is you've combined both texture samplings into the one expression. Why?

Edited by dteviot
Link to comment
Share on other sites

That was an unintended side effect of computing the "diffuse term" and the "night term" as the last line is: Color * contribution + Color * contribution. However, while you ask... just speculating I dont know how clever the shader compiler is, but sometimes it is handy to give those kinds of lines to hint the shader compiler to use 1 mad (multiply then add) and one mul instruction instead of 3 single instructions. That makes sense as very often when you see rendering code it is pretty usual to do the final calculation in that way.

 

But as I told I wasnt supposed to commit that one as it wasnt finished yet (wont break anything, but you may notice the NormalMapTexture and the sampler in there). The diffuse term should be called differently though.

 

Greetings

Red Knight

Link to comment
Share on other sites

I get an error in XNet when I click on an certain entries..

For instance Alien Navigation Systems, Plasma Principles -

 

edit wrong pic

Ditto (that is, exactly the same problem here).

Probably a case of the text being too long to word wrap more than 52 characters long.

I'll see what I can do about it tonight

 

To use the Globe Icons we need to change the marker to a billboard and position it near the globe. There is a billboard example in creators.xna.com if you want to see how that it is done.

I prefer the markers to the icons. i.e. DON'T use the globe icons.

Link to comment
Share on other sites

Hmm.. I do like the markers, but I also like the globe icons.. what about if we can texture the globe icon on the top of the marker? So you will be able to differentiate between types of vehicles etc

Well, if someone wants to do it, I guess they're welcome to try, and we will see how it works.

 

    [*] Fixed compiler warnings from Red Knight's updated skybox

    [*] Fixed crash when viewing X-Net entries with long URLs

    [*] Added cgoat's patch to toggle "add facility" button to also act as "cancel new facility"

    [*] Added saintd's patch to allow double clicking on aircraft in intercept dialog

    [*] Added saintd's patch to allow enter key to close "name base" dialog

       

      SaintD, cgoat, my thanks.

       

      Sorry guys, I spent several hours trying to figure out why time runs in X-net.

      Made some progress, but am a bit stumped. So didn't have time to do FMOD, winding, or other bugs on list.

      Will try to get more done tomorrow. I need sleep now.

       

      PS. Progress on time running in X-Net, actually, it doesn't!

      When we I switch to xnet XNA records the time, and then when we switch back to xenocide screen, the XNA framework is pumping Update() to make up for the time the help screen was up.

       

      E.g. Here's a snippet of the logging I added, to show what I mean:

       

      The first number is the actual time from DateTime.Now, the second number is the GameTime.ElapsedRealTime.TotalSeconds

       

      Xenocide.Update(22:45:50.8593, 0.0166688)

      Xenocide.Update(22:45:50.8750, 0.0171379)

      Xenocide.Update(22:45:50.8906, 0.0164546)

      Showing Screen GeoscapeScreen

      Xenocide.Update(22:45:51.2031, 0.3162999)

      Xenocide.Update(22:45:51.2031, 0.3162999)

      Xenocide.Update(22:45:51.2031, 0.3162999)

      Xenocide.Update(22:45:51.2031, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

      Xenocide.Update(22:45:51.2187, 0.3162999)

       

      As you can see, prior to the screen change, the ElapsedRealTime matches the actual elapsed time. After the screen change, it doesn't. Note, after it pumps enough "accelerated" updates to match the time the help screen was up for, Updates resume their normal operation.

       

      The description of GameTime.ElapsedRealTime goes "Elapsed real time since the last frame", so I suspect the problem is when I change screens XNA is keeping a frame for each screen.

Link to comment
Share on other sites

cgoat found the root cause. Thanks!

 

I figured out the problem with the geoscape time continuing during X-net. I would post this in the thread, but woe is me I still can't post.

 

By default, the game uses a fixed time step for Update calls. If the elapsed real time is greater than the fixed time step, it calls Update a bunch of times. Unfortunately during these calls the elapsed real time field stays the same. So after coming out of X-net, it takes about 1.5 seconds to reload the geo graphics. Then it calls Update a bunch of times with the elapsed real time set to 1.5 seconds (elapsed game time is always .0166667). This makes the geo time jump massively.

 

There's two options to fix it. One is to just look at the elapsed game time when updating the geoscape time, and remaining in a fixed time step. The other is to set IsFixedTimeStep = false in the Xenocide class (derived Game class). I think you may also want to look at the elapsed game time even in this state, because it seems to have a max of .5 seconds for when the elapsed real time is large. So coming back from xnet that first update will be .5 seconds instead of however long it took to load the graphics if you look at the real time field.

 

Cheers

 

-Chris

 

 

Hmm.. I do like the markers, but I also like the globe icons.. what about if we can texture the globe icon on the top of the marker? So you will be able to differentiate between types of vehicles etc

How about if instead of an icon, it's labeled with the name?

Link to comment
Share on other sites

Great job!

 

How about if instead of an icon, it's labeled with the name?

 

Doesn't really matter, we can always change later if need be. Personally I think it adds a little to the game with the icons being able to see and tell what it is. Almost like looking at different models and not all of them being generic... I would rather have little icons that look like the ships or even 3d mini models of the ships then just a colored marker.

 

However I think the marker helps a lot knowing where it actually is. In the c++ code they had the icons working in 2d. It was always facing the screen and you really didn't know where it was until you rotated all the way to it.

Link to comment
Share on other sites

Think about marrying both concept, the pointy feeling of the marker with the status representation of the icon... I accept proposals for that ;) and try to put myself a little time to do that after bump mapping.

 

Greetings

Red Knight

Link to comment
Share on other sites

Don't rip me to pieces, but couldn't the game use an options dialog, where (except from sound and video options) there would be a gameplay (or misc, depends) category where you could set such preferences? If you prefer globe icons, tick, if not, untick. That definitely needs extra work, but also makes the game more beautiful to all kinds of different people

 

(Another example, in the video category, you could choose what kind of globe texture you prefer ;) etc. Small things, but detail adds a little...something! :D )

Edited by kafros
Link to comment
Share on other sites

I believe they plan to implement 1 of 2 things...

 

1. Use multiple textures, where a smaller less detailed when viewed from far, then a medium res texture when zoomed in a little but then high detailed when zoomed in all the way.

 

2. An options setting for low medium high texture details.

 

 

--

 

Plus as of right now, you can replace the map with whatever you want. Find the geoscape posts from a couple weeks ago and i have links to very high resolution texture you can pop in there.

Link to comment
Share on other sites

I watched 6 terror missions in a row (with changed starting settings ;)) and I noticed this:

 

When a terror ship spawns, it goes to a specific location, it moves to 4 different places (cities I suppose) and stays there for some hours, then it moves to a random(?) city of those it just visited without staying above it and leaves. 1 hour after that very moment, a terror site spawns at that location. Am I right?

 

Btw, I noticed something weird:

 

http://img527.imageshack.us/img527/1992/cap01cp4.jpg

 

That UFO's last location (where it stayed for ~2hours, as they always do) was at the red dot O_o. Something random, a bug or a wrong coordinate?

 

Btw, after spawning a mission in Washington, some hours after the UFO disappeared, another one spawned and was flying above USA. I hope they spawn that fast for testing purposes only, because this kind of gameplay would be more difficult that superhuman xD

Link to comment
Share on other sites

I watched 6 terror missions in a row (with changed starting settings ;)) and I noticed this:

 

When a terror ship spawns, it goes to a specific location, it moves to 4 different places (cities I suppose) and stays there for some hours, then it moves to a random(?) city of those it just visited without staying above it and leaves. 1 hour after that very moment, a terror site spawns at that location. Am I right?

Yes.

 

Progress:

  • Stubbed in FMOD to play background music

Additional steps.

  • If you want music, Copy the .ogg music files to Xenocide\bin\x86\Debug\Content\Audio\Music. (currently plays main_theme.ogg, planetview.ogg & xnet.ogg)

Additional notes,

  • Game will work happily with no music files.
  • I've put FMOD in a GameComponent/GameService wrapper, so that (at least in theory) if we ever find the need we can drop out FMOD and replace it with something else. Also, if someone else wants to use FMOD in XNA, they just need to include the FMOD library as a dependant sub-project for their project.
  • But I digress, as I've never done GameComponent/GameService stuff before, Red Knight, can you please take a look at my work.
  • Final comment, what I've implemented is basically a stub. It plays music, and it should play sounds. However I haven't hooked up volume control, or random play. And I haven't tested sounds (as opposed to music) work.

Link to comment
Share on other sites

Ok did some quick testing... Works great without music, works great with music...

 

works bad with a mix of both... I had main theme in the directory only, played fine, switched to geoscape, no music, placed base and when I exited baseview I get this error.. might be trying to stop something that is not there?

 

I will go ahead and change the random code I had for this and make a patch.

 

Sound effects I'm not sure about, if there a place in Cegui we can execute a sound for click, instead of having to insert in each individual button?

 

edit fixed both errors check out the recruits patch thread for them.

error_one.jpg

error_two.jpg

Edited by Darkhomb
Link to comment
Share on other sites

Ok did some quick testing... Works great without music, works great with music...

 

works bad with a mix of both... I had main theme in the directory only, played fine, switched to geoscape, no music, placed base and when I exited baseview I get this error.. might be trying to stop something that is not there?

 

I will go ahead and change the random code I had for this and make a patch.

 

Sound effects I'm not sure about, if there a place in Cegui we can execute a sound for click, instead of having to insert in each individual button?

 

edit fixed both errors check out the recruits patch thread for them.

 

1. OK, I'll get onto merging the patches

2. Button sound. AddButton() in Frame.cs

3. Also, you should not need to do a screen dump of the crash handler's error dump.

Just click on the window, then Ctrl+C, should copy the text to the clipboard. Then you can paste it into notepad (or whatever.)

Link to comment
Share on other sites

I watched 6 terror missions in a row (with changed starting settings ;)) and I noticed this:

 

When a terror ship spawns, it goes to a specific location, it moves to 4 different places (cities I suppose) and stays there for some hours, then it moves to a random(?) city of those it just visited without staying above it and leaves. 1 hour after that very moment, a terror site spawns at that location. Am I right?

 

Btw, I noticed something weird:

 

http://img527.imageshack.us/img527/1992/cap01cp4.jpg

 

That UFO's last location (where it stayed for ~2hours, as they always do) was at the red dot O_o. Something random, a bug or a wrong coordinate?

 

Btw, after spawning a mission in Washington, some hours after the UFO disappeared, another one spawned and was flying above USA. I hope they spawn that fast for testing purposes only, because this kind of gameplay would be more difficult that superhuman xD

Most UFO missions are of the general form:

  • Pick somewhere on the earth.
  • Fly to posision.
  • Randomly fly around the area stopping and landing for a while. Officially, it's searching the area for target(s). In reality is so that X-Corp craft can catch it. The random location can include water. (although it would be easy enough to check if location is water, if it is, don't land.)
  • Head for final target (City/X-Corp base)
  • Fly off.

Exceptions are:

  • Outpost Supply
  • Retaiation missions, when location of X-Corp base is known to Overmind.
  • Alien Outpost Buidling (for the supply ships and battleship)

In these cases, UFO heads straight for target.

 

The delay in 1 hour delay in getting the terror mission is, offically because I figure it would take a while before the reports actually get to X-Corp.

Unofficially, it's because if the terror site is reported when the UFO's on top of it, you can't target the site. (Target selection is the UFO.)

 

As regards Terror mission starting so soon. Yup, that looks like a bug, which I think I've just fixed. They should start one every 1 to 2 weeks.

 

 

New code check-in:

  • Reset camera when new entry selected in X-Net
  • In X-Net, center of 3D model being displayed is positioned at origin.
  • Fixed game crashing when some sound files are missing
  • Implemented random background music selection. (Now, if someone wants to figure out how to do shuffle play, that would be nice.)

Note, for sound to work, you need to set up the sound files as described by Darkhomb

 

Content/Audio/Music/BaseView/XerO - Baseview.mp3

Content/Audio/Music/PlanetView/10. Thomas Torfs - Planetview.ogg

Content/Audio/Music/PlanetView/planetview.ogg

Content/Audio/Music/PlanetView/Tiskaite_-_Xenocide_Geoscape.ogg

Content/Audio/Music/XNet/xnet.ogg

Content/Audio/Music/main_theme.ogg

 

Additional note

 

Actually, the way it's now set up, just copy the music you want it to play when in Geoscape to the PlanetView directory, and system will pick one at random each time you switch to the Geoscape.

Same thing applies to BaseView and XNet directories

 

Someone might like to gather the sound files together into a zip, with the correct directory struture and make it available.

Link to comment
Share on other sites

Exceptions are:
  • Outpost Supply
  • Retaiation missions, when location of X-Corp base is known to Overmind.
  • Alien Outpost Buidling (for the supply ships and battleship)

In these cases, UFO heads straight for target.

Just a note on alien base building if I may: if the aliens send in their crews to start building a base, they send a bunch of ships (normally Battleship, supply ships and large scouts) all at once. These ships all land, but not in one spot (such as the actual location of the base). The UFO's land randomly in different spots within the area where the base is being built.

 

In the original game, the location of the base can be determined "early" by heavy patrols with X-COM craft before the actual base-building crews arrive. Wiping out the base before the UFO's arrive doesn't prevent them from showing up. I consider this an unintentional "feature" of the game. Having the base show up after the crews leave would be the preferred method. ;)

 

- Zombie

Link to comment
Share on other sites

Someone might like to gather the sound files together into a zip, with the correct directory struture and make it available.

Enjoy :)

 

Comments:

There are 2 more audio files which could be included:

* The OFFICIAL main theme (by ATeX, chosen at the main theme contest)

* A nice planetview track by Arnaud Geeraert

 

I didn't include them in order to lower the download size

Btw, I couldn't find the baseview track in my downloaded SVN folders, so I picked it from a file that Darkhomb sent to me some days ago

 

That's all

 

http://www.megaupload.com/?d=01WXAHHF

 

P.S. I've uploaded it on megaupload for a change. I hope you can download it (including SaintD :))

Edited by kafros
Link to comment
Share on other sites

Btw, I couldn't find the baseview track in my downloaded SVN folders, so I picked it from a file that Darkhomb sent to me some days ago

 

 

I just pulled it from \Complete\Music\First Turn in the sound svn

 

It might be easier to sort the svn into groups as well. but I don't know how sound dept wanted it to be.

Link to comment
Share on other sites

btw when trying to load sound I get this

 

---------------------------

 

---------------------------

Exception: Object reference not set to an instance of an object.

 

StackTrace:

 

at AudioSystem.FmodGameComponent.LoadSound(String filename) in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Dependancies\FMOD\FMOD\FmodGameComponent.cs:line 126

 

at ProjectXenocide.Xenocide.Initialize() in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Xenocide\Source\Xenocide.cs:line 110

 

at Microsoft.Xna.Framework.Game.Run()

 

at ProjectXenocide.Program.Main() in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Xenocide\Source\Program.cs:line 44

Link to comment
Share on other sites

btw when trying to load sound I get this

 

---------------------------

 

---------------------------

Exception: Object reference not set to an instance of an object.

 

StackTrace:

 

at AudioSystem.FmodGameComponent.LoadSound(String filename) in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Dependancies\FMOD\FMOD\FmodGameComponent.cs:line 126

 

at ProjectXenocide.Xenocide.Initialize() in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Xenocide\Source\Xenocide.cs:line 110

 

at Microsoft.Xna.Framework.Game.Run()

 

at ProjectXenocide.Program.Main() in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Xenocide\Source\Program.cs:line 44

Hmm. Well, I did say I hand not tested the sound part. I guess I'd better get onto it. Expect a patch later today.

 

Just a note on alien base building if I may: if the aliens send in their crews to start building a base, they send a bunch of ships (normally Battleship, supply ships and large scouts) all at once. These ships all land, but not in one spot (such as the actual location of the base). The UFO's land randomly in different spots within the area where the base is being built.

 

In the original game, the location of the base can be determined "early" by heavy patrols with X-COM craft before the actual base-building crews arrive. Wiping out the base before the UFO's arrive doesn't prevent them from showing up. I consider this an unintentional "feature" of the game. Having the base show up after the crews leave would be the preferred method. Wink.gif

Already done.

The base is built when the Battleship takes off. If you kill the battleship before it lands, no base is built.

Link to comment
Share on other sites

btw when trying to load sound I get this

 

---------------------------

 

---------------------------

Exception: Object reference not set to an instance of an object.

 

StackTrace:

 

at AudioSystem.FmodGameComponent.LoadSound(String filename) in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Dependancies\FMOD\FMOD\FmodGameComponent.cs:line 126

 

at ProjectXenocide.Xenocide.Initialize() in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Xenocide\Source\Xenocide.cs:line 110

 

at Microsoft.Xna.Framework.Game.Run()

 

at ProjectXenocide.Program.Main() in C:\Users\Jasin\Documents\Xenocide SVN\XenoXNA\Xenocide\Source\Program.cs:line 44

OK, I've got it figured out.

Here's the relevant function

		protected override void Initialize() 
	{
		// Start FMOD sound system
		Components.Add(new AudioSystem.FmodGameComponent(this));

		base.Initialize();

		InitializeCegui();
	}

What's happening is FmodGameComponent() is a GameComponent, which means it's not initialized until AFTER base.Initialize() is called.

So, your code needs to go

		protected override void Initialize() 
	{
		// Register FMOD sound system
		Components.Add(new AudioSystem.FmodGameComponent(this));

		base.Initialize();

		InitializeCegui();
		InitializeAudioSystem();
	}

Then put the code that loads the sounds into the new InitializeAudioSystem() function.

Link to comment
Share on other sites

Progress:

  • Only troop carying aircraft can target Terror sites and alien bases.
  • Can buy and sell Engineers, Scientists and Soldiers. (Selling needs more work, to group Engineers and Scientists together.)
  • Added IGeoPosition interface to "positionable" items in the Geoscape (Craft, Outposts, Terror Sites, Cities)
  • Refactored serialization code for Craft/UFO naming.
  • Can buy and sell engineers, scientists and soldiers. And they appear on Base Info screen.

Note, there's still rather a lot to be done with buying and selling people.

1. Can only sell people who are not occupied.

2. Need to consolidate the engineer and scientist entries on the sell screen.

3. Need to be able to assign scientists to research projects, to properly test 1.

Link to comment
Share on other sites

Menu sounds for 80 percent of buttons/clicks etc.

 

Want to see if you like how I am doing this before I continue..

 

Crashes if files are not present.. maybe we should do the same for this as music?

Progress:

  • Fixed crash when try to play a sound that doesn't exist
  • Modified to play sounds (sort of Darkhomb's patch)

The way it works

By default, a button will play the "Menu\\buttonclick1_ok.ogg".

If you don't want it to play that sound, give it a different sound as the last parameter of the AddButton() command.

e.g.

		protected override void CreateCeguiWidgets()
	{
		testsButton = AddButton("BUTTON_RUN_TESTS",	   0.3500f, 0.75f, 0.3000f, 0.04f);
		startButton = AddButton("BUTTON_NEW_GAME",		0.3500f, 0.80f, 0.3000f, 0.04f);
		loadButton  = AddButton("BUTTON_LOAD_SAVED_GAME", 0.3500f, 0.85f, 0.3000f, 0.04f);
		quitButton  = AddButton("BUTTON_QUIT",			0.3500f, 0.90f, 0.3000f, 0.04f, "Menu\\exitgame.ogg");

Note,

1. At moment, even if a buton is diabled, it will still make a sound when pressed. I'll look at fixing that later.

2. As I don't have Karfos' sound pack, I haven't been able to test this.

3. Don't put Xenocide specific code (e.g. Sounds) into the files in the FMOD directory, I want that to be a general purpose library.

Link to comment
Share on other sites

Progress:
  • Fixed crash when try to play a sound that doesn't exist
  • Modified to play sounds (sort of Darkhomb's patch)

The way it works

By default, a button will play the "Menu\\buttonclick1_ok.ogg".

If you don't want it to play that sound, give it a different sound as the last parameter of the AddButton() command.

 

Note,

1. At moment, even if a buton is diabled, it will still make a sound when pressed. I'll look at fixing that later.

2. As I don't have Karfos' sound pack, I haven't been able to test this.

3. Don't put Xenocide specific code (e.g. Sounds) into the files in the FMOD directory, I want that to be a general purpose library.

 

Sweet that is what i wanted it to be able to do.

secondly. I was trying to get hover sound to work, I tried using IsHovering but says it is protected... can you point me in a direction?

Edited by Darkhomb
Link to comment
Share on other sites

Sweet that is what i wanted it to be able to do.

secondly. I was trying to get hover sound to work, I tried using IsHovering but says it is protected... can you point me in a direction?

Can you show me the code that doesn't work, along with a bit more detail on what you're tying to do?

Link to comment
Share on other sites

New checkin

  • Merged in tazOk patches for not clipping geomarkers when zoom in, and right dragging works when mouse is off the globe
  • Added shuffle play to sound system. (Note, this can result in a song being played multiple times in a row.)

Notes:

  • The ZIP file karfos made has the button sounds in Content\Audio\Effects. Current Audio System expects them to be in Content\Audio\Sounds.
  • Now, when one song in directory is finished, if on shuffle play i.e. PlayRandomMusic(string), a different song will be chosen
  • Under shuffle, when a screen changes, song currently playing isn't stopped, shuffle waits until current song finishes.
  • Unfortunately, this also means PlayMusic() no longer loops song. It plays song once then stops.
  • Added EnableButtonSounds(bool) to Frame, to allow turning off/on sounds for buttons. e.g. When placing facilities in base, or placing a new base.
  • FmodGameComponent.SoundVolume and FmodGameComponent.MusicVolume now work.

Possible job for recruit (or SupSuper) add options dialog with sliders to set music and sound volume.

Link to comment
Share on other sites

Switches music when changing scenes while still enabling random shuffle.

 

Darkhomb, not meaning to disparage your work, but I'm not sure this is an improvement.

Personally, I prefer a song to play through to the end, rather than have it stop immediately (and a new one start) when I change screens. Probably because I change screens a lot. However if the majority of people prefer stopping immediately, I'll be willing to put it in.

So, I'm asking for people to post their feed back, which behavior do they prefer?

Actually, while we're about it, is anyone willing to write up the requirements for what sound needs to do?

Link to comment
Share on other sites


×
×
  • Create New...