IGNORED

COMBAT XB COMPETITION

• Yes
9
• No
6

Recommended Posts

1 hour ago, Asmusr said:

Maybe 8 would be more reasonable?

Will this be calculated as SQR((X1-X)^2+(Y1-Y)^2) ?

Yes

Share on other sites

1 hour ago, SteveB said:

I also wonder if this is too much of a gamble. As soon as you see him, you calculate the distance and shoot ... not much of a strategy. If you need to align yourself without gettig shot, this becomes tricky and more challenging?

1 hour ago, Asmusr said:

Maybe 8 would be more reasonable?

Will this be calculated as SQR((X1-X)^2+(Y1-Y)^2) ?

How about this: range of 8, keep the LOS 45 degree cone but the cannon can only fire straight ahead? That should make things substantially more challenging.

Share on other sites

11 minutes ago, Vorticon said:

How about this: range of 8, keep the LOS 45 degree cone but the cannon can only fire straight ahead? That should make things substantially more challenging.

Sounds good to me ...

Share on other sites

Sorry I´m not a good programmer at all, cannot await to see what happens, so I voted "Yes!"

where´s my popcorn? 😍

xXx

😀

• 1
• 2
Share on other sites

3 hours ago, Schmitzi said:

Sorry I´m not a good programmer at all, cannot await to see what happens, so I voted "Yes!"

where´s my popcorn? 😍

xXx

😀

I will try to post videos of each battle for your enjoyment 😁

Share on other sites

I have updated the first post with some clarifications.

Share on other sites

When is a game declared a tie? It seems quite possible that both tanks would find a place to wait for the other to appear.

Share on other sites

3 minutes ago, Asmusr said:

When is a game declared a tie? It seems quite possible that both tanks would find a place to wait for the other to appear.

Share on other sites

17 minutes ago, Asmusr said:

When is a game declared a tie? It seems quite possible that both tanks would find a place to wait for the other to appear.

Good point. Since there is no wait code, the only way to "camp" is to keep rotating in place or fire.

So here's what I propose: there is a limit to the number of actions per round, and whoever reaches that limit first is eliminated. Since initiative is randomized, at some point one of the tanks will die even if they both stay in place for the duration of the round. Any suggestions as to what that limit should be?

Share on other sites

The one with the most forward-steps wins in a time-out situation? At least he tried ...

Share on other sites

6 hours ago, Vorticon said:

I have updated the first post with some clarifications.

Will you participate yourself or would it be too difficult to stay neutral?

Share on other sites

1. Where do the tanks originate on the screen, on the opposing left/right sides behind the U shaped blocks?

2. Can we submit multiple entries, to try different strategies?

Share on other sites

3 hours ago, SteveB said:

The one with the most forward-steps wins in a time-out situation? At least he tried ...

We could add a counter which adds an additional increment to a tank's total action count for each 3 consecutive times that tank remains stationary. That way the stationary tank will likely hit the action limit sooner than the opposing moving tank and will have a greater chance of being destroyed.

I'm thinking an action count limit of 40 with a 5 point penalty for each 3 consecutive stationary turns. That should provide excellent motivation against camping 😄

Share on other sites

3 hours ago, SteveB said:

Will you participate yourself or would it be too difficult to stay neutral?

Since I will have access to the participants' code, this will unfortunately preclude me from participating.

Share on other sites

52 minutes ago, retrodroid said:

1. Where do the tanks originate on the screen, on the opposing left/right sides behind the U shaped blocks?

2. Can we submit multiple entries, to try different strategies?

The tanks will originate on the either column 2 or column 31, with the Y position randomly selected. The coordinates will be passed to the tank's subroutine with each turn.

Only one submission allowed, but you will be provided with the host program (almost finished) which will allow you to experiment with different strategies.

Share on other sites

1 minute ago, Vorticon said:

The tanks will originate on the either column 2 or column 31, with the Y position randomly selected. The coordinates will be passed to the tank's subroutine with each turn.

Only one submission allowed, but you will be provided with the host program (almost finished) which will allow you to experiment with different strategies.

If we have to few participants we might do it like in the Formular 1 ... two cars per "team" ... ?

we should also impose a code limit to make sure we fit host and two contestants into the memory ... 6kb tokenized code?

Could we use RXB CALL MOVES to copy the screen into lower memory to have map we can actually write to? Each contestant could get 4kB low memory with a variable base of >2000 or >3000 (or whatever under RXB is free to use). I'm not sure yet if I really need this ...

Share on other sites

There should be enough space for 2 tank subroutines. The map cannot be altered.

I really don't want to complicate things as I would like to keep the door open for all levels of programming expertise.

The challenge here is to work within the imposed limitations 🙂

Share on other sites

2 hours ago, SteveB said:

If we have to few participants we might do it like in the Formular 1 ... two cars per "team" ... ?

we should also impose a code limit to make sure we fit host and two contestants into the memory ... 6kb tokenized code?

Could we use RXB CALL MOVES to copy the screen into lower memory to have map we can actually write to? Each contestant could get 4kB low memory with a variable base of >2000 or >3000 (or whatever under RXB is free to use). I'm not sure yet if I really need this ...

NOTE:  You could also use the unused memory in upper 24K to as unlikely the XB program will be that large.

Share on other sites

On 2/12/2023 at 7:54 AM, Vorticon said:

In order to mitigate "campers", i.e. tanks that just lie in wait and don't move, there will be a limit of 40 actions per round for each tank. If a tank exceeds that limit then it will be destroyed. Any tank that remains stationary for 3 consecutive turns will incur a 5-point hit to its action count. Remember that an action constitutes of either turning, moving forward or firing.

That seems like too small a number. If you are in the lower right corner, it would take 30 moves to move from one side of the screen to the other, and you'd want to look up a number of times to look for the enemy tank. Rotate right, rotate left  5 times and you'd be at 40.

Share on other sites

Hmm.  Not afraid to post  ideas but I'm keeping the best ones to myself.

* Begin fixed search pattern.

* If tank in sight, find closest vertical or horizontal firing vector and move toward that.

* If target sight is lost, continue anyway.

Option: halfway there, stop, look left, then right.

* Sneaky Smarts: if target is lost, predict its location,  scan for obstacles. plot a box around the obstacle, follow box perimeter the  opposite way round, intercept.

If no recent information, resume search pattern.

Share on other sites

1 hour ago, senior_falcon said:

That seems like too small a number. If you are in the lower right corner, it would take 30 moves to move from one side of the screen to the other, and you'd want to look up a number of times to look for the enemy tank. Rotate right, rotate left  5 times and you'd be at 40.

Good point. Let's make it 100.

Share on other sites

Almost done with the host program. A few more bugs to root out.

I am thinking we should allow the subroutines to poke and peek into and from low memory (NOT VDP)  for the purpose of data storage since all variables in the SUBs are local and do not survive the sub exit.

The player's subroutine call will also pass the address of the low memory block assigned to it not to exceed 3K and that block can be used as needed. No sabotaging of the opponent's memory block allowed! 😁

I'll update the first post accordingly.

Share on other sites

Idea for the benefit of the viewing public - how about an onscreen 'lock' indicator for when a tank has the other in its sights, so the viewer can tell when one tank SHOULD see the other?

Share on other sites

1 hour ago, Vorticon said:

Almost done with the host program. A few more bugs to root out.

I am thinking we should allow the subroutines to poke and peek into and from low memory (NOT VDP)  for the purpose of data storage since all variables in the SUBs are local and do not survive the sub exit.

The player's subroutine call will also pass the address of the low memory block assigned to it not to exceed 3K and that block can be used as needed. No sabotaging of the opponent's memory block allowed! 😁

I'll update the first post accordingly.

So specifically designed program to eliminate many subroutines like CALL MOVES VDP to RAM or RAM to VDP or CALL PEEKV or CALL POKEV.

I guess if you kill off enough RXB routines to be used it should just be down to a few commands in most XB variants.

What about CALL EXE(address) that uses XB ROM routines to execute using only GPL registers, so you can use some assembly routines in ROM?

Example: POKE some values into Scratch pad and do a CALL EXE(address) in ROM for as RXB EXE is just a BL @address routine it uses GPL registers.

Spoiler

3449            ************************************************************
3452
3453      0005  FLG    EQU  5
3454
3455            * R12  total number of bytes to move
3456            * R10  move from
3457            * R9   move to
3458            * R8   minor counter (buffer counter)
3459            * R7   buffer pointer
3460
3461 7ADA 020C  SCROLL LI   R12,736           Going to move 736 bytes
7AE0 0020
3463 7AE2 04C9         CLR  R9                Address to move to
3464 7AE4 C18B         MOV  R11,R6            Save return address
3465 7AE6 06A0         BL   @SCRO1            Scroll the screen
7AE8 7B10
3466 7AEA 0205         LI   R5,XVDPWD         Optimize for speed later
7AEC 8C00
3467 7AEE 0204         LI   R4,>02E0          Addr of bottom line on screen
7AF0 02E0

99/4 ASSEMBLER
SCROLLS                                                      PAGE 0080
3468 7AF2 0201         LI   R1,>7F80          Edge character and space char
7AF4 7F80
3469 7AF6 0202         LI   R2,28             28 characters on bottom line
7AF8 001C
3470 7AFA 06A0         BL   @PUTV1            Init VDP & put out 1st edge ch
7AFC 6422
3471 7AFE D541         MOVB R1,*R5            Put out 2nd edge character
3472 7B00 06C1         SWPB R1                Bare the space character
3473 7B02 D541  SCRBOT MOVB R1,*R5            Write out space character
3474 7B04 0602         DEC  R2                One less to move
3475 7B06 16FD         JNE  SCRBOT            Loop if more
3476 7B08 06C1         SWPB R1                Bare the edge character again
3477 7B0A D541         MOVB R1,*R5            Output edge character
3478 7B0C D541         MOVB R1,*R5            Output edge character
3479 7B0E 0456         B    *R6               And return go GPL
3480            * Generalized move routine
3481 7B10 04C8  SCRO1  CLR  R8                Clear minor counter
7B14 83F5
3483 7B16 02A7         STWP R7                Get the WorkSpace pointer
3485 7B1A DDE0  SCRO2  MOVB @XVDPRD,*R7+      Read a byte
7B1C 8800
3487 7B20 0588         INC  R8                Inc minor counter
3488 7B22 060C         DEC  R12               Dec total counter
3489 7B24 1303         JEQ  SCRO4             If all bytes read-write them
3490 7B26 0288         CI   R8,12             Filled WorkSpace buffer area?
7B28 000C
3491 7B2A 11F7         JLT  SCRO2             No, read more
3492 7B2C D7E0  SCRO4  MOVB @R9LB,*R15        Write LSB of write-address
7B2E 83F3
3493 7B30 0269         ORI  R9,WRVDP          Enable the VDP write
7B32 4000
3494 7B34 D7C9         MOVB R9,*R15           Write MSB of write-address
3495 7B36 02A7         STWP R7                Get WorkSpace buffer pointer
3496 7B38 D837  SCRO6  MOVB *R7+,@XVDPWD      Write a byte
7B3A 8C00
3497 7B3C 0589         INC  R9                Increment write-address
3498 7B3E 0608         DEC  R8                Decrement counter
3499 7B40 16FB         JNE  SCRO6             Move more if not done
3500 7B42 C30C         MOV  R12,R12           More on major counter?
3501 7B44 16E5         JNE  SCRO1             No, go do another read
3502 7B46 045B         RT                     Yes, done
3503            ************************************************************
3504            * Decode which I/O utility is being called
3505            * Tag field following the XML IO has the following
3506            * meaning:
3507            *     0 - Line list - utility to search keyword table to
3508            *         restore keyword from token
3509            *     1 - Fill space - utility to fill record with space
3510            *         when outputting imcomplete records
3511            *     2 - Copy string - utility to copy a string, adding
3512            *         the screen offset to each character for display
3513            *         purposes
3514            *     3 - Clear ERAM - utility to clear ERAM at the address
3515            *         specified by the data word following the IO tag
3516            *         and the # of bytes specified by the length
3517            *         following the address word. Note that each data

99/4 ASSEMBLER
SCROLLS                                                      PAGE 0081
3518            *         word is the address of a CPU memory location.
3519            ************************************************************
3520 7B48 D01D  IO     MOVB *R13,R0           Read selector from GROM
3521 7B4A 0980         SRL  R0,8              Shift for decoding
3522 7B4C 1358         JEQ  LLIST             0 is tag for Line list
3523 7B4E 0600         DEC  R0
3524 7B50 132C         JEQ  FILSPC            1 is tag for Fill space
3525 7B52 0600         DEC  R0
3526 7B54 130E         JEQ  CSTRIN            2 is tag for Copy string
3527            *                             3 is tag for CLRGRM string
3528            *                                fall into it
3529            * CALGRM
3530            * R1 - address of clearing start
3531            * R2 - number of bytes to clear
3532 7B56 0201  CLRGRM LI   R1,PAD0           Get CPU RAM offset
7B58 8300
3533 7B5A C081         MOV  R1,R2             Need for next read too
7B5E 83E3
7B64 83E5
3537 7B66 C092         MOV  *R2,R2            Read the byte count
3538 7B68 04C0         CLR  R0                Clear of clearing ERAM
3539 7B6A DC40  CLRGR1 MOVB R0,*R1+           Clear a byte
3540 7B6C 0602         DEC  R2                One less to clear, done?
3541 7B6E 16FD         JNE  CLRGR1            No, loop for rest
3542 7B70 045B         RT                     Yes, return

So this approach would also be unable to be used as it uses assembly and GPL to move or copy or search for a value?

NOTE: this does not even touch XB ROM 3 in RXB yet, the above is only ROM 1 and 2 in XB ROMs the same ones in normal XB.

Share on other sites

So is it 3 stationary turns kills you, or more than 3? Seems like a u-turn is already two turns, if you u-turn then fire that's 3. So that's important to know

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.