• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Crush Company Boss AI Fight Video

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
I agree with HINDY, the jumps currently look pretty much like a line up then line down with no consistency.

When something jumps they have a very fast initial acceleration while they still have contact with the ground. From then on they are constantly accellerating downwards at the rate of the gravitational field at that point.

Additionally when in air, the foward velocity of an object is lost due to air friction so the maximum of the jump is actually slighly after half way.

Cause of the nature of the game, the initial acceleration time has to be extreemly small so can probably be ignored totally. Instead like hindy sujested use a jumping animation to give the illusion of the unit acclerating upwards for a jump when infact the jump just starts after the animation reachs a certain stage.

Also cause air friction is quite small and that this is a space game (could be in a vacume or low pressure by the looks of it) you can probably ignore air drag. Thus all that is left is for you to simply use the units current velocity and acceleration to work out displacememnt. Remember that cause the game works in frames (points in time), you have to take into account the affect of the acceleration during the period of time between frames for accurate results. With the scope of this game and the simplicity of the calcuations do not wory about speed as it should be no issue.

s = (u*t) + (a*t*t/2) or
s = t*(u + a*t/2)

s = the displacement from the previous frames position (add this to the height position component).
t = the time between frames, aka the rate the jumping updates.
u = the initial velocity of the time between time frames (you update this to the current velocity after you finish the displacememnt opperation via multiplying acceleration by time and adding to the velocity)
a = acceleration of the object, in this case downwards (-).

Ofcourse you might wish to optimize it in some ways or alter the formula slightly to include other factors of the game but using such a system it could be possible to even let your guy bounce off other units or objects if you can detect a verticle related collision.

- gravitational acceleration is 9.8 and it should be natural
I do not think SC2 positions are measured in meters. For earth like jumping you will have do divise a value based on scale (take the marine to be 7 ft or something and convert it to meters and measure his hight in SC2 units etc). Additionally remember that you could make it so that the gravity factor varies from stage to stage.
 
Level 7
Joined
Dec 11, 2004
Messages
237
I did all calculations you said ignoring the air friction but you got the point.

I assumed that 1 height unit of sc2 was equal to 1 meter but it's not! I think it should be something like 1 sc2height = 1.8 meters assuming a marine has this tallness.

I changed that and I think it's more natural now, I still have the walking on air problem however :D
 
could you explain the UI in the top left corner?

the game looks interesting,
but the aiming mechanism for ranged units seems off. you can only face in 8 directions it seems, leaving spots where you can't get unless you start walking around like crazy to get the right angle. (shown especially at 3:04 in your first video (the third one posted in this case))


plus the jumping as they said, needs some work.
 
Level 7
Joined
Dec 11, 2004
Messages
237
could you explain the UI in the top left corner?

the game looks interesting,
but the aiming mechanism for ranged units seems off. you can only face in 8 directions it seems, leaving spots where you can't get unless you start walking around like crazy to get the right angle. (shown especially at 3:04 in your first video (the third one posted in this case))


plus the jumping as they said, needs some work.

UI:
- Name
- Space for points in future
- Health
- Energy/Rage/Weapon heat that limits the usage of your special weapon (in that case the blue rays, if you try to shot with overheat the weapon explodes as you can see in the first video)
- Medikits (not yet implemented)
- Grenades (for now they are infinite)

About aiming i had 2 choices, the one is this 8 directional aiming, the other is the classic beat em up aiming where you can move in 8 directions but you can only shoot horizontally right or left. I tought the first choice was more interesting and fun to play.

Consider that the first video is the oldest, from that version I changed a bit how the collisions work.
The problem of marauder is that his arms are large and missles should spawn near his weapons, in future I'm going to make him shoot in alternance with left and right weapon so it would be more interesting to play.
The marine doesn't have this problem, he just shot straight to him :D
 
Last edited:
Level 7
Joined
Dec 11, 2004
Messages
237
Try getting their animation to freeze, check the actor events as you could probably wire something in there to freeze their animation under certain conditions (like adding a behaviour or something).

Whoa I finally fixed the walk in air animation bug O_O
That wasn't easy! The problem is that each time the unit walks any current animation is replaced with "walk" animation.
Now the jump seems perfect, you'll see on next video ;)
 
Level 3
Joined
Nov 26, 2008
Messages
15
I wondering... why is the zealot throwing bomb? = =||
Why don't make the zealot have some charge skill instead of throwing bomb.
Try make the zealot more protoss style, not terran style. ~.~|| that's the feeling your zealot gave me. = =||
Maybe can change its attack speed fast a bit or add a shield skill for zealot to protect himself for a fixed damage, it might improve the zealot gameplay. XD
Just giving comment around here, no other meaning. X(
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
It has been scientifically proven that human beings in fact do NOT follow parabolas when we jump.

It is parabolic in nature, but not a direct x^2 fashion.


Just an fyi...

Uh, parabolic implies that it's of a quadratic form i.e. ax^2 + bx + c. In real life, there's air resistance (which is absolutely negligible in this situation) and that makes the problem non-quadratic and thus non-parabolic.
 
Level 3
Joined
Jul 27, 2007
Messages
20
Nice to hear that the new version is coming out soon, thanks for the update Bibendus. Anyway, are you going to limit the hero's life this version?:goblin_boom: Unlimited lifes makes the game not challenging at all, at least for me.
 
Status
Not open for further replies.
Top