Hi,
I am planning a hud for my rts project and I have a few questions regarding the unreal- and actionscript interfaces.
The first problem regards player input. For example:
Should I leave rectangle selection to unrealscript and make flash display it? (No direct input for flash)
Or should I let actionscript notify the udk once a selection was made in flash? (Flash handles mouse input)
Same goes for things like setting targets, scrolling the map, etc.. On the one hand I think unrealscript's PlayerInput should handle the input, but not using flash on the other hand leaves me with a feeling of wasted potential/processing time.
The second question concerns unit icons: Depending on the selection of units I want to display certain icons and stats (Life, Energy) above a unit. For every selected and displayed unit, I need to add a movie clip to the stage and update its position everytime the units' screen position changes. The resource friendliest way (I think) is keeping an unrealscirpt array of on-screen units and only adding or deleting movie clips from flash when the contents of the array changes. I only call actionscript to update the screenposition of existing movieclips every tick or so. Does this make sense?
Or can I just delete all and create new movieclips every tick? How much impact on performance would that have (I am thinking about a couple hundrets of units)? The RTS Starterkit uses the canvas and simply redraws unit markers every frame, but obviously flash handles things differently.
Is there maybe a third option I don't know about?
greetings
FTC



Reply With Quote

Bookmarks