Jump to content
XCOMUFO & Xenocide

Potential tasks for new recruits


dteviot

Recommended Posts

I'd like to try this first...

Save Game Dialog

Is this a xml format?

 

Can you please give me some advise / pointers on

what's expected of the layout?

 

Is it to be like the original with 10 game slots?

 

I know html forms... with buttons... but I'm not sure about this.

 

As you said,  a good learning experince.... :-)

 

thanks

Kelargo

 

I was actually thinking of the Dialog itself. (The actual format of the save game file is a different problem.)

 

What I was thinking of was a dialog containing:

1. A 3 column list control. The columns are:

a. User assigned name for save game

b. "Game" time at save point

c. Real time at save point.

2. An edit control, to allow player to give the save a name.

3. Three buttons:

a. Save

b. Delete

c. Cancel

 

The delete button would only be enabled when a game has been selected in the list.

When running in Load game mode, the "Save" button is replaced with "Load".

 

A tutorial on creating a dialog is here:

http://docs.projectxenocide.com/index.php/Code:ModalDialog

Unfortunately its somewhat out of date, as it doesn't tell you how to do dialogs in python.

 

If you know python, I suggest that you have a look at the existing transactions dialog. (Buy/Sell items) that you get when you press the "transactions" button on the planetscape. (I suggest this dialog, because it has a multi-column list.)

 

Files of interest are:

xenocidegame\data\ui\layouts\transactions.layout (XML file that describes screen.)

xenocidegame\data\scripts\ui\transactions.py (python code behind the dialog.)

 

If you don't know python, then look at the projects dialog. (Someone's currently broken this in the trunk so it doesn't appear when you click on research in planetview, fixing it's on my to do list.)

Files are:

xenocidegame\data\ui\layouts\projectsdialog.layout (xml dialog description)

 

xenocide\src\client\commonui\projectsdialog.cpp (code)

xenocide\src\client\commonui\projectsdialog.h (code)

xenocide\src\client\commonui\projectsdialog_py.cpp (exposes code to python.)

 

Some additional thoughts.

1. I'd start out with the list control only having 1 "name" column, add the two time columns once the rest is working.

2. Note that file functions need to work under both Linux and Windows.

Link to comment
Share on other sites

The Funding and Monthly Report dialogs have been designed, implemented and commited, ready for anyone to actually code the data into them (the data shown in the screenshots is purely for example :P ).

screenshot_04102006_221542731.jpg

Link to comment
Share on other sites

The Funding and Monthly Report dialogs have been designed, implemented and commited, ready for anyone to actually code the data into them (the data shown in the screenshots is purely for example :P ).

Nice. Just a thought to the Moderators, would it be worth merging this thread with the "Save Game Dialog" thread http://www.xcomufo.com/forums/index.php?showtopic=242025315

and rename that thread to "Potential Tasks for new recruits?

Link to comment
Share on other sites

Guest Azrael
The Funding and Monthly Report dialogs have been designed, implemented and commited, ready for anyone to actually code the data into them (the data shown in the screenshots is purely for example :P ).

Nice. Just a thought to the Moderators, would it be worth merging this thread with the "Save Game Dialog" thread http://www.xcomufo.com/forums/index.php?showtopic=242025315

and rename that thread to "Potential Tasks for new recruits?

*Poof*

Link to comment
Share on other sites

  • 5 months later...

Displaying large amounts of text without performance hit

 

Currently we have a little problem with the X-Net. There is the window where an object is described. In this window a large amount of text needs to be displayed.

 

First this was done using a StaticText element from CEGUI. This has the disadvantage of beeing very sluggish. CEGUI reformats wrapped text at many situations, for example while hoovering over the scrollbars.

To fix this for the moment, we use a MultiLineEditbox instead which brings its own wrapping function. But the wrapping is not looking very good and only allows LeftAlignedWrapping.

 

It would be interesting to discover a way to render the text without the performance problems, but also keeping the "good look".

 

For some details:

[18:28] LarsW: reist: i have looked a bit into the performance problems with the X-Net

[18:28] reist: and?

[18:29] LarsW: it is the WordWrap option

[18:29] LarsW: But if you disable it, you cant read it anymore

[18:29] reist: seriously?

[18:29] reist: word wrap?

[18:30] LarsW: if you use multilineeditbox instead of statictext you dont have problems

[18:30] reist: hmm

[18:30] reist: does it look any different?

[18:30] LarsW: but Wordwrap of the multilineeditbox is not very good

[18:31] LarsW: And you cant set the color for the text

[18:31] reist: then we probably should ask the guys over at #cegui about this

[18:32] LarsW: i could reproduce the same problem with their FontDemo sample, by exchanging the multilineditbox their with a statictext with the wordwrap option and filling it up with enough text

[18:33] LarsW: it seems the word wraping gets computed everytime the textwindow is updated, and thats even on mouse hoovering over the scrollbar

[18:35] reist: ouch

[18:35] reist: that's really bad

[18:35] reist: can you report it to the cegui guys?

[18:35] reist: on their forum is best i guess

[18:36] LarsW: ok

[18:43] LarsW: mmh, their forum registration takes ages...

[19:19] LarsW: ok, this seems to be known: http://www.cegui.org.uk/phpBB2/viewtopic.p...hlight=wordwrap

[19:23] reist: huh

[19:23] reist: in which way is the word wrap of a multilineeditbox worse?

[19:24] LarsW: it is not properly aligned

[19:24] reist: can you make it aligned?

[19:24] LarsW: there is sometimes extra space at the beginning of the line and sometimes characters at the end are only half visible

[19:24] reist: and there should be a way to set text color in it...

[19:41] reist: also, is that space seen in cegui's FontDemo sample?

[19:42] LarsW: yes

[19:59] LarsW: the general look (text color, different frame rendering and so on) can be easily changed by defining a new looknfeel. but i think the behavior of the text wrapping is either statictext or multilineeditbox. Source code needs to be changed to do something about that

[20:17] dteviot: hi guys.

[20:18] dteviot: LarsW, thanks for looking into the edit box problem.

[20:18] dteviot: I'm going to suggest that for moment, change to multiline edit, and leave it at that.

[20:19] dteviot: It's going to be a _LONG_ time before Xenocide is done, and by then CEGUI will probably be fixed.

[20:29] reist: oh

[20:29] reist: that's a very practical view :)

[20:29] reist: and probably very correct too

[20:29] reist: hi dteviot

[20:29] LarsW: yepp, i like it too :-)

[20:37] LarsW: aaah i found the difference between the two

[20:38] LarsW: the multiline edit box does its own wrapping and always renders as leftaligned, i think to position the carret and to edit and so on. but that kind of wrapping is very much simplified (and therefore fast)

[20:38] LarsW: so no simple fixing in the cegui code :-(

[20:39] reist: in the forum they talked about another difference - that the text is prerendered once

[20:40] LarsW: yes, but i could not find any hint about that

[20:41] LarsW: they both use the same render calls in the end

[20:41] LarsW: but one only with leftAligned and the other one with the supplied formatting option

Link to comment
Share on other sites

  • 2 weeks later...

Get the CEGUI TreeView working for CEGUI 0.6.0

(We want this for XNET)

 

(11:21:37) Grahor: Yes, that will be good.

(11:27:54) dteviot: here's tutorial for tree. Note the ability to set an icon. http://www.cegui.org.uk/wiki/index.php/Tree

(11:29:13) Grahor: Thanks

(11:29:50) dteviot: And here the thread explaining why it's not in 0.5.x http://www.cegui.org.uk/phpBB2/viewtopic.p...8d959625df040cf

(11:30:10) dteviot: And some notes on what needs to be done to get it into 0.6.x if someone wants to.

Edited by dteviot
Link to comment
Share on other sites

  • 1 month later...
The only real insight I can give is that, in general, text is expensive.

 

:hmmidea:

 

This sounds very very wrong... but what about just simply rendering the text to an image and display that. Using a view port we can have it be scrolled around. It would let the CTD use whatever formatting and background and what-not they want to use. Also less XML data we'd need to parse :D

 

There are some tools available (for instance I know PHP can make images dynamically), but since these large texts will be mainly static, either we or the CTD could just make a new render when they 'tweak' the text, and I suppose that would include translations (in which case special characters are no problem!) I'm suggesting some kind of a tool to perhaps transform the XML file into an image. (XSL just popped into my head, get an HTML file from it and then snapshot it). This way the text is structured and the same for each entry, and any changes made to the text and/or the layout can be made easily.

 

One last thing, since the statistics is stored seperate (and might be changed more often or modded) we could just have them be displayed as a widget since it's not a huge amount of text.

 

Ok, I know this is a crazy idea, but it sounds plausible to me. Though that might be because it's midnight here. Might need to start a new thread on this though.

 

Alright guys, shoot this crazy idea down! :uzi2:

Link to comment
Share on other sites

  • 8 months later...

Something for someone to look into, getting blender to export models to .x and .fbx so that we can import them into XNA.

Blender has Python scripts that export to .x and .fbx. The problem is they don't work very well. The Blender 2.44 scripts are about 50% successful exporting the existing Xenocide models to .x files that can be imported into XNA. The success rate for .fbx is 0%, so far.

I've found the following links to information on Blender Python scripting.

http://members.optusnet.com.au/cjbarton/BPY_API

http://en.wikibooks.org/wiki/Blender_3D:_B...Python/Cookbook

 

Note, if these scripts can be improved, this would benefit lots of XNA programmers, not just us.

Link to comment
Share on other sites

Any chance there might be something wrong with the models instead of Blender? I've been looking around and haven't seen any trouble getting Blender models onto XNA. Even ran into this, which is recent: http://www.virtualrealm.com.au/blogs/mykre...3d-and-xna.aspx

 

Might try it myself if you can tell me where I can find the current Xenocide models. I need to do something helpful at least once. <_>

Link to comment
Share on other sites

Any chance there might be something wrong with the models instead of Blender? I've been looking around and haven't seen any trouble getting Blender models onto XNA. Even ran into this, which is recent: http://www.virtualrealm.com.au/blogs/mykre...3d-and-xna.aspx

 

Might try it myself if you can tell me where I can find the current Xenocide models. I need to do something helpful at least once. <_>

 

 

There is an svn for art dept that has them except the wiki part is down which tells you and i don't remember the address..

Link to comment
Share on other sites

Any chance there might be something wrong with the models instead of Blender? I've been looking around and haven't seen any trouble getting Blender models onto XNA. Even ran into this, which is recent: http://www.virtualrealm.com.au/blogs/mykre...3d-and-xna.aspx

 

Might try it myself if you can tell me where I can find the current Xenocide models. I need to do something helpful at least once. <_>

 

 

There is an svn for art dept that has them except the wiki part is down which tells you and i don't remember the address..

http://svn.projectxenocide.com/assets/Artwork Department

 

edit: fixed space in link

Edited by dteviot
Link to comment
Share on other sites

XNA Progress Release 0.3

 

Looking at the Progress Release 0.2 work, it's hard to try to break the job into pieces that can be done by different people. Due to the dependencies between the parts, most of it needs to be done in the proposed order. Well, except for the graphics work: normal (bump) mapping, level of detail, etc.

 

So, I'm now considering what would have been done for the next stage, 0.3.

I see the following tasks, which are largely independent of the PR 0.2 work.

  • Work on Aeroscape.
  • Work on Battlescape.
  • Implementing soldiers (in base/geoscape environment)
  • X-Cap

Tasks for soldiers are:

  1. Define their attributes.
  2. Create soldiers.
  3. Store soldiers in a base.
  4. Equip soldiers with gear.
  5. Assign soldiers to craft. (including their position in the craft.)
  6. Healing in base.
  7. Psi Training.
  8. Hire/Fire/Transfer soldiers.

X-Cap have similar requirements to soldiers, with the exception of healing and psi training.

Edited by dteviot
Link to comment
Share on other sites

Nope, I just open them in Blender, export to .x, put the models/textures in their places and voil?! Couldn't get the "click on an x-net entry to show respective model" working though so I'll leave that to dteviot.

 

Btw, there's no textures in SVN for the XC-33.

Link to comment
Share on other sites

Nope, I just open them in Blender, export to .x, put the models/textures in their places and voil?! Couldn't get the "click on an x-net entry to show respective model" working though so I'll leave that to dteviot.

 

Btw, there's no textures in SVN for the XC-33.

The .x file exporter in Blender 2.44 has about 50% success in exporting models. (2.43 is about 25%)

IIRC, the facilities and X-Caps are the ones that produce a non-working export.

Link to comment
Share on other sites

Still haven't ran into problems, although I'm only exporting the models that are already in Blender format. I also figured out how to get the textures out of the Blender files (since some models don't have them stored externally). So far I've converted (and tested): Assault Rifle, Stingray, XC-1, XC-33, XCAP Cannon, XCAP Hover Plasma.
Link to comment
Share on other sites

Couldn't get the "click on an x-net entry to show respective model" working though so I'll leave that to dteviot.

In theory, it's simple.

Each entry in xnet.xml has a element, with the name of the model.

In practice, at the moment, it's a bit more complicated.

  • xnet.xml is autogenerated from a data file, so if you decide to update xnet.xml, you also need to update the source file. http://svn.projectxenocide.com/assets/Creative Text Department/XNet/xnetCtFiles.xml
  • The names in the file are currently the locations of the models in the C++ tree. I'd suggest moving the models into separate directories. (e.g. Craft, Facilities, Aliens, Weapons, etc.)
  • Because there's only one 3D model at the moment, XNetEntry.ExtractModel() has code to ignore any model other than the stun launcher. This will need to be removed.
  • The model files are somewhat large. So to keep the downloads small, I've left the models that do export out.
  • Someone might want to look at the files for the aircraft missiles. FOr a simple shape, the files are huge.

Also, new job for recruits:

Unit testing some of the InvasionTasks (specifically the RetaliationTask) is difficult because of the use of random numbers by the alien "AI" to decide what to do.

A possible workaround would be to allow us to set a "RandomPool" which holds the sequence of "random" numbers Xenocide.RollDice() will generate.

Thus, at the start of a unit test, one first loads the random pool with the desired values to force the wanted behaviour.

 

So requirement is

1. Implement a RandomPool.

2. Use RandomPool to get the RetaliationTask.RetaliationTaskTest() unit test to pass.

Edited by dteviot
Link to comment
Share on other sites

New possible task for recruits.

Now that we're loading a number of models into X-Net, we're seeing issues as the models don't have the best initial orientation.

Now, if we look at the graphic element in xnet.xml it looks like this:

	  <graphics model="Craft\Xcorps\xc1" camera="AUTO" />

The idea was to provide a standard set of cameras for zoom and orientation. However, I propose something a bit simpler.

Basically, the xml goes

	  <graphics model="Craft\Xcorps\xc1" x="0" y="90" z="180" />

Where x, y and z are the clockwise rotations (in degrees) about the X, Y and Z axis that are initially applied to the model before displaying in X-Net.

 

So, task entails.

1. Updating xnet.xsd & xnet.xml

2. adding code to XNetEntry to parse the values and construct the necessary rotation matrix.

3. Applying the rotation matrix in XNet scene, when model is drawn.

4. Each time user selects a new entry, reset the camera.

 

Note:

Scaling and positioning the model in the center of the screen can be handled automatically.

I'm currently working on updating the scaling matrix correctly scale the model, as well as translate it to put it's center at 0, 0, 0

 

Edit, task completed.

Edited by dteviot
Link to comment
Share on other sites

I'd also suggest improving the way the user can rotate the models on X-Net. Currently it works very awkward and we need to make sure the whole model converted properly. Edited by dteviot
task completed
Link to comment
Share on other sites

we need to make sure the whole model converted properly.

Any in particular?

Not really, I just found the controls for the X-Net camera awkward compared to... say, the Planetview camera. Not saying there's anything wrong with the models, but I like to easily see them from all angles. :)

 

Edit: Task completed

Edited by dteviot
Link to comment
Share on other sites

Job for recruits.

 

New job for recruits, add an alien mission button to the geoscape.

When pressed, brings up a dialog that will launch Build Outpost, infiltration and Retalion missions close to the X-Corp base.

Useful for testing.

Another comment, I'm not adding 3D models at moment. I'm assuming SupSuper is doing it.

Edited by dteviot
Task completed
Link to comment
Share on other sites

New job for recruits, add an alien mission button to the geoscape.

When pressed, brings up a dialog that will launch Build Outpost, infiltration and Retalion missions close to the X-Corp base.

Useful for testing.

If nobody is currently working on this, I'll do it. I was also thinking of adding a configuration option somewhere to enable/disable the testing features (like this, and the unit test buttons). I think startsettings.xml makes sense, since it has the cheats section there.

 

task completed

Edited by dteviot
Link to comment
Share on other sites

New job for recruits, add an alien mission button to the geoscape.

When pressed, brings up a dialog that will launch Build Outpost, infiltration and Retalion missions close to the X-Corp base.

Useful for testing.

If nobody is currently working on this, I'll do it. I was also thinking of adding a configuration option somewhere to enable/disable the testing features (like this, and the unit test buttons). I think startsettings.xml makes sense, since it has the cheats section there.

Go for it.

Edited by dteviot
Link to comment
Share on other sites

  • 2 weeks later...

  • A reasonably simple job, implement the "Stores" screen that shows the item's in a Base's inventory. (The one off Geoscape->Bases->Base Information (that shows stats for base)->Stores.)
    Could do it as a cut an paste job using the existing SellScreen as the donor. A more elegant solution would be re-use the SellScreen, with a parameter to switch it between modes. Inheritance is also a possibility.
  • Another job, the sibling "Funds" screen that shows the breakdown for rental costs for the month.
  • And a final job, calculating the base's "defense value" and showing on the Base Info screen. Values can be found here:
    http://www.xcomufo.com/x1ufopaedia/fac.html
    I note that the "defense value" from above site matches the damage attribute in facility.xml. Has anyone (i.e. Zombie) checked that the defense value IS the damage value. If defense value IS damage, then shouldn't the real defense value be damage times accuracy?

Edited by dteviot
Tasks completed
Link to comment
Share on other sites

I note that the "defense value" from above site matches the damage attribute in facility.xml. Has anyone (i.e. Zombie) checked that the defense value IS the damage value. If defense value IS damage, then shouldn't the real defense value be damage times accuracy?

Well, the defense values and hit ratios are found in the game files and they match the documentation exactly. I did some minor tests with the defensive systems a while back, but it takes ages to gather an appreciable amount of data as the process has to be done manually. Initial results suggest the damage values and hit ratios are correct. Technically yes, the hit ratio should be multiplied by defense strength but that's not how the original game displayed those values (you can change them if you want as it is more accurate). Then again, the detection capabilities of a base are kind of screwed up too. The base info screen just shows how many facilities of each radar group are installed. It tells nothing about the actual capabilities of all of the bases radars. :wink1:

- Zombie

 

Edit: task completed

Edited by dteviot
Link to comment
Share on other sites

I note that the "defense value" from above site matches the damage attribute in facility.xml. Has anyone (i.e. Zombie) checked that the defense value IS the damage value. If defense value IS damage, then shouldn't the real defense value be damage times accuracy?

Well, the defense values and hit ratios are found in the game files and they match the documentation exactly. I did some minor tests with the defensive systems a while back, but it takes ages to gather an appreciable amount of data as the process has to be done manually. Initial results suggest the damage values and hit ratios are correct. Technically yes, the hit ratio should be multiplied by defense strength but that's not how the original game displayed those values (you can change them if you want as it is more accurate). Then again, the detection capabilities of a base are kind of screwed up too. The base info screen just shows how many facilities of each radar group are installed. It tells nothing about the actual capabilities of all of the bases radars. :wink1:

 

- Zombie

Well, I've fixed the radars, and I say fix the base defense values as well. So defense value = damage * accuracy.

 

Edit: task completed

Edited by dteviot
Link to comment
Share on other sites

New task:

Animate the viper model.

I think darkhomb said that the viper model contains a number of animations. (e.g. shoot, move, die.) As we probably want it to do those animations on the battlescape, it would be good to see if we can make them work. And as the model is being shown in X-Net, someone should see if they can make it work there.

Link to comment
Share on other sites

New task:

There's a minor issue with the new research screen.

Specifically, you can't specify which scientists are assigned/removed from a project.

This isn't a major problem UNLESS you want to relocate all the scientists from one outpost to another. e.g. You're moving all research to a dedicated research outpost (which is now unnecessary), so maybe you're converting to a dedicated engineering outpost instead.

Anyway, in order to do this, you need to remove all scientists from all active projects, move the scientists you want moved, and then put the scientists back to the projects they were working on.

And at the moment, you have to allocate/deallocate scientists on a one by one basis.

So, I suggest adding 2 more buttons to this screen.

"Remove all scientists" and "Add all idle scientists"

Way they work is,

1. Select a project,

2. Click button.

Note, these buttons will apply to the selected project only. i.e. Remove all scientists will remove all scientists from the currently selected project, not all projects.

I assume that with the new research system most people are only going to have a small number (2 or 3) of research projects running at any one time.

Edit: task completed

Edited by dteviot
Link to comment
Share on other sites

  • 1 month later...

New task:

Currently there's a crash handler that grabs the exception/stack trace and shows it on a message box.

Most people don't realize they can use ctrl-C to copy the error text to the clipboard and post in to us.

So, task is replace the message box with a simple dialog with a multiline edit box with the text (with scroll bars), and a button "Copy error text to clipboard"

So they can post the text directly to the forum. No need for large screenshots.

 

edit: task completed

Edited by dteviot
Link to comment
Share on other sites

  • 3 weeks later...

new task:

Credits screen.

Basic idea is that we have a text file that lists the credits.

Then we have a screen that gradually scrolls the text.

Probably way to implement it is use SpriteFont.

Measure hight of screen in rows of text. Call this Y

Read Y + 1 rows of text from credits.txt

Draw them on screen.

Then use elapsed time in Draw() call to advance text up screen.

When scroll line of text of top of screen, discard topmost text, load next line from credits.txt.

Rince, repeat.

 

Putting the credits in a separate text file should

1. Allow the CTD to easily update the credits.

2. Allow people to view the credits without running Xenocide.

Edit: completed

Edited by dteviot
Link to comment
Share on other sites

  • 1 month later...

new task, revise the "Equip Craft" screen.

Looking at how cool the new Equip Soldier screen is, it occurs to me that it might be possible to update the equip craft screen to work in a similar manner.

That is, we have an image of the craft, and can drag and drop weapons onto it.

However, instead of using 2D images, we could use the 3D models of the craft and weapons.

Link to comment
Share on other sites

  • 2 weeks later...

New Tasks.

  • The A* pathfinding engine works, but could use some cleanup. Issues:
    • Function parameter lists are inconsistent, with position information being passed as Vector3s, ints and MoveData. Should standardise the interfaces. (Whichever is most efficient.)
    • Pathfinder.OpenList class was built with emphasis on getting it written as quickly as possible. It should probably be re-written using a red-black tree, or a skip list.
    • Terrain.CanMoveHorizontal() uses delegates. I suspect this is very inefficent.
    • Should set up some serious pathfinding performance tests, and measure how well it really works. (Do we even need to optimise?)

    [*]Add a "default loadout" element to start settings. Equip all starting soldiers with this loadout.

Link to comment
Share on other sites

New Task.

There's a minor issue with the Geoscape shader.

Specifically, the shader uses one calculation to do both bump (normal) mapping and day/night light intensity. Consequently, the bump mapping only works during the "twilight" period of dawn and dusk. This should be fixed.

Link to comment
Share on other sites

  • 2 weeks later...

The UFO:AI people use GTKRadiant to build maps, then use Ufo2map to process it into a level.

It would be good if someone could spend some time looking into how it works, and see if we could create a tool to generate Xenocide terrain maps from the raw GTKRadiant maps. (Look particularly at routing.c)

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...