View Issue Details

IDProjectCategoryLast Update
0017881Starward RogueSuggestionFeb 1, 2016 1:42 am
ReporterPepisolo Assigned Tokeith.lamothe  
Severityminor 
Status resolvedResolutionfixed 
Product Version0.137 (Revised Room Art) 
Fixed in Version0.200 (First Steam Version) 
Summary0017881: Shot Rotation (engine feature)
DescriptionI've been messing around with shot modding - cool engine btw -- but haven't come across this feature, yet. Maybe it's already there, I could be wrong but... shot rotation?

I imagine you would have 2 variables. RotationDirection(clockwise or counterclockwise) and RotationSpeed (a number, heh) which would allow the shots to rotate at a specific speed. This could really increase the variety of shots that could be created and add a little pizzazz without requiring art assets.

For example, create a star shot, add rotation, and now you have the shuriken shot. Just an idea, apologies if this is super unfeasible or already in the engine and I've missed it.
TagsNo tags attached.

Activities

Draco18s

Nov 27, 2015 9:31 pm

developer   ~0043679

It is kind of already there. I think you're looking for:

<change angle="200" time="1" />

I'm going off of TLF's bullet file, but the SR ones look like they've gained features, not lost, so that should work. The time is the delay, and the angle is the final value.

Pepisolo

Nov 27, 2015 10:55 pm

developer   ~0043680

Last edited: Nov 27, 2015 10:56 pm

It's already there!? Cool, I'll check this out later, ta.

Misery

Nov 29, 2015 1:20 am

developer   ~0043683

"Change angle" actually changes the trajectory though, I think he means just changing the direction it APPEARS to be pointing in?

I would definitely support something like that. Some other effects that are just "visual" to add to the engine for bullets would be nice as well.

Draco18s

Nov 29, 2015 9:30 am

developer   ~0043684

Oh! You're right. And yes l that would be a neat feature.

Pepisolo

Nov 29, 2015 10:54 am

developer   ~0043685

Last edited: Nov 29, 2015 11:01 am

Yeah, I meant rotatable appearance of the sprite. Something like this would really open up a lot of possibilities for the bullet visuals.

To be clearer: specifically I was thinking that you set a speed and direction, and as soon as the bullet is spawned it begins rotating that way, giving the illusion of a spinning projectile.

Chris_McElligottPark

Nov 29, 2015 11:02 pm

administrator   ~0043688

Setting a rotation on the appearance of the sprite has more to do with the bullet entity itself (defined in CMP_Bullets) versus the bullet pattern. Most of the xml stuff from here can apply to bullet entieis, which you can rename as desired.

Note how shots are able to use a different image name from their entity name, thus allowing one graphic to be used for multiple shot definitions:

<entity name="ShotSludgeFire" category="Shot" shader="Additive" draws_below_others="true" image_name="ShotSludge">
    <hitbox radius="22" />
  </entity>

I've not tested this, but I imagine it would work:

<entity name="BulletDoubleTriYellowSpinner" category="Shot" passive_rotation_speed="6" image_name="BulletDoubleTriYellow" >
    <hitbox radius="8" />
  </entity>

That uses the passitve rotation thing as defined here: https://arcengames.com/mediawiki/index.php?title=Starward_Rogue:XML_-_GameEntity_Definitions

If that doesn't work, then please do let me know. But it shouldn't have any gameplay effect; just graphical, as you're requesting. :)

Pepisolo

Nov 30, 2015 11:14 am

developer   ~0043694

I tried testing this, and it doesn't seem to work, although I could be wrong since my understanding of the system is quite limited. That passive_rotation_speed variable is listed in the AI-only section and I was using it for a player weapon so maybe that's why?

Chris_McElligottPark

Nov 30, 2015 2:26 pm

administrator   ~0043697

Next build you can use this:

- added to bullet:
*non_sim_rotation_speed_rand_min (float), non_sim_rotation_speed_rand_max (float)
**For each NonSim-only entity spawned by this definition, applies an ongoing rand(min,max) degrees-per-second rotation.

Thanks!

Pepisolo

Dec 28, 2015 5:42 pm

developer   ~0043950

Anybody got any examples on how this new bullet spinning code is meant to be written? I haven't been able to get it working, yet. Usually if I'm not sure how something works I can just look at one of the other examples of it in game, but nobody seems to have used this feature so far.

Misery

Dec 28, 2015 7:09 pm

developer   ~0043951

I actually had forgotten this was there...

I'm guessing that this goes either in the initial defining bit for the bullet (the bit that actually has "bullet" written in it) or if not that, in the "change" command. I cant think of any other way this would really function.

I'll try to remember it's there and mess with it later tonight.

Misery

Dec 29, 2015 9:03 am

developer   ~0043952

Tried it out, using it as described in the XML documentation, and it doesnt appear to be working. Doesnt do anything at all.

Is there something I'm missing? I'll admit I still dont really understand this "non-sim" thing, so that might be part of it.

ptarth

Feb 1, 2016 1:42 am

developer   ~0044958

I've made spinning bullets, but it was ugly. I use <change angle> in combination with <change location> inside of a loop. Having the graphic be independent of the actual shots direction would be nice. I haven't tried the sim_rotation yet to see if it works. I'm searching past mantis entries for beam weapon notes.

Issue History

Date Modified Username Field Change
Nov 27, 2015 7:16 pm Pepisolo New Issue
Nov 27, 2015 9:31 pm Draco18s Note Added: 0043679
Nov 27, 2015 10:55 pm Pepisolo Note Added: 0043680
Nov 27, 2015 10:56 pm Pepisolo Note Edited: 0043680
Nov 29, 2015 1:20 am Misery Note Added: 0043683
Nov 29, 2015 9:30 am Draco18s Note Added: 0043684
Nov 29, 2015 10:54 am Pepisolo Note Added: 0043685
Nov 29, 2015 11:01 am Pepisolo Note Edited: 0043685
Nov 29, 2015 11:02 pm Chris_McElligottPark Note Added: 0043688
Nov 29, 2015 11:02 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Nov 29, 2015 11:02 pm Chris_McElligottPark Status new => feedback
Nov 30, 2015 11:14 am Pepisolo Note Added: 0043694
Nov 30, 2015 11:14 am Pepisolo Status feedback => assigned
Nov 30, 2015 2:26 pm Chris_McElligottPark Note Added: 0043697
Nov 30, 2015 2:26 pm Chris_McElligottPark Status assigned => resolved
Nov 30, 2015 2:26 pm Chris_McElligottPark Fixed in Version => 0.200 (First Steam Version)
Nov 30, 2015 2:26 pm Chris_McElligottPark Resolution open => fixed
Nov 30, 2015 2:26 pm Chris_McElligottPark Assigned To Chris_McElligottPark => keith.lamothe
Dec 28, 2015 5:42 pm Pepisolo Note Added: 0043950
Dec 28, 2015 7:09 pm Misery Note Added: 0043951
Dec 29, 2015 9:03 am Misery Note Added: 0043952
Feb 1, 2016 1:42 am ptarth Note Added: 0044958