Page 3 of 18

Posted: Sat Aug 11, 2007 8:38 am
by Dr. Nil
I couldn't help myself - just had to do another one. If it's too much, just have somebody redo the some of the teams I've done. If I do more, I'll probably place the sponsor decals in another pattern. :)

...

Team Singh Speed

Krait

Image_______________Image



Image


Mamba

Image_______________Image



Image


Sidewinder

Image_______________Image



Image

Posted: Sat Aug 11, 2007 8:58 am
by Captain Hesperus
Looks great, Doc!!
And please, keep 'em coming!

20 teams left, everyone!!

Captain Hesperus

Posted: Sat Aug 11, 2007 11:13 am
by Dr. Nil
EDIT: :oops: any chance that Slough Swift could swap team number with Dynamo Renko (team number 17)?

- - - - -

Team Slough Swifts

Krait

Image_______________Image



Image


Mamba

Image_______________Image



Image


Sidewinder

Image_______________Image



Image

Posted: Sat Aug 11, 2007 11:57 am
by JensAyton
LittleBear wrote:
Think I'll have to make it a condition that you are Clean to enter the race (otherwise the wheaze for detecting that the player has cheated by lasering up the opposition won't work).
Ahh, a more interesting ship script example than my mothership-making-escorts-attack-station one.
Edit: note that this refers to upcoming functionality. Ship scripts are not supported in 1.69.1.

Race participant ship script:

Code: Select all

this.beingAttacked = function(attacker)
{
    // Find first umpire in system, assuming there will only be one.
    var umpire = system.shipsWithRole("littlebear-race-umpire")[0];
    if (umpire)
    {
        umpire.script.racingShipAttacked(this, attacker);
    }
}
Race umpire ship script:

Code: Select all

this.racingShipAttacked = function(victim, attacker)
{
    // Is there a race on?
    if (this.raceInProgress)
    {
		var victimIndex = this.participants.indexOf(victim);
        var attackerIndex = this.participants.indexOf(attacker);
		
		// Is the victim in the race?
		if (victimIndex != -1)
		{
			// Is the attacker in the race?
			if (attackerIndex != -1)
			{
				// Penalty for attacker, bonus for victim.
				this.timePenalty[victimIndex] -= 5;
				this.timePenalty[attackerIndex] += 15;
			}
			else
			{
				// Participant was attacked by non-participant.
				// Send in 30% of the muscle.
				this.sendProtectionAfter(attacker, 0.3);
			}
		}
    }
}


this.sendProtectionAfter = function(whom, proportion)
{
    function makeShipAttack(ship)
    {
        // Attack whom with probability proportion.
        if (Math.random() <= proportion)
        {
            ship.target = whom;
            ship.setAI("interceptAI.plist");
        }
    }
    
    // Call makeShipAttack() on all littlebear-race-protectors.
    var protectors = system.shipsWithRole("littlebear-race-protectors");
    protectors.forEach(makeShipAttack);
}

// Additional umpire functions left as an exercise
Just to hammer the general-scripting-language point home, nothing in these snippets is special racing-related functionality or anything I wasn’t planning to add in any case.

Posted: Sat Aug 11, 2007 12:06 pm
by JensAyton
Captain Hesperus wrote:
I'd prefer it if the OXP development was moved and the actual create-a-race-team-livery/biography remained in Discussion, since I was originally intending to enhance the Wiki.
It is my contention that designing ship liveries is an inherently OXP-related activity, and I don’t see how a thread in Expansion Pack can’t be used for wiki-enhancement.

Posted: Sat Aug 11, 2007 3:02 pm
by LittleBear
Will try that!

ATM having trouble with the rings. Keep-taking damage when passing through them (although this doesn't happen with Giles's racing rings, until I fiddled with them). Think I'll just have to do a C&P of Giles's shipdata rather than just using the models!

Posted: Sat Aug 11, 2007 3:29 pm
by Dr. Nil
Team Sissu

Krait

Image_______________Image



Image



Sidewinder

Image_______________Image



Image

Posted: Sat Aug 11, 2007 11:40 pm
by LittleBear
Collison problems sorted. Just for once it wasn't a bug in my OXP, but I was flying the IC. The IC is massive ship and only a meter or two narrower than the ring! So unless dead center an engine clips the ring and its game over, when hit at injector speed! The IC is considerabley wider than any other ship in the game, so think most ships will fit though easily though. Swapped to a Cobra III and no problem. Track is about 20Km long ATM (about a third built). Plan is it will loop around the 25km area around Race control.

Looking back on the track:-

Image

Posted: Sun Aug 12, 2007 3:58 pm
by Griff
That looks awesome LB! you must have been busy with the graph paper and pencils working out all the co-ordinates of those rings!

Posted: Sun Aug 12, 2007 7:56 pm
by LittleBear
Cheers. 59 of the blighters to make a course and had to give each one its own shipdata entry as they each need a facing_position to make them face each other. Course is done (pretty much, there's still a couple of rings out of place. Grr :evil: ). About 60km but looped round in a circle going up and down as well as a bit of left to right. Copied up shipentries with the Doc's paint jobs. Still got to do the AIs though. The racer AI is gonna be a bit of a pain as it'll need 59 states all with go:pwm co-ordinates for each ring. Couple of screenies. ATM there's no ships added, so it looks a bit empty. In the final version ships with the Doc's (and anyone else who wants to put up some racing colours here) will be rushing round the track. Cos of the number of objects you do get a 10 second hang entering the system (like with the Graveyard), but once the ships are spawned the games runs nicely. Flying through is pretty hairy and you won't want to be in anything bigger than a Cobra III!

Approaching the track:-

Image

Commander Dick Dastardly nearing the finish line:-

Image

The rings AI will have to increment a variable (to check you flew through all of them - corner cutters are black flagged!), so a few of them might as well send a comms message like "Entering Thargoid Corner!" or even a spam ad, as you pass them any suggestions?

Posted: Sun Aug 12, 2007 8:22 pm
by JensAyton
LittleBear wrote:
Cheers. 59 of the blighters to make a course and had to give each one its own shipdata entry as they each need a facing_position to make them face each other. … The racer AI is gonna be a bit of a pain as it'll need 59 states all with go:pwm co-ordinates for each ring.
Both of these things will be much easier to do with ship scripts in 1.70. It may well be worth waiting.

Posted: Mon Aug 13, 2007 6:32 pm
by LittleBear
Will 1.70 mean ships have the "sense" to avoid things in the way? Although the rings look even on the scanner, they are only 1km apart and when you fly though them you have to be constantley making minor adjustments to your course as each ring making the turns is slightly further to the left / right up or down to give the turn. (except on the straights, where you can safley hit the injectors as the rings are in a perfect straight line).

I planned to have an entering.racerAI (like the enteringtrader) that did a d number and set an AI to slowcoach, medium, quite fast and perfect racerAIs. Each AI would have a go to the pwm co-ordinates of the next ring, but the speed set would be by d number. The better racers would have a higher chance taking the line at the right speed. This should spread the racers out on the course, rather than just have them flying nose to tail? But this is my question:-

I have 2 ships on the Course and both are flying to Ring 5, comming into the turn 500m apart. (The first state in the AI does a d number role to simulate how good the racers start was, using a pauseAI, a quick start will pause for 0.5 seconds after the lights go green, but a slow starter will pause for a couple of seconds, so the Grid gets a bit spread out).

At turn 1, Both have been told to fly to the same pwm point (the pwm for ring 5). Ship A's d number choses that A will take the turn carefully, slowing speed to 50%, whilst Ship B's D number choses that he'll gun the turn at 100% speed. (some turns are actually better taken by hitting the breaks, as taking them full speed will mean a crash! - may not be fatal, but hitting a ring spins the ship off the track and he'll lose time getting back on track). As the ships are flying to the same pwm point, will ship B pass ship A (giving the overtaking effect I'm after - even if after overtaking he hit the next ring after passing Ship A and have a "racing incident" but still pass ship A) or will he just go smack into the back of him as both are taking the same angle (albiet at different speeds) to the pwm point?

Posted: Tue Aug 14, 2007 9:13 am
by JensAyton
LittleBear wrote:
Will 1.70 mean ships have the "sense" to avoid things in the way?
No. I have no intention of doing anything to the ship behaviour methods (the core routines that implement, well, the behaviours of ships) before the next full release. I’m making a conscious effort not to add any more major feature changes, so that it will actually be ready at some point. :-)

Ship scripts will to some extent make it possible to control ships’ flight more precisely (I can’t be more specific yet), but not to the level of micromanaging flight paths.
LittleBear wrote:
As the ships are flying to the same pwm point, will ship B pass ship A (giving the overtaking effect I'm after - even if after overtaking he hit the next ring after passing Ship A and have a "racing incident" but still pass ship A) or will he just go smack into the back of him as both are taking the same angle (albiet at different speeds) to the pwm point?
Probably whatever they’re doing now. However, the JavaScript scripting model allows you to perform calculations on positions, so it will be possible to make each ship target a slightly different part of the ring. If you want to be fancy about it, it may be possible for each ring to keep track of which NPC racers are heading for it and assign them different target points. This won’t necessarily stop their courses from intersecting, though.

I believe Giles’s “instinct-based” AI work was intended to improve collision avoidance, among other things, but as far as I’m aware it’s incomplete, and he’s not talking. Digging into this would be one of those major feature changes I’m actively avoiding. Of course, if someone else wants to do it… ;-)

Posted: Tue Aug 14, 2007 10:28 am
by Disembodied
Speaking as someone who actually watches entire Formula 1 races -- although god knows why: it'd be much quicker just to put some coloured beads on a string and let them slide from one end to the other -- you don't want to completely rule out ships' courses intersecting. It's a dangerous game, racing! Plus, if you don't have any crashes and collisions, what are the promoters going to show slow-motion clips of, ad nauseam, from umpteen different angles?

Posted: Tue Aug 14, 2007 5:22 pm
by JensAyton
Completely eliminating crashes would be pretty hard. I believe LittleBear would like his racers to at least give the appearance of making some token effort not to hit each other, though. :-)