Exactly!permitted one dimensional array for the sprite is taken up by the structure being 'equivalent' to the 1D array
Nope, Basic4ppc isn't that complicated! No entities, objects, variable references etc. - just untyped values as singletons or arrays of up to three dimensions.I had thought that each structure would actually be usable as an entity (item, variable) which could then be placed in a single element of a 1D array,
Yup!So I should perhaps use a 1D array that holds... x,y,z,x1,y1,z1,... and step in threes
No, you can treat a structure as an array to iterate it if you want. The structure definition still serves to document the items.More ineligant to step through a retrieved structure
Dim Type(x1, y1, z1, x2, y2, z2, x3, y3, z3, name)Data
...
Dim Data(10) ' new array
For i = 0 to 6 Step 3
Data(i) = something ' set Data.x1, Data.x2. Data.x3
Data(i+1) = something ' set Data.y1, Data.y2. Data.y3
Data(i+2) = something ' set Data.z1, Data.z2. Data.z3
Next
Data(9) = somename ' set Data.name
Sub Globals
cwTurn=0
Dim cwWaypoints(8)
Dim arr(0)
End Sub
Sub App_Start
cwWayPoints(0)= 49 'x1
cwWayPoints(1)=1 'y1
cwWayPoints(2)= 271 'x2
cwWayPoints(3)=1 'y2
cwWayPoints(4)=271 'x3
cwWayPoints(5)=319 'y3
cwWayPoints(6)=49 'x4
cwWayPoints(7)=319 'y4
'Save the data with the sprite
cw.DataArray=cwWayPoints()
...
End Sub
Sub gw_CollisionDestination
cw.direction = Int(cwTurn/2)*90 Mod 360
cwTurn =(cwTurn+2) Mod 8
arr()=cw.DataArray
cw.DestinationX=arr(cwTurn)
cw.DestinationY=arr(cwTurn+1)
End Sub
I'm sorry but I don't inderstand what this means.Setting gw.Tick anywhere where it could help, Resize, Paint, Focus events. Collision events and MouseDown,Up,Move on the GameWindow Form.
I don't understand the flicker/flash problem as in version 1.22, and ever since, the game window has been drawn like a proper Control in response to Windows Paint events. Is this on desktop or device? Before I post the next version can you either post some code that shows it or give me a more complete description of the effects you are seeing and an explanation of what is happening when you see them.The flicker is gone with 1.25 but the flash is worse
I haven't been able to observe any flashing, as reported by eww245, while hiding and showing a form on either the device or desktop - and in any case I don't think there is anything I could do to alter it as the repainting of the GameWindow is being done as it should be for a Control.
The operations done in Tick in this order are Erase all the Sprites from a bitmap buffer, Move all the Sprites, Draw all the Sprites on the buffer, Process collision events then Paint the buffer to the screen. This sequence leaves the Sprite positions on the screen corresponding to their reported X and Y coordinates so NoCollisionMouse events use the screen X and Y coordinates which was not the case with the old version of the library.Is there an explanation for this please?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?