Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


BradDaBug

Member Since 02 May 2001
Offline Last Active Jul 30 2014 02:40 PM

Posts I've Made

In Topic: Need help with 2D puddle

28 May 2014 - 10:00 PM

I darkened and smoothed it, and now I'm feeling a bit better about it. It's a big improvement over what I had. But it still doesn't look quite right. It looks like a dried wax seal rather than a puddle of goo. I think I'll try to smooth out the edges a bit to make it look more wet and gooey.

 

Attached File  puddle4.jpg   224.7KB   5 downloads


In Topic: Need help with 2D puddle

26 May 2014 - 03:10 PM

It's flat circle.

 

Here is another attempt. I based it on the blood decal, so it fits a little better, but it doesn't really look like a puddle. It looks more like... I'm not sure. But I think I'm going in the right direction. I just wish I knew how to make it look more puddle-y. Should the interior be smoother? And making a green puddle contrast against the green grass is tricky.

 

Attached File  puddle3.jpg   202.8KB   7 downloads


In Topic: Need help with 2D puddle

24 May 2014 - 08:37 PM

I like that a bit better than what I have. Here is my attempt (The dark spots aren't part of the decal. That's a bit of green smoke left by a kitten before it dissolved):

 

Attached File  puddle2.jpg   199.23KB   5 downloads

 

But there's still something off about it. It could just be that it doesn't jibe with the blood. The blood is a little more realistic but the goop is very stylized.


In Topic: Moving pendulum

23 November 2012 - 05:20 PM

I think that diagram may have been more confusing than helpful (plus I found at least one bug in my code). After some more work I came up with this, and it seems to work ALMOST correctly (in 2 dimensions, even), except when I really start slinging the cursor around. It seems like the pendulum bob should be held straight out by centrifugal force, but instead it kind of starts jumping around erradically until it looses some velocity and settles down.

[source lang="csharp"]private void update(float elapsedTime, int x, int y){ // figure out the current mouse velocity Vector3 vel = new Vector3(); vel.X = x - _position.X; vel.Y = 0; vel.Z = y - _position.Z; vel /= elapsedTime; // compare the current velocity with the old to calculate acceleration Vector3 acceleration = (vel - _oldVelocity) / elapsedTime; acceleration.Y = -90000.0f * elapsedTime; _oldVelocity = vel; // calculate the XY plane angular velocity float accelerationZ = acceleration.Z; acceleration.Z = 0; float b = (float)Math.Atan2(acceleration.Y, acceleration.X); float a = acceleration.Length() * (float)Math.Cos(b - (_bobAngle.X - MathHelper.PiOver2)); _bobAngularVelocity.X += a / _springLength * elapsedTime; // calculate the YZ plane angular velocity acceleration.Z = accelerationZ; acceleration.X = 0; b = (float)Math.Atan2(acceleration.Y, accelerationZ); a = acceleration.Length() * (float)Math.Cos(b - (_bobAngle.Y - MathHelper.PiOver2)); _bobAngularVelocity.Y += a / _springLength * elapsedTime; // apply damping _bobAngularVelocity -= _bobAngularVelocity * 2.0f * elapsedTime; // apply velocity _bobAngle.X += _bobAngularVelocity.X * elapsedTime; _bobAngle.Y += _bobAngularVelocity.Y * elapsedTime; _bobAngle.X = MathHelper.WrapAngle(_bobAngle.X); _bobAngle.Y = MathHelper.WrapAngle(_bobAngle.Y); _position.X = x; _position.Z = y;}[/source]

In Topic: [SlimDX] How to speed up my engine?

10 August 2010 - 11:34 AM

I found this and implemented it, and it seems plenty fast enough to use at run time. And even though all I've done so far is change my code to set the lightmap texture parameter just once instead of again and again for each surface I'm already seeing something close to a 2x speed increase.

I'm putting a 1 pixel gutter around each lightmap inside the atlas, and sometimes it's possible to see it. I guess I need a bigger gutter.

But anyway, thanks!

PARTNERS