Alfonso Crawford, the Slackerjack

  • Random
  • Archive
  • RSS
  • Ask
  • Submit
did-you-kno:

Source
View Separately

did-you-kno:

Source

    • #science
    • #physics
    • #feminism
    • #women
  • 1 month ago > did-you-kno
  • 8231
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Projectiles

It seems tumblr delete 3 of the 4 posts to your projectiles script.

I’ve noticed that when using physically simulated projectiles, frame skipping tends to occur, in which the projectile will be in front of the object for one frame, then behind it for the next frame, thus no collision has actually happened. Games like CoD use Rays to project from the gun, then do collision at the point of damage, which is a great effect to use in small map games. Whereas games like Battlefield in which the maps are large and Time On Target as well as gravity become an issue to players, they slow the bullet down substantially, which eliminates frame skipping, but makes the game slightly unrealistic. I propose having physically simulated projectiles where gravity and Time On Target are present, but have them project a Ray in front, about the same distance between the points of the projectile in each frame, so if anything comes in contact with it between frames, the bullet can do it’s damage, then add a bullet destruction effect at the point of contact with the Ray. Physically simulated bullets, minus the frame skipping.

    • #code
    • #programming
    • #collision
    • #physics
    • #game development
    • #game design
    • #submission
  • 4 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Movement System Explaination (8/???)

The way I handled adherence to a surface was pretty simple:

  • If the player is moving along a level plane or up a slope, the player simply follows the slope.
  • If the player is moving down a slope, the Z-displacement is replaced with a maximum incline.

There is a flag which determines if the Z-displacement is overwritten: this is to prevent “hopping,” when the slope-sensing ray detects a shallow incline before the player is actually touching it. The flag is unset when going up a slope and when the player is seen to be touching a level slope: the latter case is determined by the angle and distance of the slope-sensing ray. The length of the ray must be half the height of the player object, and the surface must be level.

Running over something like the top of a steep roof isn’t likely to go as expected. Player’s do a small hop, when going uphill to a level or downward slope. Since the system requires physical touching to work, the “ramp”-effect will most likely cause a player to fall alongside a ramp rather than travel down it (at higher speeds, anyway).

By the way, the maximum incline was determined by the following steps:

  1. Make a vector of (1, 0, -1), which is a 45-degree slope.
  2. Normalize it.
  3. Take the Z-value, and multiply it by whatever speed being applied.
    • #blender
    • #game development
    • #programming
    • #code
    • #python
    • #tutorial
    • #movement
    • #collision
    • #physics
    • #game design
  • 5 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Movement System Explaination (7/???)

Here’s the Blender-file, by the way~!

    • #code
    • #programming
    • #blender
    • #python
    • #game development
    • #links
    • #movement
    • #collision
    • #physics
  • 5 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Movement System Explaination (6/???)

I’M-A DUMPIN’ MAH MOVEMENT SCRIPTS.

Read More

    • #blender
    • #python
    • #game development
    • #code
    • #programming
    • #movement
    • #physics
    • #game design
    • #tutorial
    • #toshiro mifune
  • 5 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Pop-up View Separately
Pop-up View Separately
PreviousNext

Movement System Explaination (4/???)

    • #blender
    • #programming
    • #game design
    • #game development
    • #movement
    • #physics
    • #collision
    • #pictures
    • #linux
    • #open source
    • #foss
    • #tutorial
  • 5 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Movement System Explaination (3/???)

It should probably be stated that lateral and vertical movement are entirely separate from each other. The most they intersect is when the horizontal displacement is shifted to align with a plain.

Oh! On that note: it’s best to use a capsule instead of a cone because the dull bottom allows a slope to be detected before moving off a precipice. If a cone was used, there’d have to be a safeguard put in place to make sure the player didn’t go flying off the top of hills on account of registering as airborne.

Just thought you ought to know all that.

    • #toshiro mifune
    • #programming
    • #physics
    • #movement
    • #collision
    • #game design
    • #game development
    • #linux
    • #blender
    • #python
    • #open source
    • #foss
    • #tutorial
  • 5 months ago
  • 3
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Movement System Explaination (2/???)

Read More

    • #movement
    • #physics
    • #bullet
    • #blender
    • #python
    • #game design
    • #game development
    • #tutorial
    • #toshiro mifune
    • #linux
    • #open source
    • #foss
    • #programming
  • 5 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Movement System Explaination (1/???)

Okay, see this?

image

Don’t lie. I know you do. It’s the player’s primary body, in this game. Take a Capsule metaball, rotate it sideways in Edit Mode, and make it into a mesh. Easy as pie. The body finds what it’s standing on via the Touch sensor, which is actually a terrible idea because it would mean that even touching walls and ceilings would count as grounded: to alleviate this, a capsule is parented to a cylinder set to the Sensor physics-type for double-checking.

image

Isn’t that cute? And it works.

There’s a small script that executes within the capsule that triggers with the cylinder’s own Touch sensor as well as the capsule’s own:

from bge import logic, events
from mathutils import Vector

c = logic.getCurrentController()
o = c.owner

touch = c.sensors['Touch']
slope = c.sensors['Slope']
grounded = touch and slope

if touch.positive:
    o['grounded'] = False
    for obj in slope.hitObjectList:
        if obj in touch.hitObjectList:
            o['grounded'] = True
            break
else:
    o['grounded'] = False

o['touch'] = touch.positive
o['slope'] = slope.positive

Pretty simple, right? If the cylinder and capsule are touching the same object, then the player is standing on something. In theory, this allows for players to potentially jump off of each other in mid-air, but that’s badass so we won’t consider it a bug.

I’ve got work in an hour, so we’ll call it a wrap for now. See ya around…

image

… you sexy fuckers. ♥

    • #code
    • #programming
    • #tutorial
    • #python
    • #blender
    • #game design
    • #game development
    • #shooters
    • #open source
    • #foss
    • #linux
    • #toshiro mifune
    • #collision
    • #physics
    • #movement
  • 5 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Huzzah!

The movement system seems to work! There’s a little quirk involving jumping, but there’s nothing I can do about that until I get better access to the physics engine.

More to come in the next few days.

    • #blender
    • #collision
    • #physics
    • #movement
    • #programming
    • #game design
    • #game development
    • #foss
    • #open source
    • #python
    • #linux
  • 6 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Page 1 of 3
← Newer • Older →

About

Avatar

Need help making games? websites? mafia hits? I'll help you do it more simply. There's a lot of nonsense out there in development, and I've got as little patience for it as you. My focus is, right now:

  • Blender / Python
  • HTML5 / JavaScript
  • PHP / Ancient Necromancy

On this site, you'll find a mix of detailed tutorials and quick tips to keep from losing nights to stupid hiccups. Along the way, I will spam fanart and digressions regarding modern survivalism, personal projects, and tales of my antagonizing the animal kingdom.

This blog is LGBT Friendly

WARNING: the author of this blog has an unhealthy interest in women, and it is periodically reflected in the content shared. Most of the sick displays will be safe for work.

Pages

  • An Important Sidenote
  • Fluffernutter Peanut-butter with a Slice of Cheese

Me, Elsewhere

  • @MadamLaunch on Twitter
  • My Skype Info
  • Linkedin Profile

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask
  • Submit
  • Mobile
Effector Theme by Pixel Union