Building a raised platform fort
grab a framing manual from your hardware supplier, it will tell you what size beams and posts are required to make a sturdy floor. 


  It is OK to attach the posts at the corners or will I need more in the middle?


4 posts sounds workable. but yo will probably need bracing to keep the posts straight.
or else use very deep holes for the posts.


  What do I attach the frame to the posts with?


Bolts of a weather resistant type eg: galvanized.


  How far apart should I place the floor joists?


See framing manual.


  What do I attach the floor joists with? 


Nails or joist hangers. Depending whether you want to pass the joist over the frame or butt them up-to it.


  With the floor boards do I need some space between them?


Does it rain where you live?  Basically you are building a deck. The gaps allow rain to drain through the deck.