UDP working

Posted by s on Feb. 10, 2008, 8:06 p.m.

This is a long? blog about how I'm engineering DoubleFire. So if you don't care(Don't lie to yourself, you'll make Jesus cry), go read the random ending

So after taking a nap I was able to get UDP working after deciding to rewrite DoubleFire

Coordinates, the main thing I need to be streamed, are sent with this framework. If you have any suggestions, do tell

No TCP

Every frame, a byte is sent with keyboard inputs. Right now I have 3 free bools

Every eight frames, or when a keyboard arrow is pressed, XY is sent. Right now the XY messages take 3 IDs and made me finally find a method on where to use ^^. Basically(well, actually, entirely), I have Xchange, Ychange and XYchange messages

I'm actually using sprites this time around. I like the sprited look. I'm using about 12x12 sprites for the 3ships, which are:

Shell=Can absorb bullets. Dies when hit by 2 at the same time. Fires when absorbing

Null=No shield, but always fires

Option=Player has options trailing, and they can use them to absorb shots

Anyways, off to make the playscreen shake

(And just for those interested, I have a hate for random() and thus the shaking effect is actually done with modulos instead. And just to get the computations down even more, I use & to optimize)

Oh, and also, this duck came up to me today in this duck suit and said"I'm a duck!!"

Comments

thepharaoh 16 years, 10 months ago

I didn't know ducks could talk. O_o

PY 16 years, 10 months ago

ooh, df is online?

Remind me, what is DF again?

s 16 years, 10 months ago

A game where the concept that sparked it is the idea of a danmaku where you have to get struck by two bullets at the same time to die

PY 16 years, 10 months ago

Oh, I see. Woo, I might not die!

thepharaoh 16 years, 10 months ago

So to kill an enemy you have to have two bullets hit them at the same time?

s 16 years, 10 months ago

No