Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds another planetstation mob, the "Seedling" #29253

Merged
merged 5 commits into from Aug 2, 2017

Conversation

Ergovisavi
Copy link
Contributor

@Ergovisavi Ergovisavi commented Jul 14, 2017

Adds another planetstation mob, the "Seedling". It's basically a gun turret that looks like a flower. It shoots large volleys of energy bullets, and has a laser attack that automatically hits you if you do not interrupt its attack by hitting it before it fires. It won't start shooting at you from offscreen, you have to be onscreen to catch its attention first. If you go offscreen after it starts charging up and you know the laser is incoming, it will hit you.

Bring a friend to stab it in the butthole while you dodge its fire, or be mlg pro and dodge the shots and hit it between volleys

It looks like this:

seedling_sprites

It kills you like this:

flower_power_2

[
🆑
add: Adds the "seedling" planetstation mob to the backend
/:cl:

@tgstation-server tgstation-server added Feature Exposes new bugs in interesting ways Sprites A bikeshed full of soulless bikes. labels Jul 14, 2017


/datum/status_effect/seedling_beam_indicator/be_replaced()
owner.underlays -= beam_overlay
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

underlays?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a clever man

update_icons()
var/datum/callback/cb = CALLBACK(src, .proc/InaccurateShot)
var/i
for(i=0, i<13, i++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for(var/i in 1 to however_many_shots_this_is)

@Tacolizard
Copy link
Contributor

@ghost
Copy link

ghost commented Jul 14, 2017

now, i know it's an immobile creature but is this player controlled?

hitsound_wall = 'sound/weapons/effects/searwall.ogg'
nondirectional_sprite = TRUE

/obj/item/projectile/seedling/Bump(atom/A, yes)//Stops seedlings from destroying other jungle mobs through FF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Collide now.

QDEL_NULL(beam_overlay)
return ..()

/datum/status_effect/seedling_beam_indicator/tick()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holy shit the appearance churn is real.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the indicator looks ugly anyway is this really necessary?
If it is, remove it for now, when 512 comes along there's a way to do this in a cheaper manner, and you can have it then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the seedling is offscreen, or you are engaged with two separate seedlings, or two seedlings are charging up at two separate people, there'd be no way to tell which one you need to smack to free yourself without an indicator.

I do think the churn is too high and so I'd like to use a cheaper method but this information needs to exist for the player

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then, considering planestation will come way after 512, if ever, remove this for now and when the time comes I'll help you redo it with 512.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can laser people offscreen?
WHY?

our_seedling.combatant_state = SEEDLING_STATE_NEUTRAL
our_seedling.death()

/obj/seedling_weakpoint/proc/RandomizeScreenLocation()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Is the icon state the same sprite but in multiple locations? if so, just randomise pixel_x/pixel_y

also screen is a huge misnomer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Icon isn't the same. It was originally a little dot on a random pixel_x/pixel_y but it looked kinda shit so I just made it in three separate locations with a specific sprite in each location

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then rename everything.
PickVisuals(), RandomSprite() etc.

if(combatant_state == SEEDLING_STATE_ACTIVE && living_target && beam_id == solar_beam_identifier)
if(living_target.z == z)
update_icons()
solar_beam = new(src,target,time=5,beam_icon_state="solar_beam",maxdistance = INFINITY,btype=/obj/effect/ebeam/solarbeam,beam_sleep_time = 0.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend making this from the turf to the target, since beam handles larger icon files weirdly.
You can see how in the gif.

@@ -578,11 +578,336 @@
icon_state = "mook_leap_cloud"
layer = BELOW_MOB_LAYER
pixel_x = -16
pixel_y = -16
pixel_y = -12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's with this mook change?

anchored = TRUE
var/combatant_state = SEEDLING_STATE_NEUTRAL
var/obj/seedling_weakpoint/weak_point
var/datum/beam/solar_beam = null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the = null please

hitsound_wall = 'sound/weapons/effects/searwall.ogg'
nondirectional_sprite = TRUE

/obj/item/projectile/seedling/Bump(atom/A, yes)//Stops seedlings from destroying other jungle mobs through FF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/obj/item/projectile/seedling/Collide(atom/A)

var/matrix/final = matrix()
final.Turn(target_angle)
beam_overlay.transform = final
owner.overlays += beam_overlay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_overlay


/datum/status_effect/seedling_beam_indicator/tick()
var/target_angle = Get_Angle(owner, target)
owner.overlays -= beam_overlay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cut_overlay


/datum/status_effect/seedling_beam_indicator/Destroy()
if(owner)
owner.overlays -= beam_overlay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cut_overlay

face_atom(target)
if(solar_beam)
qdel(solar_beam)
solar_beam = null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QDEL_NULL(solar_beam)

if(weak_point && !QDELETED(weak_point) && combatant_state == SEEDLING_STATE_REGENERATING)
revive(TRUE)
mouse_opacity = 1
weak_point.loc = src
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forceMove


/obj/seedling_weakpoint/Destroy()
. = ..()
if(our_seedling && !QDELETED(our_seedling))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just !QDELETED(our_seedling)

if(!our_seedling.stat)
our_seedling.combatant_state = SEEDLING_STATE_NEUTRAL
our_seedling.death()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our_seedling = null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would I need to null out our_seedling? The object deletes itself as soon as this finishes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ergo, it will TRY to qdel itself after this finishes, but since our_seedling is still pointing to the mob, there's a reference, and it won't qdel properly, so it'll sit in the qdel queue for a little while and THEN it'll trigger a harddel (a del() which is stupidly bad)

Mobs already don't qdel well, but I think simple animals can, so don't make it worse.

If your object/mob/etc. uses references to other objects/mobs/etcs then it MUST null them in Destroy()

playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1)

/mob/living/simple_animal/hostile/jungle/seedling/update_stat()
if(weak_point && !QDELETED(weak_point))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!QDELETED(weak_point)

@Tacolizard
Copy link
Contributor

Tacolizard commented Jul 15, 2017

this seems kind of op. like, harder than leapers op. these should not spawn very often, or be bosses.

@ghost
Copy link

ghost commented Jul 15, 2017

leapers are only strong alone and these are also the case

@DoctoreMad
Copy link

Come on mate, have you tried fighting it yourself or are you going off looks?
I could say it looks easy to me and it would be nonconstructive as fuck because I'm going off a .gif

@DoctoreMad
Copy link

Tbh this could be a boss if it was surrounded by rglass in a titanium wall dome so the projectiles kept reflecting everywhere.

@KingPhilipIII
Copy link

Alright. I'll be honest. I don't know what planetstation even is. Can someone please enlighten me.

@ChangelingRain
Copy link
Contributor

I think the weak point/regen thing isn't necessary, maybe just have it explode briefly after killing it so you don't waste that sprite

@Ergovisavi
Copy link
Contributor Author

Yeah I think at this point I'll just cut the weakpoint thing, it was just a spitballing idea and I don't think it actually has much merit, since it doesn't really change how you act against the mob unless you were shooting at it.

@DoctoreMad
Copy link

DoctoreMad commented Jul 15, 2017

@KingPhilipIII ONE DAY A BUNCH OF IDEA GUYS THOUGHT IT WOULD BE COOL IF THE CREW COULD GO AROUND CONQUERING PLANETS IN THE NAME OF NANOTRASEN. ALSO THEY THOUGHT THAT IT WOULD ALSO BE PRETTY COOL IF THERE WERE MORE ENEMY MOBS WITH ADVANCED AI, TOO, AMONG OTHER THINGS.
AND SO "PLANETSTATION" WAS FORMED!

@Ergovisavi
Copy link
Contributor Author

Removed the weakpoint gimmick it's just not something viable as a gameplay mechanic due to the way our combat works and is more suited for a game with a better aim system

@DoctoreMad
Copy link

That reminds me.
@KorPhaeron About your goal of having a planet-naming scroll on the planetstation project list, isn't it already done?

@imtakingabreakdontatme
Copy link
Contributor

Yeah

@Cheridan
Copy link
Contributor

An enemy that requires you juke waves of bullets in a game where any damage makes you go slower sounds like its not going to be very fun

@ghost
Copy link

ghost commented Jul 16, 2017

the projectile sprite looks bad especially when it is firing multiple at once.
perhaps give it a completely different projectile instead of "solar energy" or make the projectile sprite smaller and/or make it fire less projectiles

@Ergovisavi
Copy link
Contributor Author

Ergovisavi commented Jul 16, 2017

@Cheridan The environment in which these are fought are assumed to have dense trees to use as cover, so if you're not confident in your ability to dodge volleys, use cover. Or bring a friend. Also, you have to be shot by four bullets before you suffer any slowdown, so getting clipped a little won't significantly hinder you.

@PraiseRatvar You're going to have to be more specific other than "looks bad". The projectile sprite size is so large so you can see the tile it's occupying a bit better due to our wonky "hitboxes" being a tile wide regardless of image used

@silicons
Copy link
Contributor

silicons commented Jul 17, 2017

making ebeam fake-hitscans

but i already made a beam rifle projectile that hitscans properly and has pixel and angle accurate sprites!!!

sigh.
@Ergovisavi

@Ergovisavi
Copy link
Contributor Author

@kevinz000 Your beam rifle fires a projectile and can hit targets on the way to the actual target which is explicitly the behavior I do not want

It's not a true laser, all the visual effects are just set dressing.

@silicons
Copy link
Contributor

@Ergovisavi ah ok.

@RemieRichards
Copy link
Contributor

Ergo refuses to wait for 512 where his visual effect will be cheap enough to not cause painful client lag, so I am closing this until 512 is stable at which point we can reopen this PR or create a new one.

@ghost
Copy link

ghost commented Jul 17, 2017

:(

@ChangelingRain
Copy link
Contributor

ChangelingRain commented Jul 17, 2017

Okay so the pointing to the seedling thing isn't viable until byond 512 and ergo doesn't want to add the mob without the laser beam and pointing thing, so, until Byond 512...
EDIT: wow rip Remie got it first

@Ergovisavi
Copy link
Contributor Author

Guess this is on the backburner until after 512 without Kor or someone else stepping in, RIP

@Tokiko1
Copy link
Contributor

Tokiko1 commented Jul 19, 2017

Mind elaborating what so expensive about the visual effect is?

@RemieRichards
Copy link
Contributor

Every status effect tick() ergo is creating a new appearance for the visual effect (rotating it X degrees, as the effect is a compass), and then applying that effect to the target mob, that's 2 appearances per tick where with 512 it can be just 1 per tick, once 512 is also stable we can look into porting something like /vg/'s hook system so that the compass won't ever update unless either the seedling or the target move (which is the 100% best perfect case, meaning you have nothing happening on tick() which keeps things nice and cheap)

Creating and replacing appearances in DM is horrendously slow, it's why 510/11 introduced /mutable_appearance, every change to an appearance var creates a new one, eg:

bob.pixel_y = 32 //new appearance
bob.pixel_x = 32 //another new appearance
bob.color = "red" //another new appearance

That's 3 appearance, 2 of which didn't need to exist (the pixel_x/y ones only existed for a short time before being destroyed and replaced by the next one along)
With 510/11 and /mutable_appearances something like the above can instead be:

var/mutable_appearance/MA = new()
MA.pixel_y = 32
MA.pixel_x = 32
MA.color = "red"
bob.appearance = MA //This 'commits' MA, turning it from a /mutable_appearance into a real appearance, meaning only 1 was created per n-appearance variables changed, instead of n per n

With 512, there's visual_contents, which is like overlays and underlays, but the objects inside visual_contents REMAIN as objects, they don't get flattened into appearances, meaning any update to their appearance doesn't need to go through the whole overlay/underlay painful sorting process.

So tl;dr 512 will be one step closer to perfect, then a hook-system can make it 100% perfect.

@Ergovisavi
Copy link
Contributor Author

Ergovisavi commented Jul 21, 2017

Changed to using a screen object, which should serve roughly the same purpose without the need to constantly tweak overlays, changed the beam to behave more like a kill sat so it's more logical that it hits you behind cover

@ghost
Copy link

ghost commented Jul 24, 2017

ok it's been open for two days lets merge it up guys

@optimumtact
Copy link
Member

@RemieRichards did you review the latest version?

@Ergovisavi
Copy link
Contributor Author

Can I get some traction on this?

@RemieRichards
Copy link
Contributor

Really? assigning me just so I can say "Yes it's fine"?

"Yes it's fine"

@Cyberboss
Copy link
Member

:^)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways Sprites A bikeshed full of soulless bikes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet