Giter Site home page Giter Site logo

ufoaiorg / ufoai Goto Github PK

View Code? Open in Web Editor NEW
148.0 148.0 53.0 3.41 GB

UFO:Alien Invasion

Home Page: http://ufoai.sf.net

License: GNU General Public License v2.0

Makefile 0.37% Java 1.09% Lua 0.64% Shell 0.24% Perl 0.44% Python 0.91% HTML 0.04% GLSL 0.12% C++ 33.91% NSIS 0.04% JavaScript 0.01% CSS 0.01% Smarty 0.01% Xtend 0.01% C 55.44% Objective-C 5.66% TeX 0.14% CMake 0.53% Assembly 0.06% PHP 0.34%

ufoai's People

Contributors

aduke1 avatar amishaa avatar andrewsmart avatar anthraxx avatar apoleon avatar bayo avatar bboyadzhiev avatar darkrainx avatar devnexen avatar dranedrane avatar geever avatar hivert avatar hwoarangmy avatar internecivusraptus avatar kildor avatar lo9 avatar maikgreubel avatar maximaximum avatar mgerhardy avatar namerutan avatar nokim avatar radius75 avatar ronnystandtke avatar rxadmin avatar solooboroten avatar uvadzucumi avatar x42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ufoai's Issues

Compilation on Windows fails

What am I doing wrong? I did follow https://ufoai.org/wiki/Compile_for_Windows but didn't install mingw-w64-i686-googletest because it said it doesn't exist.
I downloaded msys2 from here https://www.msys2.org/ I ran the pacman install command in MINGW32 terminal
I get the following text in Codeblocks Build log
I removed 500 lines of repeating complaints about uname and cut not existing.
-------------- Build: game in UFO:Alien Invasion (compiler: MinGW-W64 i686)---------------

Checking if target is up-to-date: mingw32-make.exe -r -R -q -f Makefile game
Running command: mingw32-make.exe -r -R -f Makefile game
'uname' is not recognized as an internal or external command,
operable program or batch file.
'cut' is not recognized as an internal or external command,
operable program or batch file.
-z was unexpected at this time.
process_begin: CreateProcess(NULL, pwd, ...) failed.
build/install_mojo.mk:45: pipe: No error
process_begin: CreateProcess(NULL, pwd, ...) failed.
build/install_mojo.mk:45: pipe: No error
The system cannot find the path specified.
process_begin: CreateProcess(NULL, pwd, ...) failed.
build/install_mojo.mk:47: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, pwd, ...) failed.
build/install_mojo.mk:47: pipe: Bad file descriptor
'xargs' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Access denied - BASE/MODELS
File not found - -NAME
Access denied - BASE/MODELS
File not found - -NAME
Access denied - BASE/MODELS
File not found - -NAME
Access denied - BASE/MODELS
File not found - -NAME
'LANG' is not recognized as an internal or external command,
operable program or batch file.
'uname' is not recognized as an internal or external command,
operable program or batch file.
'uname' is not recognized as an internal or external command,
operable program or batch file.
Makefile:66: build/platforms/.mk: No such file or directory
mingw32-make: *** No rule to make target 'build/platforms/.mk'. Stop.
Process terminated with status 2 (0 minute(s), 28 second(s))
5 error(s), 0 warning(s) (0 minute(s), 28 second(s))

put down object

al time in the same place make this, mor of 30 times i repeat the same process and obtained the same bug.

i put a grenade in this place, and apear a cube jaja :P sorry is funny but if you teach me how the source code is built, I just need to tell me what each file does and I can review it promptly and find an efficient solution for you to make the final decision if you agree to include the repair or not, and work once more on something that you consider appropriate

ufo_2018-04-25_22-48-39

ufotestall segfault on macOS 10.12.6

Following build instructions as in #40 gives this segfault running lldb ufotestall:

[==========] Running 130 tests from 17 test cases.
[----------] Global test environment set-up.
[----------] 31 tests from CampaignTest
Process 51613 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00007fffd503fd5d libGL.dylib`glBindTexture + 18
libGL.dylib`glBindTexture:
->  0x7fffd503fd5d <+18>: movq   (%rdx), %rdi
    0x7fffd503fd60 <+21>: movq   0x30(%rdx), %rax
    0x7fffd503fd64 <+25>: movl   %ecx, %esi
    0x7fffd503fd66 <+27>: movl   %r8d, %edx
Target 0: (ufotestall) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fffd503fd5d libGL.dylib`glBindTexture + 18
    frame #1: 0x0000000100164e05 ufotestall`R_BindTexture_(texnum=1) at r_state.cpp:65
    frame #2: 0x0000000100164d74 ufotestall`R_BindTextureDebug(texnum=1, file="/Users/cqm540/repos/ufoai/src/client/renderer/r_image.cpp", line=541, function="image_t *R_LoadImageData(const char *, const byte *, int, int, imagetype_t)") at r_state.cpp:74
    frame #3: 0x0000000100133b1b ufotestall`R_LoadImageData(name="pics/icons/windowinfo", pic="\x96ǐ", width=18, height=18, type=it_pic) at r_image.cpp:541
    frame #4: 0x000000010013401a ufotestall`R_FindImage(pname="pics/icons/windowinfo", type=it_pic) at r_image.cpp:630
    frame #5: 0x000000010021d77e ufotestall`UI_LoadImage(name="icons/windowinfo") at ui_render.cpp:93
    frame #6: 0x000000010021ec69 ufotestall`UI_AutoGenerateSprite(name="icons/windowinfo") at ui_sprite.cpp:75
    frame #7: 0x000000010021eb79 ufotestall`UI_GetSpriteByName(name="icons/windowinfo") at ui_sprite.cpp:121
    frame #8: 0x000000010017a089 ufotestall`UI_Button_SetIconByName(node=0x000000010574e3a0, name="icons/windowinfo") at ui_node_button.cpp:174
    frame #9: 0x00000001001b9ccd ufotestall`uiButtonNode_t_set_icon(self=0x000000010574e3a0, name="icons/windowinfo") at ui_lua_shared.cpp:3026
    frame #10: 0x00000001001b9c00 ufotestall`_wrap_uiButton_set_icon(L=0x000000010520b220) at ui_lua_shared.cpp:9244
    frame #11: 0x0000000100429154 ufotestall`luaD_precall(L=0x000000010520b220, func=0x00000001068bdb10, nresults=0) at ldo.c:319
    frame #12: 0x0000000100442c37 ufotestall`luaV_execute(L=0x000000010520b220, nexeccalls=3) at lvm.c:586
    frame #13: 0x00000001004298d0 ufotestall`luaD_call(L=0x000000010520b220, func=0x000000010520b600, nResults=-1) at ldo.c:377
    frame #14: 0x000000010041dfef ufotestall`f_call(L=0x000000010520b220, ud=0x00007fff5fbfeb38) at lapi.c:793
    frame #15: 0x0000000100428805 ufotestall`luaD_rawrunprotected(L=0x000000010520b220, f=(ufotestall`f_call at lapi.c:791), ud=0x00007fff5fbfeb38) at ldo.c:116
    frame #16: 0x0000000100429cca ufotestall`luaD_pcall(L=0x000000010520b220, func=(ufotestall`f_call at lapi.c:791), u=0x00007fff5fbfeb38, old_top=48, ef=0) at ldo.c:460
    frame #17: 0x000000010041df7a ufotestall`lua_pcall(L=0x000000010520b220, nargs=0, nresults=-1, errfunc=0) at lapi.c:814
    frame #18: 0x000000010020b15d ufotestall`UI_ParseAndLoadLuaScript(name="_assets.ufo", text=0x00007fff5fbfed30) at ui_lua.cpp:396
    frame #19: 0x00000001001143ca ufotestall`CL_ParseClientData(type="lua", name="_assets.ufo", text=0x00007fff5fbfed30) at cl_main.cpp:810
    frame #20: 0x000000010026ebd9 ufotestall`Com_ParseScripts(onlyServer=false) at scripts.cpp:3727
    frame #21: 0x00000001002fc527 ufotestall`CampaignTest::SetUpTestCase() at test_campaign.cpp:93
    frame #22: 0x00000001003dae93 ufotestall`testing::TestCase::RunSetUpTestCase(this=0x0000000105200420) at gtest.h:855
    frame #23: 0x0000000100411b5e ufotestall`void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::TestCase, void>(object=0x0000000105200420, method=80 ae 3d 00 01 00 00 00 00 00 00 00 00 00 00 00, location="SetUpTestCase()")(), char const*) at gtest.cc:2078
    frame #24: 0x00000001003dac3b ufotestall`void testing::internal::HandleExceptionsInMethodIfSupported<testing::TestCase, void>(object=0x0000000105200420, method=80 ae 3d 00 01 00 00 00 00 00 00 00 00 00 00 00, location="SetUpTestCase()")(), char const*) at gtest.cc:2114
    frame #25: 0x00000001003daace ufotestall`testing::TestCase::Run(this=0x0000000105200420) at gtest.cc:2439
    frame #26: 0x00000001003e94fc ufotestall`testing::internal::UnitTestImpl::RunAllTests(this=0x0000000105200100) at gtest.cc:4315
    frame #27: 0x000000010041375e ufotestall`bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x0000000105200100, method=70 91 3e 00 01 00 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2078
    frame #28: 0x00000001003e8f0b ufotestall`bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x0000000105200100, method=70 91 3e 00 01 00 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2114
    frame #29: 0x00000001003e8db8 ufotestall`testing::UnitTest::Run(this=0x0000000104a72128) at gtest.cc:3926
    frame #30: 0x00000001002fb5a1 ufotestall`RUN_ALL_TESTS() at gtest.h:2288
    frame #31: 0x00000001002fb011 ufotestall`main(argc=1, argv=0x00007fff5fbff968) at test_all.cpp:135
    frame #32: 0x00007fffe6372235 libdyld.dylib`start + 1
    frame #33: 0x00007fffe6372235 libdyld.dylib`start + 1

Avoid wobbling in static vertices from MD2 files exported via the Blender plugin

Sorry for using the issues instead of a pull request, but i do not use UFO:AI nor have git installed.

I found the MD2 exporter from a forum and while it works fine, it introduces wobbling even in static vertices because it recalculates the bounding box for every frame. This is fine for characters or other objects that animate all of their parts, but for partially animated objects this can be annoying. My case was a flag on a pole - the flag waves and this causes the bounding box to change which in turn causes the pole to wobble.

I added a small option to calculate a shared bounding box between all frames and use that instead of calculating a box for each frame. This obviously slows down the export since it has to do two passes and reduces the available resolution, but on the other hand it eliminates the wobble effect on vertices that do not change. The option is disabled by default so the addon should work as previously.

The change is very small and you can even replicate it just by looking at the patch file.

io_mesh_md2-shared-bbox.patch.txt

Reaction fire on aliens broken?

In current 2.6 master build aliens can come up, shoot you few times, hide, and when you engage them next turn, they still have full TU's for reaction fire (ie. two-three blasts from plasma rifle).

This makes any weapon above 8TU almost useless to shoot, and only indirect fire is safe. Forget about unloading FA point blank, your soldier will be almost always dead before it goes off. And sniper shots are borderline suicidal.

I'm not sure if this is intended, that aliens should have almost twice the TU-s, but it was so frustrating that after few lost soldiers to pure bs I disabled it all together in base/ai/alien.lua. If someone has the same issue, you can change ai.reactionfire("enable") to ai.reactionfire("disable").
Not perfect, because sometimes I expect RF, like from camping alien, but at least I can play now.

BFD API changed with binutils 2.34

Compile fails with the latest version of binutils.

src/shared/bfd.cpp: In function ‘void lookup_section(bfd*, asection*, void*)’:
src/shared/bfd.cpp:61:8: error: ‘bfd_get_section_flags’ was not declared in this scope; did you mean ‘bfd_set_section_flags’?
   61 |  if (!(bfd_get_section_flags(abfd, sec) & SEC_ALLOC))
      |        ^~~~~~~~~~~~~~~~~~~~~
      |        bfd_set_section_flags
src/shared/bfd.cpp:64:22: error: ‘bfd_get_section_vma’ was not declared in this scope; did you mean ‘bfd_set_section_vma’?
   64 |  const bfd_vma vma = bfd_get_section_vma(abfd, sec);
      |                      ^~~~~~~~~~~~~~~~~~~
      |                      bfd_set_section_vma
src/shared/bfd.cpp:65:35: error: ‘bfd_get_section_size’ was not declared in this scope; did you mean ‘bfd_set_section_size’?
   65 |  if (data->counter < vma || vma + bfd_get_section_size(sec) <= data->counter)
      |                                   ^~~~~~~~~~~~~~~~~~~~
      |                                   bfd_set_section_size
===> CXX [testall] src/shared/utf8.cpp
make: *** [Makefile:183: debug-linux-x86_64/testall/shared/bfd.cpp.o] Error 1

The solution is to change the function calls like so:

/**
 * @file
 * @brief Stacktrace functions (libbfd/binutils)
 */

/*
All original material Copyright (C) 2002-2020 UFO: Alien Invasion.

Copyright (C) 1997-2001 Id Software, Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

#include "../common/common.h"

#ifdef HAVE_BFD_H
#include "bfd.h"

void output_init (struct output_buffer* ob, char*  buf, size_t sz)
{
	ob->buf = buf;
	ob->sz = sz;
	ob->ptr = 0;
	ob->buf[0] = '\0';
}

void output_print (struct output_buffer* ob, const char*  format, ...)
{
	va_list ap;
	if (ob->sz == ob->ptr)
		return;
	ob->buf[ob->ptr] = '\0';
	va_start(ap, format);
	vsnprintf(ob->buf + ob->ptr, ob->sz - ob->ptr, format, ap);
	va_end(ap);

	ob->ptr = strlen(ob->buf + ob->ptr) + ob->ptr;
}

static void lookup_section (bfd* abfd, asection* sec, void* opaque_data)
{
	struct find_info* data = (struct find_info*)opaque_data;

	if (data->func)
		return;

	if (!(bfd_section_flags(sec) & SEC_ALLOC))
		return;

	const bfd_vma vma = bfd_section_vma(sec);
	if (data->counter < vma || vma + bfd_section_size(sec) <= data->counter)
		return;

	bfd_find_nearest_line(abfd, sec, data->symbol, data->counter - vma,
			&(data->file), &(data->func), &(data->line));
}

void find (struct bfd_ctx * b, size_t offset, const char** file, const char** func, unsigned* line)
{
	struct find_info data;
	data.func = nullptr;
	data.symbol = b->symbol;
	data.counter = offset;
	data.file = nullptr;
	data.func = nullptr;
	data.line = 0;

	bfd_map_over_sections(b->handle, &lookup_section, &data);
	if (file) {
		*file = data.file;
	}
	if (func) {
		*func = data.func;
	}
	if (line) {
		*line = data.line;
	}
}

static void list_matching_formats (struct output_buffer* ob, const char*  procname, char** p)
{
	if (!p || !*p)
		return;

	output_print(ob, "%s: Matching formats: ", procname);
	while (*p)
		output_print(ob, " %s", *p++);
	output_print(ob, "\n");
}

static int init_bfd_ctx (struct bfd_ctx* bc, const char*  procname, struct output_buffer* ob)
{
	void* symbol_table;
	unsigned dummy = 0;
	char** matching = nullptr;

	bc->handle = nullptr;
	bc->symbol = nullptr;

	bfd* b = bfd_openr(procname, 0);
	if (!b) {
		output_print(ob, "Failed to open bfd from (%s)\n", procname);
		return 1;
	}

	if (bfd_check_format(b, bfd_archive)) {
		output_print(ob, "Cannot get addresses from archive (%s)\n", b->filename);
		bfd_close(b);
		return -1;
	}

	if (!bfd_check_format_matches(b, bfd_object, &matching)) {
		const char* errmsg = bfd_errmsg(bfd_get_error());
		output_print(ob, "%s (%s)\n", errmsg, b->filename);
		if (bfd_get_error() == bfd_error_file_ambiguously_recognized) {
			list_matching_formats(ob, b->filename, matching);
			free(matching);
		}
		bfd_close(b);
		return -1;
	}

	if ((bfd_get_file_flags(b) & HAS_SYMS) == 0) {
		const char* errmsg = bfd_errmsg(bfd_get_error());
		output_print(ob, "Failed to get file flags from (%s) %s\n", b->filename, errmsg);
		bfd_close(b);
		return 1;
	}

	if (bfd_read_minisymbols(b, FALSE, &symbol_table, &dummy) == 0) {
		if (bfd_read_minisymbols(b, TRUE, &symbol_table, &dummy) < 0) {
			const char* errmsg = bfd_errmsg(bfd_get_error());
			output_print(ob, "Failed to read symbols from (%s): %s\n", b->filename, errmsg);
			free(symbol_table);
			bfd_close(b);
			return 1;
		}
	}

	bc->handle = b;
	bc->symbol = (asymbol**)symbol_table;

	return 0;
}

static void close_bfd_ctx (struct bfd_ctx* bc)
{
	free(bc->symbol);
	if (bc->handle) {
		bfd_close(bc->handle);
	}
}

struct bfd_ctx* get_bc (struct output_buffer* ob, struct bfd_set* set, const char* procname)
{
	struct bfd_ctx bc;

	while (set->name) {
		if (Q_streq(set->name, procname)) {
			return set->bc;
		}
		set = set->next;
	}
	if (init_bfd_ctx(&bc, procname, ob)) {
		return nullptr;
	}
	set->next = (bfd_set*)calloc(1, sizeof(*set));
	set->bc = (bfd_ctx*)malloc(sizeof(struct bfd_ctx));
	memcpy(set->bc, &bc, sizeof(bc));
	set->name = strdup(procname);

	return set->bc;
}

void release_set (struct bfd_set* set)
{
	while (set->next) {
		struct bfd_set* temp = set->next;
		free(set->name);
		close_bfd_ctx(set->bc);
		free(set);
		set = temp;
	}
}

#endif

Obviously this should be generated in the configure stage, depending on the API version. But I have no idea how configure/make works.

Master branch lacks videos

I'm unable to run the game after compiling, intro won't play and the game just hangs after initial loading screen.
Doing make pk3 also tells me that the video files are missing, and there's no videos directory in /base.

make pk3:

zip warning: 0videos.pk3 not found or empty
zip warning: zip file empty

game output:

====== UFO Initialized ======
=============================
Switch grab input off
Could not load cinematic 'videos/intro'
Killed

2.6-dev Item buying and selling very slow

When I buy or sell items Items like weapons or magazines the game freezes for a long time (1-3 seconds). When selling or buying large amounts of items (such as magazines) this is very annoying.
Other items seem to work just fine, such as aircraft items. This also only occurs after playing for a while. When loading a save after a game restart this works in an acceptable amount of time.

I'm running a release build, built with gcc 9.3.0 on ubuntu mate, arm64. Commit ID a81222bd97dbd8bb692e2e50fa39503373fc4b23 from sourceforge

Buying/Selling items in bulk would be nice.

Suggestion: Hire personel with sortable stats-table

When you hire people you get a simple list of names on the left hand side. This is not very helpful. I have to click on every single name and remember the numbers to compare them, which takes a long time and can be easily avoided by not just showing their names but also their skill levels in a table.
It would also be nice if you could sort that table by clicking the table headers, to hire the best, say, sharpshooter or the strongest person for carrying your heavy duty gear.
And tooltips would be nice, too, giving a quick explanation what each stat does.

ufoai 2.5 self compiled auto scroll

I have compiled the UFOAI 2.5 stable from the https://ufoai.org/wiki/Download and https://ufoai.org/wiki/Debian for Trisquel 7 (based on Ubuntu 14.04). i have disabled testsuite and uforadiant in ./compile
Upon playing the game './ufo' in the battlescape after my first move, the aliens move the screen just scrolls downward. It's like the alien movements were done but the screen just keeps moving, liike pressing the W key or arrow key indefinitely. I am still trying to find more information as of this moment. So far this has occurred to me twice in the first battlescape mission mode.

Border glitch

Version 2.5
Debian testing

I have some purple/pink border glitch on some screen.
Last seen on hired scientists screen but not only on it.

Hard-light beams from projector

Light beams, created by projectors, seem to be hard objects, blocking fire. Typical case - at solar electric station, in room opposing to main entrance. Bloodspider inside it choose strange (visibly uncovered) end position while I tried to make another shooting practice with it (using snapshots). By surprise, something blocked shooting path and bullets indeed stuck at something... what finally appeared to be light beam from projector.

This... tech, imho, is even more advanced than forbidden from lore energy shields. Could be at least breakable glass :D

Fail to compil on archlinux

Hello,
I have this error message incompilation on Archlinux.
Does anybody can help me to fix it ?

===> CXX [testall] src/client/cgame/campaign/cp_base.cpp
src/client/cgame/campaign/cp_base.cpp: In function 'void B_SelectBase(const base_t*)':
src/client/cgame/campaign/cp_base.cpp:1614:39: error: format not a string literal and no format arguments [-Werror=format-security]
 1614 |                 cgi->Cmd_ExecuteString(va("ui_push bases %d", base->idx));
      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [Makefile:183: release-linux-x86_64/testall/client/cgame/campaign/cp_base.cpp.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Strange order of config.cfg write

ufoai trunk was compiled at 24.10.2017. But still exists.
The begining is that i tried to write custom resolution (1600x900) to config.cfg, since it is not in menu.
However, on game restart it is overwritten to previous value (for now the closest resolution i can have without truncation is 1440x900, with disabled stretching).

Today i tried first time to track, how config.cfg changes during ufo run.

Monitoring file: ~/.ufoai/2.6-dev/base/config.cfg
Initial resolution (after previous attempts): 1152x864 (both was selected in game, now written in config.cfg)

  1. Starting ufo, config.cfg is unchanged
  2. In settings - choosing another resolution, 1440x900.
    Log message: "Modified render related cvars"
  3. Pressing ok, ok and exiting game.
    It tells in log, that wrote config.cfg and keys.cfg.
    config.cfg modification time is increased, but only from first look.
    Looking into that file, i get resolution properties with old values:
    set vid_width "1152" a
    set vid_height "864" a
  4. Starting game again.
    From log:
    I: try to get display with 1440x900
    Game settings show this resolution, which was selected earlier.
    but... config.cfg is unchanged, and still has:
    set vid_width "1152" a
    set vid_height "864" a
  5. Closing game.
    config.cfg is changed, and now has resolution according to settings:
    set vid_height "900" a
    set vid_width "1440" a

It seems, that it stores resolution somewhere else, but i failed to find it even with strace.

$ strace -e trace=open ufo 2>&1 | cat > ~/ufo-ai-strace
$ cat ~/ufo-ai-strace | grep WR
open("/home/nick87720z/.ufoai/2.6-dev/base/ufoconsole.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
open("/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/uevent", O_RDONLY|O_CLOEXEC) = 26
open("/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2/uevent", O_RDONLY|O_CLOEXEC) = 26
open("/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/uevent", O_RDONLY|O_CLOEXEC) = 26
open("/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2/uevent", O_RDONLY|O_CLOEXEC) = 26
open("/home/nick87720z/.ufoai/2.6-dev/base/config.cfg", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 26
open("/home/nick87720z/.ufoai/2.6-dev/base/history", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 26
open("/home/nick87720z/.ufoai/2.6-dev/base/keys.cfg", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 26

Other written files don't have new resolution values.

Probably not only resolution is affected, there is report at forum, made with point to discuss before to report at bugtracker: https://ufoai.org/forum/index.php/topic,9131.0.html

Issue tracker broken

When opening any issue on the official bugtracker I get the following error:

Undefined variable: error
The following notice has stopped further execution:
Undefined variable: error in /home/mattn/htdocs/thebuggenie/core/templates/error.php, line 93

Herakles makes saving citizens difficult.

The Herakles dropship has a very poor design and it seems that it always lands with the opening facing the edge of the map, requiring most of the first turn trying to get your troops somewhere near where the battle is, making it unnecessarily difficult to save citizens.

When I look at troop troop carrier ships from the real world (e.g., WWII ships at Normandy) they landed with the opening to the enemy and tended to be wider so that troops could disembark more quickly. I wouldn't dare say that the overall shape of the ship should be changed, but I would say that it should allow troops to depart more quickly, probably with additional exits on the sides like the Firebird, though they need not be as wide.

I haven't dug too deeply into this game yet, but I'm guessing that this is actually dictated by the models? And that this would be in the models/aircraft/drop_herakles directory in one of the .pig/hog .pk3 files?

I did Quake mods a long, long, LONG time ago, but I'm guessing I'll need to figure out those tools again in order to modify this and present a patch?

thanks

website address

please change the website address

ufoai.sf.net > http://ufoai.ninex.info/wiki/ = can’t find the server at ufoai.ninex.info

https://ufoai.org/wiki/News is OK

help pleas

i try to use the forum, but not work the captcha
who i need contact ?
chrome_2018-04-26_14-40-54

Antarctica Broken Savegame File BUG

Bug testet with 2.5 and 2.6:
The following will happen, if an UFO is landing or crashing at antarctica area in geoscape the save game file will become corroupted, if you save form that time on.

Using 2.5 and 2.6 at Windows 10.

Suggestion: Production less expensive

Currently production of items costs just as much as buying them. For things you can't buy anyway, this makes no difference. For anything else it makes no sense to produce those items, unless you somehow buy out the stock of 100 units.
I propose that manufacturing items should be a fraction of the cost of buying them, because you already pay more because you need to pay the workers. Of course this needs a look into balancing so that you can't churn out expensive, but quick to produce items which you can then sell for silly profits.

Minimal build instructions for macOS Sierra

I thought I would share here some steps I had to go through to make master build on macOS Sierra and homebrew, since the build instructions on the wiki seem outdated.

  1. brew install gettext sdl2 sdl2_mixer sdl2_ttf libogg libvorbis libpng libjpeg
  2. Create build directory and run ccmake. Under t (advanced options), set:
  LIBINTL_INCLUDE_DIR              /usr/local/opt/gettext/include
  LIBINTL_LIBRARY                  /usr/local/opt/gettext/lib
  1. Make the following changes to the libcurl calls:
diff --git a/src/client/cl_http.cpp b/src/client/cl_http.cpp
index 342f74d..8e7b7bb 100644
--- a/src/client/cl_http.cpp
+++ b/src/client/cl_http.cpp
@@ -187,7 +187,7 @@ static void CL_StartHTTPDownload (dlqueue_t* entry, dlhandle_t* dl)
        curl_easy_setopt(dl->curl, CURLOPT_NOPROGRESS, 0);
        if (dl->file) {
                curl_easy_setopt(dl->curl, CURLOPT_WRITEDATA, dl->file);
-               curl_easy_setopt(dl->curl, CURLOPT_WRITEFUNCTION, nullptr);
+               curl_easy_setopt(dl->curl, CURLOPT_WRITEFUNCTION, NULL);
        } else {
                curl_easy_setopt(dl->curl, CURLOPT_WRITEDATA, dl);
                curl_easy_setopt(dl->curl, CURLOPT_WRITEFUNCTION, HTTP_Recv);
diff --git a/src/common/http.cpp b/src/common/http.cpp
index d2cdabb..023219c 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -177,7 +177,7 @@ static bool HTTP_GetURLInternal (dlhandle_t& dl, const char* url, FILE* file, co
        curl_easy_setopt(dl.curl, CURLOPT_FAILONERROR, 1);
        if (file) {
                curl_easy_setopt(dl.curl, CURLOPT_WRITEDATA, file);
-               curl_easy_setopt(dl.curl, CURLOPT_WRITEFUNCTION, nullptr);
+               curl_easy_setopt(dl.curl, CURLOPT_WRITEFUNCTION, NULL);
        } else {
                curl_easy_setopt(dl.curl, CURLOPT_WRITEDATA, &dl);
                curl_easy_setopt(dl.curl, CURLOPT_WRITEFUNCTION, HTTP_Recv);
  1. Run make and it should run until the final link step.

  2. Make the following changes to the link command in CMakeFiles/ufo.dir/link.txt:

    • Replace the -framework OpenGL -lGL -lrt link flags with just -framework OpenGL (sometimes -framework OpenGL is missing entirely)
    • Add in the missing linker flags for libintl: -L/usr/local/opt/gettext/lib -lintl (this can go at the end of the line)
  3. Run make again and the ufo binary should be made.

These instructions (with similar edits for step 5 for CMakeFiles/ufotestall.dir/link.txt) seem to work for all target other than UFORADIANT (which requires GTK and I didn't figure out how to get it to work yet). Hopefully, these instructions will be helpful to figure out how to get the CMake build process working on macOS.

Suggestion: Rebalance production times

I'm doing a normal campaign with and by now i'm 2 years in with 5 bases, 60 scientists and 5 workshops and I can barely keep up with production of ammo and new gear, to the point where I don't even have the spare capacity to build the new aircraft of any aircraft equipment. I am just about ready to start producing an aircraft or some alien aircraft armor when suddenly i get a new aircraft design and I scrap the production (which didn't even start because of a massive backlog on gear). I mean I pushed back molecular knives as backup weapons for my squad since the day i got it because I needed ammo, disassemble UFOs or build base laser defenses.
I'd be nice if you could buy the laser defenses, you can buy laser rifles and even coil guns after you research the stuff. But 200h for some aircraft plating for 20 workers seems excessive.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.