Ahh, nice! A classic damage pop-up-and-fade effect. It's really great that DM can now do such "simple" graphical things (I mean, games have been doing that since SNES days!) with a native function as opposed to a bunch of cobbled-together instructions.

Anyone have any plans to compile a bunch of "generic" effects into a library?
If I might make a suggestion on the damage display, I think it might look even better if it waited before fading. Try bringing it partway up and then bringing it the rest of the way while fading out; or even bring it up, make it stop, and then make it fade out. I think those approaches might look even better.
In response to Lummox JR

I agree, this does look better. Would like to see some other damage display effects, I think they could be especially fun in some sort of turn based games (Pokemon, NEStalgia etc.). Am I correct in thinking that you can't scale maptext up or down using transform? And that actual icons would have to be used to build the damage display object?
Boom!
Angry Birds....GO!
Hey! You know what we need?

We need a new contest!

"The Flashy Features from 500 [synonym for "contest that begins with "F"]"
I tried doing my own little version, but I ran into this issue:

mob
verb
maptext_test()
new /obj/mt(src, "Test")
obj
mt
New(mob/m, text = "Test")
maptext = text
loc = m.loc
pixel_y = 32
sleep(5)
animate(src, pixel_y = 64, time = 10)
animate(alpha = 0, time = 10)
sleep(5)
del src


When doing this, it doesn't fade. It just immediately disappears. Is this supposed to happen?
Looking through the topic, some of the things look amazing. Really looking forward to seeing what new games and libraries people create with 500.

Some tutorials would be great too, and I think a lot more developers will make use of animate() when the process of creating certain effects is thoroughly explained.

EDIT:

This is how I did my maptext fade. The base of it is from some code Lummox (I think) posted somewhere.
mob/verb/Self_Harm()
var/n = rand(50,999)
new/obj/effect/damage(src.loc, src, n)

obj/effect/damage
New(newloc, mob/M, n)
maptext = "<font color=white><b><center>[n]"
pixel_y=32 //Set it to the top of the players icon
sleep(7) //initial delay
animate(src, alpha=0, pixel_y=64, time=5) //half a second to movie it up and fade out
spawn(15) del(src) //delete the object
In response to Albro1
Albro1 wrote:
I tried doing my own little version, but I ran into this issue:

mob
> verb
> maptext_test()
> new /obj/mt(src, "Test")
> obj
> mt
> New(mob/m, text = "Test")
> maptext = text
> loc = m.loc
> pixel_y = 32
> sleep(5)
> animate(src, pixel_y = 64, time = 10)
> animate(alpha = 0, time = 10)
> sleep(5)
> del src

When doing this, it doesn't fade. It just immediately disappears. Is this supposed to happen?

I believe that animate() works like the walk_ functions. It processes in the background, and the calling procedure continues.

So those two calls to animate() aren't pausing your proc until they finish. They're called, and then immediately, it runs the sleep(5) and then deletes your object.
In response to SuperSaiyanGokuX
SuperSaiyanGokuX wrote:
I believe that animate() works like the walk_ functions. It processes in the background, and the calling procedure continues.

So those two calls to animate() aren't pausing your proc until they finish. They're called, and then immediately, it runs the sleep(5) and then deletes your object.

That's right. The animate() proc sets up something like a glide, where the change is done on the client end; nothing pauses on the server. (Perhaps that needs to be clarified in the reference.) Any sleep() you do has to take this into account; I'd actually go a few ticks over, just in case.
In response to Danny Roe
Danny Roe wrote:

I agree, this does look better. Would like to see some other damage display effects, I think they could be especially fun in some sort of turn based games (Pokemon, NEStalgia etc.). Am I correct in thinking that you can't scale maptext up or down using transform? And that actual icons would have to be used to build the damage display object?

I was actually thinking of moving the damage number a short way, and then fading out while it kept moving, like so:
animate(obj, pixel_y = 16, time = 5)
animate(pixel_y = 32, alpha = 0)

But obviously tastes will differ--I'm sure there are a thousand ways to do this.

The transform var does not impact maptext. I'm still open to the idea of the translation part doing so however, as that wouldn't require any scaling or rotation, and I think it would be pretty useful for stuff like screen objects. Much as I'd love to scale/rotate maptext too, it's a different beast entirely.
In response to SuperSaiyanGokuX
SuperSaiyanGokuX wrote:
Hey! You know what we need?

We need a new contest!

"The Flashy Features from 500 [synonym for "contest that begins with "F"]"

http://www.byond.com/forum/?post=1386043

:)
In response to Writing A New One
Writing A New One wrote:
SuperSaiyanGokuX wrote:
Hey! You know what we need?

We need a new contest!

"The Flashy Features from 500 [synonym for "contest" that begins with "F"]"

http://www.byond.com/forum/?post=1386043

:)

"Ask and ye shall receive."

Awesome! Hopefully, this will be an inspiration for some of these guys to turn these really nifty looking tech demos into something playable!
It's nice to see so much activity from an update -- and from the developers of the community no less. This is really exciting :)
I think a billiards game should be made. Could've been done before, but now you can do all the cool cue pulling effects
In response to Bravo1
I'd have done this long ago if I could take the time to learn/implement circle-circle collision. It (and some things shown off in this topic) requires none of the new stuff, though.
In response to Kaiochao
Most of the stuff here could be done before, though the new stuff makes a lot of it easier.
I would love to see a nice Billiards game with the example Flick did...
I'd have done this long ago if I could take the time to learn/implement circle-circle collision. It (and some things shown off in this topic) requires none of the new stuff, though.

Make mobs non-dense and have them look for mobs within their bounds (the box being slightly larger than the mob icon). Then, calculate the direct distance between the centers by adding 1/2 the width to the x position and 1/2 the height to the y position to get the center (step_x and step_y included for pixel accuracy).

Use Pythagorean theorem to calculate the exact distance between both centers (a^2+b^2=c^2) If the distance is small enough (icons contact), then transfer energy from one to the other. The velocity of the ball hit will be based on the angle of contact which is modified by the angle of approach (i.e. if a ball sideswipes the other, the second ball doesn't move in the same direction as the first, since contact wasn't dead-on).

That should be enough to start with, then you'll get into stuff like putting spin on the cueball and that adds another factor into the equation that'll make things pretty interesting. For a rough draft though, assume the cue always his the cueball dead center.
Or I could just make it and beat you all to the punch but I'm not sure how to get that fancy cue stick working.
Page: 1 2 3 ... 6 7 8 9 10 ... 17 18 19