q3a mod: slugs and rockets

UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Finally I've uploaded the "reorganized" test branch with the menu and I've added bot_challenge to it. Basically what I did is splitting some commits into smaller commits. Part of this link moved me to do that:
https://wiki.openstack.org/wiki/GitComm ... of_changes

I've uploaded it to test-2 to let you see it before merging it with master. Now is harder to see which is the state of the mod at a glance but I guess that the git log is not for that. We could create a text file for that.

About the bots skill I think that it would be a good idea having skills with decimals, like for ex. 4.5 for a skill between hardcore and nightmare, being 5 the skill of bots with no reaction time and perfect accuracy. I have seen this in EP. And of course adding a slider to the menu to choose it.

(Slightly edited)
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

I'll check the menu out soon.
Thanks for the link, i realise now that the commit i did should be devided into a dozen small ones...

I like the skill slider idea. But it is beyond my coding skills.
From much of the bot-code i can grasp the purpose but don't really understand it.
Perfect accuracy and aiming skill isn't something i could find in the code.
I did removed some of the code that added spread/noise to the bot-aiming.
I think for the best result with decimal skill settings, the aiming code should be weapon specific.
So one part for the railgun aiming and one for the rocket launcher, because the rg is instant hit and rl depends on prediction. So it should be possible to code perfect railgun aiming and highly accurate predictable rocket aiming, especially for targets that are in air or launched from jumppads or rocket-jumping. Because their trajectory can only be changed by the target for a little.
I didn't recognize this in the original code (well some pieces of it but nothing that i could use).
I do know bots use something like that because higher skilled bots can blast you in the air with a rocket and finish the frag with a rocket in mid-air....
Some strange behaviour i noticed from the original bots is that they shoot rockets near corners to inflict splash damage to targets that might be behind that corner, the strange thing is that they also did that with the railgun while it doesn't give splash-damage...
I like playing with bots and a could possibly go on like this much longer about how they behave and how i believe they should behave but this is for now).
Like i said i'll check the menu out next ;)
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

Hey,

Just tried to build the qvm.
Recieved an error
ui_ingame.asm 164:error symbol UI_SlugRockMenu undefined
and it didn't build the ui.qvm
ps
The g_combat.c line 106: warning is still present (but i'm sure you are aware of that)
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

It must be caused by the fact that I added ui_slugrock.c and it isn't compiled by the bat files. You have to edit q3_ui.bat and add a line for it.

I wasn't aware of that warning (I forgot it), now is fixed.
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

UglyFoot wrote:You have to edit q3_ui.bat and add a line for it.
Well sort of...
ioq3 source builds its own tools including the q3asm.exe, so there isn't any q3_ui.bat
I had to edit the Makefile
I added the ui_slugrock.c line in it.
Perhaps we have to commit it to the Makefile in our fork too.

While compiling i ran into some errors in the ui_slugrock.c
line 359: operands of = have illegal types 'pointer to void' and 'int'
line 371: operands of = have illegal types 'pointer to void' and 'int'

it ended with error 1 and did not build the ui.qvm
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Oh, I didn't know. I haven't used make so I'll have to install it and get used to it to avoid these situations. Yes, we have to commit the makefile.

I don't understand the errors, it compiles well in Visual Studio, I'll see what I can do after installing make and/or mingw32.
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Takkie wrote:Thanks for the link, i realise now that the commit i did should be devided into a dozen small ones...
No problem I'll do it myself if it's needed.
Takkie wrote:Perfect accuracy and aiming skill isn't something i could find in the code.
I was thinking of raising some characteristics of the bots to the max. In case you don't know there are several files that define each bot, in this guide it's explained:
http://planetquake.gamespy.com/View.php ... =55&game=4

Previously I said that skill 5 could be the skill of the best bots but actually it would be better keeping skill 5 for nightmare and add the skill 6.
Also I've seen that the skill can already be a decimal number.
Takkie wrote:I like playing with bots and a could possibly go on like this much longer about how they behave and how i believe they should behave but this is for now).
It'll be helpful.
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

I've commited the ui_slugrock to the makefile in our test-2 branch.

I like the idea of coding the chars to the max for skill 6.
I've done that to most of the chars for the bot_challenge cvar.
Allthough this doesn't mean these bots will be exceptional better than skill 5.
There needs to be made more changes to the bot code, especially to the BotAimAtEnemy (in the ai_dmq3.c) code.
I'm under the impression you can do a better job at bot-coding than i've done (and can).

Another thing that could be nice is to select bots with different skills from the start server menu.
Now you can only select one skill level for all bots, you need to add the bots in-game if you want them to have different skills.
Last edited by Takkie on Wed Jan 22, 2014 9:54 pm, edited 1 time in total.
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

Double post... classic ;-)
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Ok I'll see what I can do.
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

I installed MinGW and MSYS, following some steps of this guide:
http://wiki.ioquake3.org/Building_ioqua ... w_and_msys

But I can't even compile ioq3, it throws to me this error:
code/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x14): undefined reference to `strcasecmp'
code/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x48): undefined reference to `strncasecmp'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [build/release-mingw32-x86/ioquake3.x86.exe] Error 1
Actually I didn't install the guide versions, I installed the most recent. Later I tried it with the guide versions but it throws to me another error, like this:
LDFLAGS:
/bin/sh.exe: -c: line 1: syntax error near unexpected token `;'
/bin/sh.exe: -c: line 1: `for i in ; do echo " $i"; done'
make[1]: [targets] Error 2 (ignored)
but without "(ignored)" so it stops compiling :).

Did this happen to you too?
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

I can't say the i encountered exactly that error but it was quite the [strong language] to get it working.
I read and reread this article: http://mingw.org/wiki/Getting_Started and installed this program: http://sourceforge.net/projects/mingw/f ... t/download.
I also ensured i had the last version of MSYS. and that it was installed in the mingw directory.
Also i installed our source code in the msys/1.0/ directory.

for personal use i changed the makefile.
I added the 0's at these places:
ifndef BUILD_STANDALONE
BUILD_STANDALONE = 0
endif
ifndef BUILD_CLIENT
BUILD_CLIENT = 0
endif
ifndef BUILD_SERVER
BUILD_SERVER = 0
endif
ifndef BUILD_GAME_SO
BUILD_GAME_SO = 0
endif
ifndef BUILD_GAME_QVM
BUILD_GAME_QVM =
endif
ifndef BUILD_BASEGAME
BUILD_BASEGAME =
endif
ifndef BUILD_MISSIONPACK
BUILD_MISSIONPACK= 0
endif
ifndef BUILD_RENDERER_OPENGL2
BUILD_RENDERER_OPENGL2=
endif

I did not created a makefile-local because that didn't work.

Hope it helps...
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Yes, it helped. Quick and easy, thanks!

Yes you can use Makefile.local but you have to add this:

Code: Select all

BUILD_STANDALONE = 0
BUILD_CLIENT = 0
BUILD_SERVER = 0
BUILD_GAME_SO = 0
BUILD_MISSIONPACK = 0
and make sure that there is a blank line a the end, just in case.
ifndef means if not defined, since the local file is included right after the symbols are defined, if you put the ifndefs, the symbol values doesn't change.

Now I'm on your position, the quick fix I thought doesn't fix it at all so it will take some more time.

It seems malloc is undefined if you compile the qvms, does somebody know a workaround for this?
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

A quick reply.
I created the makefile.local and compiled.
The error was gone.

In the makefile.local i entered this code:


ifndef BUILD_STANDALONE
BUILD_STANDALONE = 0
endif
ifndef BUILD_CLIENT
BUILD_CLIENT = 0
endif
ifndef BUILD_SERVER
BUILD_SERVER = 0
endif
ifndef BUILD_GAME_SO
BUILD_GAME_SO = 0
endif
ifndef BUILD_MISSIONPACK
BUILD_MISSIONPACK= 0
endif
ifndef BUILD_RENDERER_OPENGL2
BUILD_RENDERER_OPENGL2=
endif


I was very suprised so i did a check and redid it.
I noticed the BUILD_RENDERER_OPENGL2
has to be in it.
If not you'll get the error.

So it compiled.
I noticed the slugrock config menu option but i could not open it.
It blinked when i hoverd with my mouse pointer over it but it doesn't react to a click.
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

I did some more tests with building the .qvm's
Because it felt a bit strange to have the BUILD_RENDERER_OPENGL2=
in the makefile.local and then haveing the .qvm's build.

When i build the qvm's from 'nothing' with this in the makefile.local
BUILD_STANDALONE = 0
BUILD_CLIENT = 0
BUILD_SERVER = 0
BUILD_GAME_SO = 0
BUILD_MISSIONPACK= 0

It produces the error.
When i run the build again the error is gone and it will build the ui.qvm
(cgame.qvm and game.qvm are up to date.)


I zoomed a bit in on the problem.
And in the first build a ui_slugrock.asm is produced but not finished and it gives the error.
When building it again it 'accepts' the builded ui_slugrock.asm and continues the building the rest.
(the first file in the second build is the ui_sound.c)
I think in the 'second' build it skips the ui_slugrock.asm and continues with the next file.

So that may cause the problem why the menu does show up in the game but doesn't react.
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Hm, it might be happening that, I don't know. Anyway I'll have to rewrite the most of the code I wrote, which it'll be good since I don't like the code right now but it will take some time as I have little time everyday, I'll tell you when I'll have it done.
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

UglyFoot wrote: I'll have to rewrite the most of the code I wrote, which it'll be good since I don't like the code...
I'll tell you when I'll have it done.
Looking forward to it :D
UglyFoot wrote:... it will take some time as I have little time everyday ...
I have similar time issues so take your time.
I've got a few little maps i'd like to expand and tweak to SlugRock gameplay so we can release it along with the mod. :D
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Good, I played one of your maps weeks ago, Lo Tek, it was quite fun, specially the railgun room because of the vertical action.
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Well, I've it done since two days but my git front-end crashes (a side effect of having a mediocre computer...) so I can't do what I thought before pushing, for now. Meanwhile, I've uploaded the build so that you can try it:
https://www.dropbox.com/s/l8ekb8rhuogwv ... test-3.zip
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

Very cool.
I downloaded it and i'll be sure to give it a spin soon.
I will probably update our ioq3 fork this weekend.
There has been some activity in their master ;)
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

The menu seems the work nicely, i haven't had the time to try all functions out.
It made me think how we could make it more user-friendly.

Perhaps instead of the cvar we could use a small description to indicate the setting.
I also think the cvar's g_forceTeamWeapons and g_switchTeamweapons can be adjusted to match the other cvar's.
Something like g_redteamWeaponMode and g_blueteamWeaponMode (with the settings: none, alternate, random, rg, rl, both)

The menu could end up looking something like this:

-=server settings=-
health regen: (on/off)
weapon mode: (none/alternate/random/rg/rl/both)

-=team settings=-
red team weapon mode: (none/alternate/random/rg/rl/both)
blue team weapon mode: (none/alternate/random/rg/rl/both)

-=personal settings=-
player weapon mode: (alternate/random/rg/rl/both)
bot weapon mode: (alternate/random/rg/rl/both)

Perhaps it is possible when the server settings override the team and personal settings these become grey and can't be selected until the server setting is set to none...
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

They are good suggestions.
Perhaps instead of the cvar we could use a small description to indicate the setting.
Yes, in fact it's something I did before rewriting the code. The same can be done with the cvars values like changing rg to Railgun, etc.

I'll see if I can do them.
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

I have done it this weekend, the menu has improved a lot, I'll upload it soon.
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: q3a mod: slugs and rocket

Post by UglyFoot »

Uploaded.
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: q3a mod: slugs and rocket

Post by Takkie »

It runs smoothly!
Very nice work, the menu looks great.
It's a really great addition!

Perhaps we can release this as a beta version?
As far as our todo list we've checked almost all the boxes.
iirc there is only 'improving the bot-code' left on it.

Do you have any new ideas to implement in the mod?
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
Locked