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 - Namerutan

Pages: [1]
1
Coding / Re: Trying to speed up code for Routing
« on: March 26, 2017, 04:41:18 am »
I was going to add timing data to compare with and without the modification, then noticed a big fail in my comparison.
My first impression was just comparing the downloaded ufo2map (from downloads section) with the compiled with modifications, but the main difference on timing surely is due to the optimizations used by the compiler; my modification is just a very small improvement  ::)

Next you can find an example of timing (on my machine, taken from the log) using 3 copies of ufo2map.exe: the one I downloaded from downloads section, the one I compiled from source (unmodified source, using optimizations from compiler), and the one I compiled with my modification.
The 3 amounts of time are for map data, day light data and night light data; only the first timing is affected by the modified code. After map name, you can find timing with original ufo2map, self compiled from unmodified source, then timing with modified ufo2map.

"Mine.map", 34 + 66 + 61 = 161 seconds, 24 + 44 + 43 = 111 seconds, 21 + 44 + 43 = 108 seconds

Note how the timing for Lighting are the same for both .exe compiled on my machine, and the improvement is just the first part (from 24 to 21); at first I was comparing 34 to 21, so a bigger difference, and much bigger in % if you just take the part of the timing related to the Routing calculations.

Lesson learned: Don't use the compiled exes for windows users; better compile on my own (as linux users do).

2
Coding / Re: Trying to speed up code for Routing
« on: March 26, 2017, 04:33:31 am »
I have used
ufo2map -tracefile -debugtrace maps/mine.map
for several maps (not just "mine"), using both copies of the ufo2map.exe (the original one and the one with my modification), to get the routing data in csv format. Then used notepad++ with the "compare" plugin and found the routing data matches in all cases. Then compared the bsp files using WinDiff (utility to compare binary files), and also matches.
So I think this modification is safe to be used, and means a good improvement for speed at compile time.


3
Artwork / Re: Herakles-class Heavy Lifter Redesign
« on: March 24, 2017, 03:34:43 am »
Attached image:
- All 3 current dropships compared to this new design of the Heracles.
Attached file:
- New design for the Herakles in blender format.

The inner space for the pod is 320 x 128, allowing for 10x4 cells (the layout proposed by aa_ seems good to me).
The 4 doors open in 2 parts, to make shorter ramps.
All the walls (including ceiling and floor) of the pod are sized at least 6 units, to give some cover.
The bounding box of the model (608x256, height=128) allow it to pass through the upper cover of the hangar, and stay in the base with the doors open.
The total amount of triangles (with carrier + pod) is 2450 (Firebird is 778, Raptor is 2458, current Herakles is 1854). The actual amount used anywhere would be lower, as this amount counts for 2 sets of engines under the wings (vertical and horizontal) and 2 sets of doors (open and closed).

If you like it, and before I work in texturing, let me know if there are some modifications needed (for example, is it enough the flat base in both the carrier and the pod, or should I add some "legs"?).

4
Artwork / Re: Herakles-class Heavy Lifter Redesign
« on: March 24, 2017, 03:29:53 am »
Attached images:
- Detail of engines in tail, podded (could rotate to aid for direction).
- Details of engines under small wings (can rotate for take off / landing).
- Pod with doors open.
- Pod without the ceiling, as it would be in battlescape when level 1 is selected.

5
Artwork / Re: Herakles-class Heavy Lifter Redesign
« on: March 24, 2017, 03:24:27 am »
I see this thread has been inactive for a while, and I guess nobody is currently working on this.

I would like to show you a new attempt to redesign the Herakles dropship.
I took in consideration all the stuff written in this thread, plus some other details from my own wishes.
- The dropship is composed by a carrier + a pod.
- The overall footprint should be small enough to fit in 2x3 tiles in maps.
- It would be nice if the size allows to use the model in base attacks (inside the hangar), as requested in Feature request #5230  -  Like X-COM should show aircraft in the hangar: http://ufoai.org/bugs/ufoalieninvasion/issues/5230
- The inner space of the pod should have room enough for 12 soldiers + at least 2 big (2x2) units.
- The soldiers should get a fast way to exit, improving performance from current design of the Herakles, but also get some cover.

I will attach several images in following posts (max 4 per post).
In this post you can see:
- 3 views + perspective.
- 3d view in flying configuration (carrier + pod, doors closed, engines in horizontal).
- 3d view in take off configuration (engines under short wings in vertical).
- carrier alone, without the pod.

6
Linux / Re: Can't compile source with Arch Linux
« on: March 20, 2017, 05:50:55 pm »
Hola Carlos:

I'm not an expert in this area, but I guess the problem with lua could be related to not finding the binutils lib, so I would double check it.
Just in case it helps, in source code bfd.h is located under /src/shared/bfd.h

but I think it should be enough to install the lib the usual way:
sudo apt-get install binutils-dev

Suerte!

7
I spent several hours trying to set up a "balanced" ground assault team in skirmish mode.  Two-thirds of the squad died on the ramp of the plane on the first turn.

I think skirmish can be good some times to try things, but you can get very hard games in skirmish mode; for example, you can start with very bad combinations of equipment, while the enemies got nice ones.

Then I saw something about smoke grenades being important, and  I spent a few more hours trying to re-balance my team with more smoke grenades.
All grenades requires few Time Units to be used, so you can use a smoke grenade to hide your troops before the visible enemy can shoot at you; then you got time to re-position your troops as needed.

I lost half my squad in just three turns (and more wounded), with only two aliens killed.  I think there should be some simple weapon and loadout combinatitons that work. I just want to know the basic stuff.
Basic stuff: reaction fire is deadly, especially if the enemy uses advanced weapons (like it can be in skirmish) and good armours (so you deal very low damage to them with basic weapons). In campaign (not in skirmish), aliens start using kerrblades (a big knife) and plasma pistols. Plasma pistol requires 6 Time Units for the faster shoot type, so you can use a few soldiers with pistols (the small one), that requires just 4 Time Units for a fast shoot; if the alien is not wearing some armour (at the star of the campaign) with 2 or maybe 3 shoots you can kill an alien, so you have chances to survive. Back to your base, your wounded soldier will use the hospital to fast recover health, and as a bonus, the max health value will get a good increase. While in the battlescape, use another soldier with a medikit to treat the wounds, so there is no more health lost due to bleeding.

Now I know know smoke grenades are good.  How about frag/flashbang/incendiary greandes? How many of each should I be carrying?
All grenades are good, as these requires low amount of Time Units, so you can use them without triggering the reaction fire from the enemy. Flashbang, if thrown near an enemy facing to the spot where you throw it, will deplete its remaining Time Units, so no reaction fire this round (and you are safe to shoot that alien with the same or with other soldiers); also will deplete the Time Units for the next round. Beware, there is no visible sign to know in advance if the enemy got stun (blind by the light from the flashbang) or not (for example if was facing to another direction).

What are the best basic guns? How much extra ammo?
It is a matter of taste, each player prefer different ones. I personally start using 3 soldiers with pistols, 3 with assault rifles, 1 with sniper rifle and 1 with grenade launcher. After I get some plasma pistols from previous battles, I research them fast (pausing other research) to replace my pistols. Laser pistol is also faster than plasma pistols, while deal more damage than a normal pistol (laser better than bullets).
About extra ammo, it depends on the type of weapon: low weight allow you to use more clips, but for rockets or grenade launcher you will be able to carry a lot less ammo. For rifles (all kind) I usually go with 2 extra clips (each soldier); for pistols I go with 4 extra clips (less weight, and less time units each shot, so you can shoot much more times).

What are the best alternate ammos, especially sabot v. flechette for the shotgun?
I saw a lot players that get fun using shotguns, but I personally do not use these. As I said, try yourself and chose what gives you more fun. I played the first 3 months of the campaign like 50 times :-D  testing different things, before I played a full campaign.

You said to try pistols: which one(s)?  I'm just trying to get a survivable ground team and get through a ground mission, so I know I'm competent enough to (maybe) get through the whole game.
All pistols are good enough, but I prefer the small one, as it requires less time units. It is enough to kill the aliens in first missions, especially if you spot one using a kerrblade and from certain distance. If the enemy uses plasma pistols, after I depleted the enemy's reaction fire shooting with my pistols, I am safe to use (other soldiers with) weapons that can deal more damage (sniper/assault rifles).
But you can try different tactics:
Use smoke to get cover, then use a single soldier to move outside the smoke: all soldiers can shoot at the visible enemies, without any reaction fire: they cannot see where are the shooters, just the guy outside the smoke.
Use flashbangs to deplete the enemy's time units.
Use sniper rifles to shoot through thin objects (trees, windows, even thin walls) so the enemy have much less chances to hit you.
Try to move around houses or small obstacles to shoot from rear side: if the enemy does not see you, you are safe.

8
Coding / Trying to speed up code for Routing
« on: March 19, 2017, 02:36:34 pm »
I'm trying to speed up the code for Routing, specially a recursive function that is used a lot: TR_RecursiveHullCheck() (in src/common/tracing.cpp)
It is called from TR_BoxTrace(), when checking if actors can enter each cell, to build the Routing table. Map2Ufo uses it to prepare the data into the BSP, but the game also uses it somewhere.

The part I'm interested in is from line 949.
After some checks in the previous code, we are splitting the vector in 2 fractions, to check both parts in sequence. Current code calculates twice the splitting point (frac, frac2, midf, again midf), but I think we need to do it just 1 time (so avoiding some time-expensive multiplications). Also I have found a weird thing, possibly a bug, in line 955:
Code: [Select]
frac = (t1 - offset + DIST_EPSILON) * idist;should be:
Code: [Select]
frac = (t1 - offset - DIST_EPSILON) * idist;
If I'm right, then we don't need frac2 at all, and can use the first calculation for midf in both recursive calls to TR_RecursiveHullCheck() in lines 976 and 986.

This part of the function, from lines 949 to 986 could be (I have commented out the lines to be deleted):

Code: [Select]
/* float frac, frac2; */ /* To be deleted */
float frac; /* Added to replace previous line */
int side;
if (t1 < t2) {
const float idist = 1.0 / (t1 - t2);
side = 1;
/* frac2 = (t1 + offset + DIST_EPSILON) * idist; */ /* To be deleted */
/* frac = (t1 - offset + DIST_EPSILON) * idist; */ /* To be deleted */
frac = (t1 - offset - DIST_EPSILON) * idist; /* Added to replace previous line */
} else if (t1 > t2) {
const float idist = 1.0 / (t1 - t2);
side = 0;
/* frac2 = (t1 - offset - DIST_EPSILON) * idist; */ /* To be deleted */
frac = (t1 + offset + DIST_EPSILON) * idist;
} else {
side = 0;
frac = 1;
/* frac2 = 0; */ /* To be deleted */
}

/* move up to the node */
if (frac < 0)
frac = 0;
else if (frac > 1)
frac = 1;

float midf = p1f + (p2f - p1f) * frac;
vec3_t mid;
VectorInterpolation(p1, p2, frac, mid);
TR_RecursiveHullCheck(traceData, node->children[side], p1f, midf, p1, mid);

/* go past the node */
/* if (frac2 < 0) */ /* To be deleted */
/* frac2 = 0; */ /* To be deleted */
/* else if (frac2 > 1) */ /* To be deleted */
/* frac2 = 1; */ /* To be deleted */

/* midf = p1f + (p2f - p1f) * frac2; */ /* To be deleted */
/* VectorInterpolation(p1, p2, frac2, mid); */ /* To be deleted */
TR_RecursiveHullCheck(traceData, node->children[side ^ 1], midf, p2f, mid, p2);

With this changes I cannot find any problem in game, and map2ufo compiles  map in less than half the time (besides lighting). So I would like anybody can check this too.

9
Total newb here.  What is the best build/research/buy/equip order starting off in the beginning of the game?  I have found more general for newbs in these forums but I'm looking for what to build, buy and equip and do right out of the gate.

It depends a lot on your way of playing; I could give some general advices, but then your possibilities would be directed to the way I play.  ;)
Best thing I can tell you is: try different things, explore the possibilities of the game by starting new campaigns after trying some things, then you will get the fun from discovering stuff yourself.
Anyway, I'll try to answer some of your questions below.


What buildings do I build first? Another lab? Another interceptor bay?
You start with a balanced base, with buildings of each type, so it does not mind much what do you do at first (at least in standard/easy levels). Once you have played several campaigns, you will know some buildings need more time to be built (workshop, lab, antimatter containment), and cost more cash; so these need some more planning. You will not need workshops in the first month, and cannot build antimatter containment yet, so just care to plan for labs, while can build other stuff with less planning.

However, a must is to build in first day an Ufo yard; you need to store recovered ufos to study them, then dissassemble to get components (and research them) to get new technologies for your own ships.

After several campaigns, you will notice one more thing: the base layout is important to better defend from base attacks.
You could play with a single base (at least on lower difficulties), but it is much more reasonable (and fun) to build more bases; I think 3 bases is the lower amount for me, while 4-5 gives much more fun (and helps more in hardest difficulties, but it cost a lot to get cash enough).
I usually start the second base also in day 1 (in all difficulties). There are 2 required buildings that needs a bunch of days, and you cannot build in not connected tiles, so it will take some time before your new bases start being operative.

What do I do with production and research teams? (Especially production: there doesn't seem to be much to do because everything can be bought.)
After you have researched some new technologies, your workshop will start being low to maintain your needs, but on first month you can simply ignore them. I think month 3 is my start to use workshops, so I start building these in my second base in month 2.


How do I fill the ten extra beds I'm given at the beginning of the game?
When you play on hardest difficulties, you will have severe restrictions on the staff you can hire, so that will set what to do with your extra room in living quarters. On easier difficulties I would use it for more soldiers and/or scientists.


What attributes do I pick for my starting attack group, and how do I equip them?  What should I buy?
This is the area of the game where you can get more fun; explore the different possibilities in different campaigns, try different approachs: use more close combat units, or more snipers, or more assault, or balance all them... Try every possible weapon, to discover strengths and weaknesses, and what gives you better results while using some tactics/strategies.
As a starting point, I suggest you to use a balanced team, 2 with pistols, 1 with assault rifles, 1 with machine gun, 1 with sniper rifle, 1 with grenade launcher, 1 with rocket launcher, 1 with flamethrower; most them with support equipment: medikit, glasses, and a few grenades (of all types), and with ammunition to reload weapons.


How should I equip my first interceptor and transport?
In easier difficulties, you would like to use several interceptors in each base (2-3), so you can deal with ufos. Try every possible equipment for your crafts, then chose what best suits your needs. Tip: there is a weapon with longer range than any ufo weapon.


(Assume I'm starting off in standard mode.)
I recommend you to play the campaign several times in each difficulty, starting with the easiest one.
You will discover that some strategies are not good for different difficulties.

10
Mapping / Re: Missing Entities.
« on: March 11, 2017, 04:47:38 pm »
I know I'm replying to an old topic, but maybe it could be useful for any other people with same problem.
I got the same problem as ConsUme, but managed to work with some missing features for some time... until I compiled UfoRadiant from source. The problem is the link for UfoRadiant (for windows) in http://ufoai.org/wiki/Download points to a very old version (2012).


11
Mapping / Missing ufo tiles for themes
« on: March 11, 2017, 04:37:02 pm »
I was reviewing the list of missing ufo tiles:
http://ufoai.org/wiki/TODO/Mapping/Crafts_Tiles

Thinking about the possible landed ufos for each mission type, I think the list of missing tiles could be reduced a lot. Let me know if I am missing something on the following reasoning.

List of ufo types and alien mission types:
Ufos: Scout, Fighter, Harvester, Corrupter, Bomber, Carrier, Supply, Gunboat, Ripper, Mothership
Missions: Base Attack, Build Base, Harvest, Intercept, Recon (air and ground), Rescue, Supply, Terror, Ufo Carrier, XVI propagation

Landed ufos can be found only on a few combos of alien mission type and ufo type:
Scout (Ground Recon)
Fighter (Ground Recon)
Harvester (Harvest, Terror)
Corrupter (Terror, XVI Propagation)
Bomber (Terror)
Gunboat (Terror)
Carrier (---)
Supply (---)
Mothership (---)
Ripper (?)

Excluding Terror missions (always on cities, so highly populated areas: urban or suburban), it is needed only 4 landed ufo types (plus all crashed ufo types) for most mapdefs or themes: Scout, Fighter, Harvester and Corrupter.

As well as for "+ufocrash" there are no landed ufos listed, bunch of ufo types could be removed from several themes, leaving just these 4 types (Scout, Fighter, Harvester and Corrupter):
+beach: nopopulation
+bridge: rural, nopopulation
+desert: rural, nopopulation
+forest: rural, nopopulation
+ice: nopopulation

Landed Supply could be also removed from all map themes, as these only land to build or supply an alien base (there is no mission in geoscape where we can send our dropship, or the mission is alienbase if already discovered).

At least while there are no plans to change (in some future) the mission types available for each ufo type (defined in "aircraftmanagement.ufo").

Pages: [1]