Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#391 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 December 2014 - 04:10 PM

I'm not quite sure what you're looking for. You add and position the combos yourself; all it does internally is remember what you've told it so it can draw the combos. If you need the internal ID numbers, they start at 0 and count up as you add more.



#392 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 15 December 2014 - 04:16 PM

I'm basically trying to make the additional combos damage link. Add it counts up by 6 if I remember correctly right?

 

The offsets are what is confusing me.

// __Ghost_AdditionalCombos data offsets
const int __GH_AC_COMBO             = 0; // 1, 7, 13, 19
const int __GH_AC_X                 = 1; // 2, 8, 14, 20
const int __GH_AC_Y                 = 2; // 3, 9, 15, 21
const int __GH_AC_WIDTH             = 3; // 4, 10, 16, 22
const int __GH_AC_HEIGHT            = 4; // 5, 11, 17, 23
const int __GH_AC_ROTATION          = 5; // 6, 12, 18, 24


Edited by Freya, 15 December 2014 - 04:17 PM.


#393 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 December 2014 - 04:19 PM

Each one starts at 1+id*__GH_AC_DATA_SIZE. The property constants are added to that.



#394 Saffith

Saffith

    IPv7 user

  • Members

Posted 26 December 2014 - 01:50 PM

I'd like to make a couple of potentially problematic changes to reduce overhead a bit.
I want to remove Ghost_Ax and Ghost_Ay. I don't see any scripts in the database that use them. None of my own scripts use them, even those in the demo.
I'd also like to remove Ghost_TileWidth and Ghost_TileHeight, or at least make them read-only, and add a Ghost_SetSize() function. It looks like everyone but me has been using Ghost_Transform() instead, anyway.
Would either of those be a problem for anyone? I think the only scripts in the database that would need updated are my own, but I didn't check all of them.

On an unrelated note, I'll probably also change the directories next version to include the version number (major and minor, at least), so that the files would be in ghost_zh/2.8. That would make it easier to have multiple versions, in case you want to keep an older one around to update a finished quest.

#395 Avaro

Avaro

    >w<

  • Members

Posted 26 December 2014 - 03:31 PM

Ghost_Ax and Ghost_Ay are for speed acceleration, right? Sounds like something I'd want to use, but I can live without it.

Aside from that, go for it!



#396 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 26 December 2014 - 06:02 PM

I'd also like to remove Ghost_TileWidth and Ghost_TileHeight, or at least make them read-only, and add a Ghost_SetSize() function. It looks like everyone but me has been using Ghost_Transform() instead, anyway.

Hmmm, I usually always use Ghost_TileWidth and Ghost_TileHeight when making my enemies larger than 1x1. It seems to work better for me than Ghost_Transform(). Though, making the function Ghost_SetSize() would be okay because it wouldn't be too hard to change the Ghost_TileWidth and Ghost_TileHeight to Ghost_SetSize. ;)

 

As for the other things you've discussed, I think that those changes would work.



#397 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 26 December 2014 - 08:03 PM

I always use Ghost_TileWidth and Ghost_TileHeight. I've never actually changed all the things in Ghost_Transform() at the same time, so I just use their individual variables instead. I only have one script that uses the acceleration values, but they seem pretty useful for anything with more complex movement patterns. You could get an identical effect by defining your own acceleration variable and adding that to Vx/Vy every frame, but you could say that about a lot of the ghost functions and variables.



#398 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 27 December 2014 - 12:10 AM

You shouldn't remove things period Saffith, you should deprecate them at most. Even if people are not using them. Which they are, I am for one at least some of my private scripts do.


Edited by Freya, 27 December 2014 - 02:12 PM.


#399 Saffith

Saffith

    IPv7 user

  • Members

Posted 27 December 2014 - 12:23 AM

Thing is, the point is to reduce overhead. Just deprecating them wouldn't do that.
An enemy's size almost never changes, so rechecking it every frame is silly. The acceleration variables are nearly unused, and it's not hard to provide your own if you need them.

#400 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 27 December 2014 - 08:25 AM

Well I did some checking and These five scripts of mine will be affected.

 

BS Aquamentus
Dodongo (Fire) "Size changes so it will probably become impossible to recreate"
MotherPlant
Z4_Thwomp

Super Trap

 

There's another concern I have with removing Ghost_TileWidth and Ghost_TileHeight. And that's that some people might not see the update and go and update their scripts. :(


Edited by Freya, 27 December 2014 - 02:14 PM.


#401 Evan20000

Evan20000

    P͏҉ę͟w͜� ̢͝!

  • Members
  • Real Name:B̵̴̡̕a҉̵̷ņ̢͘͢͜n̷̷ę́͢d̢̨͟͞
  • Location:B̕҉̶͘͝a̶̵҉͝ǹ̵̛͘n̵e̸͜͜͢d҉̶

Posted 27 December 2014 - 07:26 PM

Please don't get rid of Ghost_Ax/Ay. I've been using it a lot recently. Everything else, I haven't touched.

#402 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 27 December 2014 - 09:47 PM

What I don't understand why your so concerned about overhead when only one person has ever bought it up.



#403 Saffith

Saffith

    IPv7 user

  • Members

Posted 28 December 2014 - 03:02 PM

There are a lot of things I wish I had done differently from the start. Most of them can't reasonably be changed now, but these would have very little impact. I've checked every enemy script in the database now, and the only ones that would need updated are my own.
It's not a big deal, either way. I'd just like to make improvements where I can.

There's another reason for making Ghost_TileWidth and Ghost_TileHeight read-only. There's a bug that can occur if you don't use them just right, and it's not obvious how to avoid it. If you change both the enemy's size and hit offsets at once, the hitbox will be reset when the size change is applied at the next Waitframe. Using a function to change the size instead would fix that.

#404 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 29 December 2014 - 12:15 PM

Well you can always apply these changes in 3rd edition. :P



#405 Avaro

Avaro

    >w<

  • Members

Posted 29 December 2014 - 04:55 PM

There's another reason for making Ghost_TileWidth and Ghost_TileHeight read-only. There's a bug that can occur if you don't use them just right, and it's not obvious how to avoid it. If you change both the enemy's size and hit offsets at once, the hitbox will be reset when the size change is applied at the next Waitframe. Using a function to change the size instead would fix that.

Does that happen if you use Ghost_Transform() too?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users