Screen shot of game and about scope


4 or 5 days flied since last dev log. During this time, I implemented some structures like Player state, Game state, Enemy state. Also, modified character bitmaps for enemies and numbers. Then tried to deploy enemies to the display depending on time tables.

The first picture is that. You can see seconds on left top of screen which is seconds from stage start for debugging purpose. You can see heart icon and 5 which means how many Player characters left. Then high score and current score. They are drawn foreground of dualplayfield with Blit command. the gray ghost on the screen is moving from right side to left side. They are deployed 3 secs from stage start and 3.5 sec and ... The left bottom side of numbers and characters are debugging purpose.

During those implementations, I learned some more thing about Blitz BASIC. 

-A shape cannot put to outside of screen area.
  For example, the bitmap for the display is 320x200. When I tried to put 16x16 shape to 330, 100, I got error. I expected that shape goes outside of screen though. 

-I can use global variable of my newtype (structure) with Shared command in side of Statement/Function. But could not use array or array of newtype. I could not find how to do that in the manual. 

[This doesn't work. But explain what I want to do]

Dim g_Enemy.TEnemy(10)

Statement test{}
   SHARED Dim g_Enemy.TEnemy(10)
  ...
End Statement

So, I copied some params to separate variables and shared with Statement/Function for now. I have a bad feeling about this. Then I tried to use a pointer to resolve this problem. I'm not sure this is best solution or not. Because it erquires copy of a pointer. But it is better than copy params to separate variable or copy params to non array/list of newtype. That is I create pointer for newtype (structure) and put specific index of the array of that type.

Dim g_Enemy.TEnemy(10)
*ptrG_Enemy.TEnemy = g_Enemy(2)

Statement test{}
  SHARED *ptrG_Enemy.TEnemy
  NPrint "x=", *ptrG_Enemy\x
End Statement

Also, I can use an item of a list same way inside of Statement/Function. See picture 2 and 3 that I tested.

Note for myself: In the manual, the definition of pointer explained,

DefType *biggest.Customer

But, "DefType" I learned before is definition of default type. I could not find any other command for definition of pointer. But I just put * before pointer variable name, it looks work well.

*biggest.Customer      ;<---Customer is defined as NEWTYPE.

Todo:

-I'm going to implement the pointer for the purpose of sharing global value with inside of function/statement.

-Implement more enemy movement(behavior) functions and test it.

-Prepare more bitmap of characters.

-Implement Displaying player character

etc..

Get My First Shooting Game For Amiga

Leave a comment

Log in with itch.io to leave a comment.