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.


Topics - xray

Pages: [1]
1
Windows / Solution to building uforadiant on windows platform
« on: July 21, 2015, 01:09:06 pm »
Hi,

I noticed the build for uforadiant on windows was broken due to some missing header files. I've attached them below. These files are typically created when running building gdk/gdkglext using configure. Unfortunately, configure drops the files somewhere in a user folder and in the source folder.

Apart from these files, the exec.h and exec.cpp need to be fixed. After that, it builds. To run you need to put the needed dll's in the uforadiant.exe folder or somewhere on the path.

xray

2
Linux / build of fork fails on linux: lua link error
« on: June 01, 2015, 09:52:35 pm »
Hi,

I've created a fork of the main branch to work on lua integration for the ui (see topic: lua design thoughts). Currently picking up where I left in januari and the first thing I wanted to do was to create a linux build environment so that build validation can also be performed on the linux platform (my dev platform is windows).

Now the following issue arises. The repository main branch compiles just fine on windows and linux using configure and make.
My fork however produces link errors if I use configure and make. If I use the C::B project, the build is succesfull on windows. On linux C::B uses the makefile, so it fails. All link errors are related to missing lua functions. So it somehow doesn't link in the required c-files (my guess)

But that doesn't make sense since the main branch also uses lua and this one is building fine. I cannot find any differences in the makefiles that explains this. But the truth is, I'm no expert on makefiles. My fork is found on https://github.com/rxadmin/ufoai.

Help please..

Thx.
xray

3
Newbie Coding / ANSI C99 guideline & c++ generics language feature
« on: July 11, 2014, 08:38:35 pm »
Hi,

I noticed in the source of list.h the following code:

Code: [Select]
template<typename T> inline T& LIST_Add(linkedList_t** const list, T const& data)
{
return *static_cast<T*>(LIST_Add(list, &data, sizeof(data))->data);
}

To my knowledge, templates are a C++ language feature. The coding guidelines state: use ANSI C99 only. I'm asking this because
I'm working on a hash table implementation. A generic hash table could be much easier written if we could use some of the C++ language features like "generics". How strict should I follow the guideline?

Any thoughts?

xray

4
Coding / error when compiling on win32 windows
« on: June 12, 2014, 08:30:47 pm »
Hi,

Since today I'm experiencing trouble with compiling the source. I first encounted a compile flag error (C++11 unsupported). I then checked the 'compile for windows' page. I followed the instructions to upgrade to TDM. However, since I'm working on a win32 platform I downloaded the 32-bit TDM version instead of the 64-bit mentioned.

Then compiled again to see the following errors

Code: [Select]
-------------- Build: windows in game (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -shared   -Wl,--dll -LZ:\_Development\Tools\TDM-MinGW\lib .objs\game\src\game\chr_shared.o .objs\game\src\game\g_actor.o .objs\game\src\game\g_ai.o .objs\game\src\game\g_ai_lua.o .objs\game\src\game\g_camera.o .objs\game\src\game\g_client.o .objs\game\src\game\g_cmds.o .objs\game\src\game\g_combat.o .objs\game\src\game\g_edicts.o .objs\game\src\game\g_events.o .objs\game\src\game\g_func.o .objs\game\src\game\g_health.o .objs\game\src\game\g_inventory.o .objs\game\src\game\g_main.o .objs\game\src\game\g_match.o .objs\game\src\game\g_mission.o .objs\game\src\game\g_morale.o .objs\game\src\game\g_move.o .objs\game\src\game\g_reaction.o .objs\game\src\game\g_round.o .objs\game\src\game\g_spawn.o .objs\game\src\game\g_stats.o .objs\game\src\game\g_svcmds.o .objs\game\src\game\g_trigger.o .objs\game\src\game\g_utils.o .objs\game\src\game\g_vis.o .objs\game\src\game\inv_shared.o .objs\game\src\game\inventory.o .objs\game\src\game\q_shared.o .objs\game\src\libs\lua\lapi.o .objs\game\src\libs\lua\lauxlib.o .objs\game\src\libs\lua\lbaselib.o .objs\game\src\libs\lua\lcode.o .objs\game\src\libs\lua\ldblib.o .objs\game\src\libs\lua\ldebug.o .objs\game\src\libs\lua\ldo.o .objs\game\src\libs\lua\ldump.o .objs\game\src\libs\lua\lfunc.o .objs\game\src\libs\lua\lgc.o .objs\game\src\libs\lua\linit.o .objs\game\src\libs\lua\liolib.o .objs\game\src\libs\lua\llex.o .objs\game\src\libs\lua\lmathlib.o .objs\game\src\libs\lua\lmem.o .objs\game\src\libs\lua\loadlib.o .objs\game\src\libs\lua\lobject.o .objs\game\src\libs\lua\lopcodes.o .objs\game\src\libs\lua\loslib.o .objs\game\src\libs\lua\lparser.o .objs\game\src\libs\lua\lstate.o .objs\game\src\libs\lua\lstring.o .objs\game\src\libs\lua\lstrlib.o .objs\game\src\libs\lua\ltable.o .objs\game\src\libs\lua\ltablib.o .objs\game\src\libs\lua\ltm.o .objs\game\src\libs\lua\lua.o .objs\game\src\libs\lua\lundump.o .objs\game\src\libs\lua\lvm.o .objs\game\src\libs\lua\lzio.o .objs\game\src\libs\lua\print.o .objs\game\src\shared\aabb.o .objs\game\src\shared\infostring.o .objs\game\src\shared\mathlib.o .objs\game\src\shared\parse.o .objs\game\src\shared\shared.o .objs\game\src\shared\utf8.o  -o ..\..\base\game.dll 
.objs\game\src\game\g_cmds.o: In function `Z15G_ClientCommandR6Player':
Z:/_Development/Projects/Ufo/ufoai/src/game/g_cmds.cpp:442: undefined reference to `_stricmp(char const*, char const*)'
Z:/_Development/Projects/Ufo/ufoai/src/game/g_cmds.cpp:444: undefined reference to `_stricmp(char const*, char const*)'
Z:/_Development/Projects/Ufo/ufoai/src/game/g_cmds.cpp:446: undefined reference to `_stricmp(char const*, char const*)'
.objs\game\src\game\g_main.o: In function `CheckNeedPass':
Z:/_Development/Projects/Ufo/ufoai/src/game/g_main.cpp:305: undefined reference to `_stricmp(char const*, char const*)'
.objs\game\src\game\g_svcmds.o: In function `Z15G_ServerCommandv':
Z:/_Development/Projects/Ufo/ufoai/src/game/g_svcmds.cpp:354: undefined reference to `_stricmp(char const*, char const*)'
.objs\game\src\game\g_svcmds.o:Z:/_Development/Projects/Ufo/ufoai/src/game/g_svcmds.cpp:356: more undefined references to `_stricmp(char const*, char const*)' follow
.objs\game\src\shared\shared.o: In function `Z9Q_stristrPKcS0_':
Z:/_Development/Projects/Ufo/ufoai/src/shared/shared.cpp:571: undefined reference to `_strnicmp(char const*, char const*, unsigned int)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
7 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I traced it to the file src\shared\shared.h:

Code: [Select]
/* portable case sensitive compare */
#if defined(_WIN32)
# define Q_strcasecmp(a, b) _stricmp((a), (b))
# define Q_strncasecmp(s1, s2, n) _strnicmp((s1), (s2), (n))
#else
# define Q_strcasecmp(a, b) strcasecmp((a), (b))
# define Q_strncasecmp(s1, s2, n) strncasecmp((s1), (s2), (n))
#endif

I then checked the flags for a _WIN32 flag. It wasn't there. Added it but this didn't solved the issue. Now I'm a bit lost.
It is a linker error. I'm compiling with the correct library paths. And I cannot see the error in the define.
Code: [Select]
_stricmp is perfectly legal C.

Plz. help!

xray

5
Coding / lua design thoughts
« on: June 11, 2014, 09:25:51 pm »
Hi,

I've created a fork of the master branch to begin replacing the current ui script language with lua.

Before getting into the coding, it's always good to have some thoughts about how the implementation should look like. That's what this post is for and I invite everyone to post ideas.

The goal is to bring lua in as a scripting language, replacing the current native script implementation found in the ui. I'll probably start with the ui-part since that's the area that'll benefit most.

One question I'd like to hear some views on is wether the implementation should be allowed to break the current scripts or that it should be additive. The first will lead to a full rewrite of the .ufo files, the second will allow a more evolutionary rewrite of .ufo files.

Another question is wether the lua language should be used for all the .ufo files, including those not dealing with the ui (e.g. campaigns.ufo, installations.ufo).

I'll be looking forward to any thoughts.

xray

6
Coding / new ui script language: lua, angelscript, python???
« on: June 08, 2014, 08:08:43 am »
Hi,

I noticed in the todo-list an item to replace the current custom script language with a general purpose script language. AngelScript was mentioned as a candidate. I also find some references about lua and the AI, however, I cannot seem to locate where they are used in the codebase.

My question: is anyone actually using lua?

I'm interested in making a patch to the ui script base so that (next to the current custom script language) a second script language could be used. That way current ui-scripts would remain functional up to the point the new language is solid enough to replace it. If lua is already in view somehow, it would make sense to reuse it. There should be no need to implement multiple script language in the same game. If not, what language is preferred. Lua, AngelScript or something else (Python??).

Any thoughts?

xray

7
User modifications / extension to ui script language
« on: June 01, 2014, 04:58:12 pm »
Hi,

I've been working on some modifications to the ui script language. I've added implementation for a
Code: [Select]
forchildin keyword (a foreach that iterates child nodes of a given ui-node) and the
Code: [Select]
break statement to exit a loop. Now the code needs a last finishing touch. Inside the iterating body I need a way to reference the child node being visited. To do so, I guess I have to change the executing context of the action and add a hidden variable (something like self) that can be referenced from the code body of the iterating block. I cannot seem to figure out how to do this? Any help is appreciated.

Regards,
xray

8
Feature Requests / soldier camouflage: change in a single action
« on: December 15, 2010, 07:22:14 pm »
Hi,

What a great game is this. Still, a minor improvement is possible. When in supplying the equipment to the soldiers, you can change the camouflage outfit. The funny thing is
that you have to switch camouflage for each soldier. Though it makes sense from the equipment point-of-view, I cannot imagine a situation where the camouflage of the soldiers
is different. Then again, it probably doesn't matter in combat what camouflage the soldiers wear.

On a more generic level. There are more items that could be added group. So you could add an option on the screen toggling wether the equipment you drag to a soldier is for one soldier or for all soldiers. If on, then dragging a grenade to a soldier will equip all soldiers with a grenade etc.

Regards
x-ray

Pages: [1]