Tuesday, August 7, 2007

Sigh. Sometimes planning moves for Samus can be such a headache.

Like how to freeze an enemy in a block of ice. Different characters have different heights, so obviously one generic block of ice will fail miserably in providing accurate graphical satisfaction for the freezing.

Couple of solutions:

1: Use head positioning constant
(Generic ice block height to be at 100 pixels, divide that by 100 times the height of the enemy) plus 8 pixels for allowance of hair, etc.

2: Land invisible helper on enemy spawned from sky. Spawned X pos to be set to target, drop down record the Y pos at contact. Discrepancy here will be movement per gametick due to velocity of the helper. Estimated 5-10 pixels error.

3: Spawn helper from bottom and record Y pos at loss of contact with target. Same error as solution 2.

Bloody headache. I was looking at how Warcraft 3 calculates the spawning of the electricity graphics between targets, and this is what I roughly got:

Basic lightning sprite base is 100 units. For every 100 units distance to target, spawn one sprite.

If distance is 830 units, divide by 100, use constant as number of spawned sprite, decimel to be last spawned sprite scaled according to /100*decimal value*100 = scaled to decimal value.


Actually, I think that if I don't do game programming, I wouldn't be able to do music very well, because both sides of the brain must have constant exercise function at peak. One thing our current education system is severely lacking. But it doesn't really matter when all you want is to train people who follow the paths given to them and feel lost if someone else doesn't give them direction. So in that aspect, it works!

And why the hell am I wandering off into that topic, no no none of my concern.


Game programming is fun especially for particles when you can use expressions comprising of sine cosine or pi, E, etc to make wave and curve velocities happen real time. Yes, I was one of those weird people who liked F maths and Physics.

Though I had to give them up to chase that grand dream... oh well, they live on in me!

No comments:

eXTReMe Tracker