Yeah your game looks great. Very nice work for sure. Seems like basically you are or have been for many months doing the same kind of thing as I just started on in a more formal way (as in actually focusing on this specifically) only very recently... that is building all of the fundamental stuff systems and so forth. Basically building the engine. And that is exactly all I am doing here except it is not a game specific engine but rather taking the approach of building behavioral code components that are common across many different game projects.
The higher level behaviors would become more genre specific. For now just focusing on all of the fundamentals which even in themselves will make development more efficient. Basically I am just building code components. Conceptually very similar to using some GUI-based development tool dragging & dropping behaviors onto an object to assign behaviors to that object. Since I have always preferred programming the normal way via writing code in text here the behaviors are code components that are assigned to sprites via function calls.
I added two new Move Behaviors... OrbitPosition and OrbitSprite... basically is only one programmatically the only difference is the OrbitSprite dynamically pulls the center position from the sprite that is being orbited.
SetSpriteBehaveMoveOrbitPosition(spriteID as integer, xp as float, yp as float, startAngle as float, radius as float, rotateSpeed as float,
rotatePingPong as integer, rotateSpriteToMatchAngle as integer, radiusGrowShrinkDir as float,
radiusMin as float, radiusMax as float, radiusPingPong as integer, life as float, alphaByLife as integer)
SetSpriteBehaveMoveOrbitSprite(spriteID as integer, spriteLinkedTo as integer, startAngle as float, radius as float, rotateSpeed as float,
rotatePingPong as integer, rotateSpriteToMatchAngle as integer, radiusGrowShrinkDir as float,
radiusMin as float, radiusMax as float, radiusPingPong as integer, life as float, alphaByLife as integer)
As you can see that is a huge signature so I at some point I will make some alternative functions with various combinations of the signatures for the most common use cases in the interest of saving on typing.
The red square in the middle is being orbited by two sprites using a multiplex and the sprite being rotated to match the angle of the orbit and their orbit radius grows and shrinks and produces a decent little FX.
SetSpriteBehaveMoveOrbitPosition(sprite5, GetSpriteXByOffset(sprite3), GetSpriteYByOffset(sprite3), 0, 52, 30.0, FALSE, TRUE, 1, 52.0, 104.0, TRUE, -1, FALSE)
SetSpriteBehaveMoveOrbitPosition(sprite6, GetSpriteXByOffset(sprite3), GetSpriteYByOffset(sprite3), 0, 52, -30.0, FALSE, TRUE, 1, 52.0, 104.0, TRUE, -1, FALSE)
The vertically moving yellow square representing an enemy has one sprite with a MoveOrbitSprite behavior assigned to it... this time the radius stays constant and the rotation has the PingPong flag set on it and this orbit sprite also rotates to match the angle of its orbit.
SetSpriteBehaveMoveOrbitSprite(sprite9, sprite4, 270, 52, -15.0, TRUE, TRUE, 0, 80.0, 160.0, TRUE, -1, FALSE)
The turrets each have a single sprite with orbit behavior attached to their positions and these rotate with their radius growing and shrinking and the orbit sprites have rotateSpriteToMatchOrbit set to FALSE.
SetSpriteBehaveMoveOrbitPosition(sprite7, GetSpriteXByOffset(sprite1), GetSpriteYByOffset(sprite1), 270, 52, 5.0, FALSE, FALSE, 0.2, 80.0, 160.0, TRUE, -1, FALSE)
SetSpriteBehaveMoveOrbitPosition(sprite8, GetSpriteXByOffset(sprite2), GetSpriteYByOffset(sprite2), 270, 52, -5.0, FALSE, FALSE, 0.2, 80.0, 160.0, TRUE, -1, FALSE)
Overall it is coming along nicely and is now at the point where it is usable for some basic stuff. Of course, there are other movement behaviors that games need. One that immediately comes to mind is a FollowLeader movement which programmatically I think I might implement with a SpriteBehaveSetFollowLeader to set the sprite that is the leader and then SetSpriteBehaveFollow on the tail sprites. This would be useful for snakey things as well as ghost trails and so forth.
For now I think I will take a break.