project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wrwrwr

Pages: [1] 2
1
Coding / Re: SConscript sketch
« on: January 22, 2009, 07:11:09 am »
Thanks for spotting the thread. Of course this would need a lot of work, moreover someone could write a CMake one too (this is the one that can generate project files out of the box, and is said to be a decent tool also), and maybe some other, so you can compare. Nevertheless, lets push that a little step forward.



Yes, installation, this is an interesting feature ;)

Added directory configuration, install targets and shell starters generation, example:

Code: [Select]
scons prefix=/usr/local bindir=bin gamedir=games/ufoai install

Note that the directory with data and executables is called gamedir and not datadir -- just doesn't feel like data. One question here is how should radiant be installed.

This requires pk3 generation, so it is partially done (using python's zipfile module) -- it can only recreate zips, can't update them. Appending new files isn't hard, but I don't know how to delete unneeded ones from the archive (I've seen a custom module somewhere that can do that, but haven't tried that yet). By the what are the use cases for pk3's, this is needed only if someone 'make install's or builds one of the installers?



Update-po-radiant went rather easily, could be improved by making a simple builder that would search for xgettext and allow setting gettextdir, Wesnoth has something in this direction: http://svn.gna.org/viewcvs/wesnoth/trunk/scons/gettext.py.

Update-po: wow, this is quite convoluted, I enjoyed studying those scripts, because I'm not the one who's maintaining them :) My understanding here is that:

  • first this generates the message catalog (.pot) by scanning client/game sources, .ufos and .umps; using xgettext in the former case and ufoai.pl in the latter,
  • charset=CHARSET should be replaced by charset=UTF-8,
  • if the new file and the old file differ only in creation date line, then the .pot is not replaced,
  • file paths need to be relative to the src directory,
  • in the end it merges .pot with each translation.

Is this right or am I missing something? Why ufo and radiant have their rules so different (different base, with and without a header, different options, update-po-radiant not msgmerging .po-s)?

I've been seriously considering just running make here, but in the end managed to get a .pot that diffs in just a few lines compared to the make's one (five within the header: names of source/base partial .pots, creation dates and one msgid for m_node_base.c:190, which po-check apparently misses; uforadiant.pot comes out 100% same provided you add --sort-by-file and --no-wrap to the makefile rule). The solution uses OTHER_STRINGS and ufopo.pl (which it shouldn't -- would be cleaner and faster to write a small builder for that), but ignores POTFILES.in, FINDUFOS etc. completely -- just globs for client/game/radiant sources instead (or uses a list constructed earlier when appropriate). Please, note that if you change a translatable string in source and just type 'scons' it will refresh the .pot and update .po-s; might be a little scary, but I'd say this is the right thing to do (this is because compiled translations are set as a default target and it can figure out that they depend on .po-s and these depend on .pot; also xgettext, msgmerge or msgcat commands don't have a builder, so need to be in path and don't pretty print yet).



Also:
  • aliases for some targets (client, server, game, ufo2map, radiant, langs, maps, archives, install, update-po, update-po-radiant); you can always use the target name also, but with maps this would be inconvenient ;) ,
  • fixed some FIXMEs,
  • and most importantly: written a list of tasks that need to done before this is usable (inside the SConstruct).


It has become somewhat big and slow already (that is the null build takes more than it could take), partly due to my lousy programming -- there's no optimization in the SConscript itself -- some parts of it often don't need to be analyzed (for example: unless it's install there is no need to parse install rules). Moreover, I have to admit that the script needed adding shared/parse.c manually to sources' lists (can't glob 'shared' because different parts use different files therein).

[attachment deleted by admin]

2
Coding / Re: SConscript sketch
« on: January 18, 2009, 09:21:54 pm »
Mhm, great interest  ::)

Here's a small update:
  • proper translations directory structure, so they really work now,
  • radiant plugins compiled before maps too,
  • do not use map for side effects as this wouldn't work with Py3k.

Nevertheless, I've been using this to compile the game and catch a few aliens every once in a while since the original posting, and no file list changes were required as those made in *.mks, so I'm reasonably satisfied with this script (still, platforms other than posix-compliant are possible, but not handled, same goes with cross compilation or archives & package building).

[attachment deleted by admin]

3
Coding / SConscript sketch
« on: January 04, 2009, 04:46:45 pm »
Needed some project to test my little SCons regular expression globbing utility, UFO looked very suitable with it's original directory structure. However once that was finished, I've added a few lines (and then a few lines more ;)) and got a SConscript that can compile game with maps and languages and radiant (without packages/archives/utility targets).

Considering that you already have autoconf scripts, this is probably quite useless -- but who knows maybe it'll help somebody with something -- so I'll share anyway. Part of mingw and mac configuration is dropped, but could be readded if someone is interested; on the other hand it's < 300 lines compared to > 1500 of configure.ac + Makefile.in + *.mk (of course you need SCons (http://scons.org) and Python (http://python.org) to use it).

[attachment deleted by admin]

4
Windows / Re: Windowed mode sucks
« on: March 22, 2008, 12:42:56 pm »
You're rather low on operating memory, i've just checked that ufo allocates ~645 MB of virtual memory, so with just 512 a lot of paging may be going on and slowing everything down.

About that brightness, you can't just set it higher through the video options?, i don't think i understand the problem.

5
Linux / Re: Install
« on: March 20, 2008, 08:17:55 am »
With this .run file remember you need to be in the same directory as the file, i.e. do: "cd <directory name>", till "ls" shows you do file.

You may also need to make it exectutable: "chmod u+x ufoai-2.2-linux.run".

Another thing is the case sensitivity of *nixes, it does matter wheter you use capital letters or not.

Last but not least, you run things in the current directory by preceding the name with "./" on most distributions, so: "./ufoai-2.2-linux.run".

6
Windows / Re: Game auto-starts when starting windows
« on: March 20, 2008, 08:07:04 am »
There are many places in windows registry working like autostart, but there's a handy utility to quickly find and check them all: http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx.

7
Windows / Re: Low framerate at tactical combat
« on: March 20, 2008, 07:57:25 am »
Not much help probably too, but you should be able to find ufoconsole.log file (here you can find info on locations: http://ufoai.ninex.info/wiki/index.php/Bugs). There's a lot of info on video configuration detected by the game there, so it may be a good start.

8
Design / Re: Manual 2
« on: March 20, 2008, 07:31:25 am »
Maybe it's also worth noting that there are different editors for latex, not exactly wysiwig, but highlighting, completion, wizards etc. can help a lot, especially until you know the language well.

One that i've used is Kile (for KDE; http://sourceforge.net/projects/kile/), but there's at least one for windows too.

9
Mapping / Re: Blender map exporter
« on: February 03, 2008, 02:53:23 pm »
Currently on default it exports with something found on many day maps (light 160, _color 1.0 0.8 0.8, angles 30 210, ambient 0.4 0.4 0.4). This is configurable, but I wanted to add an option to set it to day or night defaults anyway (todo list is growing rather fast :)

But what I wanted to know is, if not writing those light options could cause any trouble? I can output "light 1" or "light 10" or skip it completely or write "ambient 0 0 0" or nothing at all. Would it make any difference?

10
Mapping / Re: Blender map exporter
« on: February 01, 2008, 01:35:58 pm »
Another thing, maybe i should always write some light and ambient setting to the map file? As for the night maps for example?

11
Mapping / Re: Blender map exporter
« on: February 01, 2008, 01:30:26 pm »
./ufo2map base/maps/penguins.map
No errors or warnings of any kind.

Adding the -extra switch doesn't seem to change anything. However a dri error shows up: "[driAllocateTexture:636] unable to allocate texture". This is a bit of another issue. Happens when using large textures. For example, if I make this very texture 1024x1024, it fails to load (appears nearly all black) and those errors are continuously printed (I could've used textures of that size with 2.2 too, but I blame the limited texture memory not being able to accommodate the engine improvements for that.).

The default brightness seems to be set to 1.5, so isn't it expected that bright points end up completely white? I can simply make the image darker and get the expected result with the default settings.

12
Mapping / Re: Blender map exporter
« on: February 01, 2008, 12:49:55 am »
At last some time to research the texture problem. 13833 looks nice, 13834 not any longer. R_FilterTexture in r_image is causing this. More specifically, setting r_brightness to 1 makes it look ok again.

Might this be due to the fact that the scene is very dim (no sunlight at all) while the texture is mostly white?

13
Mapping / Re: Blender map exporter
« on: January 23, 2008, 07:47:22 pm »
No, no materials, that's the very map you can get from my page. There's also another issue with it -- if I make the texture bigger (1024x1024, currently 512x512) it loads fine in 2.2, but fails to load with some DRI error with 2.3. (I'm using the open source ati driver from mesa.)

I'll try to reproduce the error and find the exact revision, but it'll also have to wait a bit, sorry for that.

14
Mapping / Re: Blender map exporter
« on: January 23, 2008, 03:23:45 pm »
Sure, you can move it all to wiki, I'll stick to it too. I wouldn't mind a link to my page however :) I may put there some personal todo or I don't know what yet. Added FDL as the text licence, let me know if you need some other.

Attaching a screenshot of the penguins map with the head ufo, a difference is especially visible for the pond. I have a rather old graphics card, maybe it's only me?

As for the path finding, more or less it does; for example on the second map it won't find a path from the bottom to the top, but you can make it in three or four steps. The AI has some glitches with that, but usually it does ok (I've experienced an alien not doing anything, or just moving not shooting a couple of times).

I'm a bit pressed for time till the week end, but I should be able to inspect the material system and do some more coding in a couple of days. Would be good if someone could compile some list of most needed, missing things.

[attachment deleted by admin]

15
Mapping / Blender map exporter
« on: January 23, 2008, 06:58:43 am »
I present you a script, which (from time to time ;) can export a Blender scene as an UFO map. What started as a small experiment, over time has grown to a nice piece of software. Of course Blender is not a mapping tool, what causes some trouble (basically you have to restrict yourself to a subset of its capabilities), and the exporter adds even more limitations, nevertheless it should already be usable.

Why would you want to use anything other than GTKRadiant? For most the answer is: You wouldn't. But here are some pros of using Blender:

- it's easier to map in a 'non-rectangular' way (Blender has many tools for making complex meshes, however note that the engine directly only supports simple, convex brushes),
- you can use one tool for mapping and modelling,
- you can make use of your experience with Blender, while learning a new tool is not always convenient,
- and last, but not least, Blender has exporters for both Crystal Space and OGRE, so it should be reasonably easy to reexport maps if you ever decide to make the engine switch.

Read a bit of a story: http://www.wrwrwr.org/2008/january/blender-ufo, or jump right to the dowload & documentation (some example maps included): http://www.wrwrwr.org/b2ufo.

Looking forward to some comments,
wrwrwr.



Pages: [1] 2