Jump to content
XCOMUFO & Xenocide

Xna 3.0 And Visual Studio Express 2008


Loshult

Recommended Posts

Hi everyone!

 

I've checked out the code and since I don't have access to VSE C# 2005 nor XNA 1.0 I upgraded the code to XNA 3.0 and VSE C# 2008. I have a working version of the code with some modifications/changes that at least for the short time I've tried it didn't cause any exceptions. I can check it in if I get permissions but the best thing is probably to start a branch for this until it is deceided formally to upgrade.

 

Major things I've done:

  • Created a new Xenocide project and imported all files to the new project. I'm not sure that all properties on all files got correct though but it seems like the compiled program at least finds all files.
  • Upgraded the Strings.resx files so that the code is autogenerated. This also meant that I hade to add a new XenocideResourceManager class to handle the possible variable strings. Code has been updated for this.
  • The Taharex.imageset in CeGUI.WidgetSet.Taharez have been replaced by the file located in the Xenocide resource folder. I could not get it to take correct file in any other way I tried.
  • Saving and loading games is not working anymore since the StorageDevice.BeginShowStorageDeviceGuide function does not exist anymore in XNA 3.0 (it has been moved to another class, but the replacing class needed a bit more code than I currently have the knowledge about how to incorporate)

 

Since I havn't tried the latest installer I don't know if anything else has been changed when I updated and I think that some of you might have it easier than me to detect any other errors.

 

So please comment and discuss, especially on how I can provide the code to all of you.

Link to comment
Share on other sites

This seems interesting, good job! :)

 

Code-wise I think the only people that can help you are dteviot (the man behind most of the XNA branch) and wizball, who is a new member of this community.

 

Concerning the branching, you could talk to Mad who possibly could add it for you, after we check that nothing is broken :).

 

Take care,

kafros

 

 

edit: It seems that Wizball is replying right now :D

Edited by kafros
Link to comment
Share on other sites

So, have anyone tried it out yet? Anyway, I have to replace my HDD today due to some failing clusters and will have to reinstall every program again. I'm expecting to be without VSE C# and XNA for a few days now.

Haven't tried it out, I guess for now Wizball will be your best bet. Anyway, I created a branch in the svn for it: http://svn.projectxenocide.com/xenocide/xn...s/XNA3.0_branch

Link to comment
Share on other sites

I cleared up the remaining issues for you:

  • Changed StorageDevice.BeginShowStorageDeviceGuide to Guide.BeginShowStorageDeviceSelector and StorageDevice.EndShowStorageDeviceGuide to Guide.EndShowStorageDeviceSelector.
  • Changed LoadGraphicsContent to LoadContent and UnloadGraphicsContent to UnloadContent.
  • Excluded textures from project (they're automatically processed by the models now).
  • Removed Xenocide.GraphicsDevice (now obsolete).

Everything seems to work, so great job! :)

Edited by SupSuper
Link to comment
Share on other sites

Nice!

 

I'm not that familiar with XNA yet so I have some things to learn. I'll take a look on the TODO list and start implementing some things. I hope we can get some more progress on this project!

 

Have you checked in the code on the branch?

Edited by Loshult
Link to comment
Share on other sites

So I've started to work in the branch and I'm posting my changes here until I get access to the Active Programming space.

 

Things that have been done so far:

- I've added the TODO list from the XNA 0.5 thread in Active Programming to the TODO list in docs\

- Beutified DamageInfo.cs (renamed a few fields to better show what is member fields and what is arguments to constructors)

- Added random damage to DamageInflicted in Armor.cs. Damage is now in the range 1-2*damage.

 

Things that needs to be updated after this:

- Unit test has to verify the random damage. I'll try to do this later this week.

 

I've added a zip-file to this post with changed files since I'm not authorized to commit changes.

update.zip

Link to comment
Share on other sites

I have reworked the unit test so that they no longer fails with random damage. I've attached the patch to this post.

 

Next thing I'll like to do is to add damage from wounds. I have tried to understand the code and come to the following conclusions. I would be glad if someone with better code structure knowledge than me could comment on them before I continue.

 

- I need to add fatal wounds to the Combatant class.

- I need to create fatal wounds when the combatant is injured/hit.

- I need to create a function in the Combatant class that decreases the health of the combatant if it has fatal wounds.

- I need to create a function in the Battle class that iterates through all combatants in a specific team and calls the above function.

- I need to call the function in the Battle class from the OnExitState function in the OrderCombatantScreenState class.

randomDamageWithUpdatedUnitTests.zip

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...