Blender Battletech 2 (DEMO).

@adrien: What is Katan? (I will follow up and answer No?)

@smoking: I can’t say with confidence I am able to produce a 100% faithful conversion of the game (and its not that I don’t want to). There are things like MegaMek for that. What I want to do is something that feels more like a ‘game’ and less like a ‘tool’, or something like that.

Your ideas for torso twisting and targeting sound great. How do you plan to handle walking/turning? It would be cool to see a more intuitive WASD/FPS-based movement rather than the traditional ‘throttle & steer’ method. Even though a mech is a walking tank, it doesn’t need to feel/control like one :wink:
I’m not suggesting fast-paced precision movement control like an FPS, just merely a similar control scheme. Hold W to throttle up to walking speed. Hold shift+W to throttle to running speed. Hold A/D to either steer (if moving forward), or turn legs left/right and walk forward (sidestepping, in its way). Sort of the way Mech Assault for the X-Box did it, minus the goofy 360-degree torso rotation :wink:

It also looks like you plan to have non-mech vehicles as playable options? Maybe you are able to switch control between units in your force? That would certainly open up options to make units more squishy (ala faithful to TT rules) and make the game mechanics less dependant on the one-man-army approach.

Katan is hex-grid based table game. Quite fun island concuering game - I enjoy playing it with family!

Nines, You can use any of the resources I’ve made over the years, there’s a lot of mechs, vehicles and such. I can upload them later if you’d be interested. I’ve also got a set of JSON dictionaries with some stats already set for them, such as armor values and weapon locations etc… Though you might find it easier to locate some stats in spreadsheet form and find a way to extract that data (maybe grab it from megamek…) Last time I tried to share the file though some textures were missing, even though they are supposed to be packed. I think it’s because of it being such an old file.

Today I fixed a bug with tanks not conforming to the ground properly. Now that works OK.

I like the idea of switching meks/vehicles when one is destroyed, I have to admit the vulnerability of the player character is a problem for mech games, or any game where you command a squad.

On the other hand, people do want to play the hero (Grayson, Victor, Morgan, even Natasha), and there are rules in the TT game for such characters such that they can avoid death from headshots etc… by spending “edge” points. These are also used in tournament games to lessen the effect of really bad luck.

I think the bge was born to have a physical walking rigid body mech simulation game where the parts where themselves reusable at runtime.

wrectified+mechwarrior = wreckwarrior?

blowing legs clean off and mechs spinning in air from explosions, their ammo going off as they burn…

I do want to see some effects like that, arms and legs getting blown off is cool, but the problem is that no two mechs are the same. It takes a lot of work to set up even one mech for dynamic destruction…

For movement players can set throttle from -1.0 to 2.0 with 1 being normal walking speed. But turning speed is reduced depending on throttle settings so that turning also has a movement cost. You have to slow down to perform a sharp turn, you can’t just run around at full throttle all the time.

I’ve got player and AI movement code for the three basic vehicle classes done. Now just need to add AI tactical states.
I also added a debug feature so I can print to a text object in the HUD. Makes checking for errors much quicker. :slight_smile:

I’ve added some variation to movement styles for aircraft because some people complained that it looked to boring, there’ll be lots to do now in trying to keep your aircraft on target.

smoking, have you seen wrectified lately?

you could code the mechs using something similar,
I can pull a part , and stick to another bot, no programming required,
maybe have leg/base varients, that are ‘hard codish’ and the weapons stick to objects aimed by mouse control, clicking fire sets a property in the weapon,
this way nothing has to be hard coded.

come to think of it, keypresses that would trigger weapons can just get properties from the weapon, and there could be no code in the weapon,
like what object to add for the projectile, reload time energy cost etc,

That’s looking really great, but some of the movements look a little abrupt. Have you been using lerp (or slerp) with your transformations? I’ve been using it a lot these days to ease in and out of movements. So instead of rotation being just on/off it slowly ramps up from 0.0 to 1.0.
This gives a much more fluid motion and allows time for animations to blend in and out.

I plan to use it a lot with the mechs to give a feeling of weight and inertia.
a 100 ton mech might be able to run at 60kph but it’s going to have a considerable stopping distance…

everything moves with physics, however I could use a lerp as the input force or torque?

also, there is the issue with doing things over time, and the next keypress changing the course of the actor.

I can also tone down the speed of my AlignAxisToVects, can you use Lerp as a time value for align axis to vect?

Well, alignAxisToVect already includes it, thats what the time value is (the third argument) but you need to use small values to get a good result. 0.5 is nearly instant. 0.01 is a good value to give gradual alignment changes (or 0.98 if your starting vector and target vector order is switched.)

But you can use lerp in other things too, such as walking. I’m going to post a tutorial about it soon.

[ATTACH=CONFIG]390487[/ATTACH]

(You know you’re doing something right when Youtube thinks it’s a home movie. :slight_smile: )

Devblog number 3 and the AI is starting to shape up.

It’s been really fun teaching the AI to drive, but they’ve got a long way to go yet.
Once basic driving skills are in then I can move on to more complex strategies, such as trying to flank someone, or performing bombing runs.

Awesome!
Very smooth movement, and the graphics look pleasant!

There something not quite right about the turret movement at the moment, I’ll be coming back to that later.

For today I worked on revamping the mechs. This isn’t a triple A game, you won’t see mechwarior online quality art work here, but I’m pretty please with how they are looking.

I’m also happy I found a solution at last to the problem of switching camo and decals.
I’m using node based UV scroll to scroll to an area where the new texture is stacked. Red controls camo, green controls decals.
I still have Blue remaining and I’ll probably use that to control mist color so I can implement the height based colored mist I tested earlier.

Here are some examples:



The result of this is that mechs and vehicles won’t be restricted to one faction as before. Some will be more common among certain factions (like the Vindicator will always turn up as a Capellan mech) but they can be found serving in other faction’s forces too.
Also you can salvage a mech or vehicle and get it sprayed up ready to be part of your force next mission.

I hope the result isn’t too slow on older computers, you could try turning off normal maps if it’s a drag.
You can try it out here:
texture_tests.zip (641 KB)

I experimented with having the blue component control a damage texture, but the result looked pretty ugly, and I already have a mesh swap routine to deal with displaying damage anyway.

Have you implemented component damage?

like splashing the radiator will make the enemy overheat?

snipe the pilot out of a heavy armored mech?

I just localize the hit point and then check to see how close it is to a list of local vectors, however you could use empties and world space for objects made of armatures,

That’s a pretty good idea. I was going to get angles to the hit point to find hit locations, but getting distance to a set of co-ordinates would probably be easier and faster.

Today I’m trying to write a bpy script to rearrange the UVs on a bunch of objects. I’m glad I learned how to program, otherwise I’d have to go through and do it all by hand. That’s why the first version of this project took so long.

EDIT:

Did it! it took a whole evening, but I managed to write a script to get all the objects, resize and translate their UVs, switch the UV image for the new consolidated texture atlas and replace the old texture with the new shared one. Better a whole night than a whole week doing it all by hand! :slight_smile:

The reason for doing it is to have a couple of atlas maps, one for each faction with 16 mechs on each, rather than 16xnumber of factions materials each with a single 256x256 texture.

There’s probably an addon which does it somewhere, but it’s good to do these things yourself, otherwise you’ll never know how. :smiley:

I know you are a far better coder, but check the demo I just put up in demos and works in progress, I think you could use many of the same concepts and do a better job,

for limbs poping off and parts exploding etc,

assembly has its own script, where as fall off is in componentHost manager

the player also has remove part from assembly, but its burried deep in ActorLocomotion in the actions section.

@BPR, I’ll take a look at it when I’ve got time, but I don’t tend to use other developer’s work in my own projects because it makes it hard to keep track of everything.

Anyway, more work on textures today:

I’m still split between the idea of using the blue channel to control height based mist colors or for something else. The one I’m currently testing is changing the cockpit colors.

Sweet work with the textures! They all look great, and appear to offer quite a range of flexibility!
Don’t forget about the Periphery factions, they have decals too.
Perhaps also integrate other minor merc group decals? Not sure on that one.

what about mixing in object.color so you can tint the whole thing?
lighten/darken?

do you have any mechs that will be shiny and stainless steel?

Object color is being used to control UV scroll split in to RGB. Red controls which decal is shown, green controls which camouflage is used. There’s still blue free which I could use to:
1). Change cockpit color
2). Control mist color if I use the height based mist I experimented with.
3). Change the Hue of the camouflage. Using a HSV node this would give an almost endless number of color variations from a small number of base textures.

I’m also thinking of using the green channel to change cockpit color at the same time as switching decals, that would mean different factions have different color cockpits and would be a quick way of checking for enemies even on night levels.

I think I can have more than 16 faction decals I don’t know at what level the UV scroll technique will break down. 32 seems like it might be pushing it…
I’d need that many though to include all the minor factions.