Skip to main content
GameDev.net gamedev.net
🔒 Locked

Writing bits in an array

Started by TechnoCore Jan 21, 2004 at 3:52 PM 0 replies 300+ views
Original Post
TechnoCore
TechnoCore
Hi in my game i have a large array of structs containing landscape-tile and passabillity info. Now I have a lots of buildings, which can be rotated and placed on the map. A typical building migh be 6*10 tiles large. Now, when i place a building on the map in my game, i want to set the passabillity-bits to 1, even though the building might be rotated. Any1 got a clue how to do this fast ? I know i could go through each "tile" the building occupies and rotate it individually with sin-cos, but thats to slow for me. Anyone have another idea?
//TechnoCore
invective
invective
Maintain 2 passability sets and tests. The first is tile based the second is a linked list (or more sophisticated struct like a quadtree) of objects.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.