PDA

View Full Version : Lets throw in an awesome feature and not document it. :P



bigjoe
05-20-2008, 05:43 PM
I will express my post in the form of a Star Wars Crawl (http://www.starwarscrawl.com/?id=807)

:D

Joe123
05-20-2008, 05:49 PM
That...


Is genius! =P


http://www.armageddongames.net/forums/showthread.php?t=102492
And that thread might provide some answers.

bigjoe
05-20-2008, 06:41 PM
Width, Height, and Depth are pieces of the puzzle that I've already figured out. What I'm looking for would be something like ColOffsetX or TileOffsetY. Im assuming that something like them exists due to jman's statement in the ZC Changelog. It sounds like you can give them a negative value and move thier origins. That would allow me to put the enlarged flying enemy I am working on above it's shadow by giving them negative values.


Additionally, one can change the offset from the enemy's position to start drawing the sprite, as well as the offsets and size of the sprite's collision box (so variable sized weapon projectiles are possible as well). More information when the new build comes out.

Gleeok
05-20-2008, 07:06 PM
Yep, There may be a minor bug with the collision stuff, but since I have no idea of all of the commands to access these attributes, I can't really say. Right now sprite angles with atan are passing right through Link because the hit box is centered at the upper left corner.

You probably know as much as I do right now, and I also can't really figure out what exactly ColDepth does?? What does it do? :confused:


BTW: The star wars crawl...Awesome.

_L_
05-21-2008, 04:26 AM
Hello!

Not telling people about the names of those variables is actually advantageous to myself, as it means I can change the names of the variables without complaint. Which I have indeed done!

That being said, here are what the names of those variables will be in the next build:
int HitWidth
* The width of the sprite's hitbox, or collision rectangle.

int HitLength
* The length of the sprite's hitbox, or collision rectangle.

int HitHeight
* The height of the sprite's hitbox, or collision rectangle. The greater it is, the higher Link must jump or fly over the sprite to avoid taking damage.

int HitXOffset
* The X offset of the sprite's hitbox, or collision rectangle. Setting it to positive or negative values will move the sprite's hitbox left or right.

int HitYOffset
* The Y offset of the sprite's hitbox, or collision rectangle. Setting it to positive or negative values will move the sprite's hitbox up or down.

int HitZOffset
* The Z offset of the sprite's hitbox, or collision rectangle.If you want to know the current names of those variables (and I'd like to mention that they won't be supported beyond this point) simply substitute all instances of "Hit" for "Col", "Height" for "Depth" and "Length" for "Height". Understand?

...Incidentally, I just started writing an article about the Z-axis (http://www.shardstorm.com/ZCwiki/Z-axis), which might be informative.

_L_
05-21-2008, 04:53 AM
By the way... for some reason shardstorm.com isn't working quite right. An update I committed some days ago isn't showing up. O well.

C-Dawg
05-21-2008, 09:57 AM
Very nice. Now I can make custom bosses vulnerable over a larger area. Kudos!

jman2050
05-21-2008, 12:47 PM
I knew I forgot something.

Sorry about that. _L_ picks up the slack, as usual :P

bigjoe
05-23-2008, 04:31 PM
Is there also a way to offset the location at which the tiles are drawn? Currently I have an enemy that is 5x3 tiles but I want his collision boundaries to be 2x2 or perhaps 3x2 tiles. Alternatively, I could just offset the collision boundaries and switch it to an enemy type that doesnt have a shadow, and then do my own flying code. Think I may just do that instead.