Welcome, Guest. Please login or register.


Author Topic: Enterprise program: Bricky Prise (Read 24935 times)

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7232
  • Country: hu
    • Támogató Támogató
Enterprise program: Bricky Prise
« on: 2016.April.01. 11:41:17 »
Bricky Prise , the idea and name of the game comes from Endi, He created 1st map, and character set of 1st 8 maps , and bat also. Entering HiScore music is created by Szipucsu.
The game is EXOS compatible, and needs at least 128Kb RAM, HiScore is saved at reset (only if you have EXDOS), Mouse support is not implemented, only if you switch it to joystick mode.
This is a simple breakout clone with 44 levels, and it's target will not cause any surprise :D , if you catch ? sign then you will get extra, which can have positive or negative effect also. You can select difficulty level in main menu by using F1-F3 keys, the difference between difficulty levels are ball speed, and rate of positive and negative extra's.
Controls:
- I, O, Space
- int/ext joystick
- F8 clear background
- keys G & A pressed in the same time gives 2 to high value of lives.
- Left Shift: changes the ball's direction a bit

Random level generation between level 2-39.

Loading Screen
[ Guests cannot view attachments ]
Menu Screen
[ Guests cannot view attachments ]
Ingame Screen
[ Guests cannot view attachments ]
« Last Edit: 2016.November.10. 19:46:55 by geco »

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #1 on: 2016.April.01. 13:18:53 »
You can easily implement EnterMice compatibility with this simple Boxsoft routine arranged by Bruce Tanner. It must be called every frame, 1/50 seg. X_REL and Y_REL must be consecutive on memory.

Code: [Select]
       ld hl, X_REL           ;first byte, X displacement since last lecture
ld b,3 ;long delay
call READ_8BIT
inc hl ;Y_REL
ld b,2 ;short delay
call READ_8BIT ;leaves B=0
xor a
out (0B5h), a
in a, (0B6h)
and 6                            
xor 6
srl a ; here the status of J column is on carry, but is discarded
srl a
rl b ; K column is saved in b
ld (SECBUTT_STATUS), a ; L column is the Right Mouse Button
ld a,b
ld (MAINBUTT_STATUS), a ; K column is the Left Mouse Button
ld a, (HL) ;Y-rel
dec hl ;X-REL
or (hl) ;If a=0, no movement
ret

WAIT:
nop
nop
nop
dec b
jr nz, WAIT
ret
;
READ_8BIT:        ld a,2                   ;RTS low
out (0B7h), a
call WAIT_READ_4BIT     ; read four higher bits
xor a                           ;RTS high
out (0B7h), a
ld b, 2                         ;short delay
WAIT_READ_4BIT:         call WAIT ;leaves B=0
READ_4BIT:
ld d, b ;d=0
ld b, 4

READ_LOOP:
ld a, b
out (0B5h), a
in a, (0B6h)
rra ;data is read from K column if EnterMice, J if Boxsoft
rra
rl d
djnz READ_LOOP

ld a, d
rld
ret

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7232
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #2 on: 2016.April.01. 13:27:38 »
Thx Gflorez, i decided to not implement it, because the bat movement has 2 speed only and it is good for joystick, and makes no sense to make mouse control for this bat moving solution, and other, reading the mouse is quite CPU consuming task even with this fast code.
« Last Edit: 2016.April.01. 13:31:00 by geco »

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #3 on: 2016.April.01. 14:02:25 »
Ok, it was only an hint....

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7232
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #4 on: 2016.April.01. 14:30:48 »
Ok, it was only an hint....
Thx :-) I will use it in the future :-)

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #5 on: 2016.April.01. 14:34:14 »
Another free hint:

For an horizontal movement like of this bat, you only need the X movement, the first two nibbles that are read. Nothing happens if the third and fourth nibbles are not read, at the following cycle at the next frame the first and second nibbles will be X again. The Mouse or the EnterMice interface restarts every cycle. You only have to ensure that you leave the RTS signal high.

This way the routine last only a little more than half the total time, as you still have to read the button. Also you can process 1, 2 or none buttons if necessary.

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #6 on: 2016.April.01. 15:03:26 »
By the way..... Your game is wonderful...

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14779
  • Country: hu
    • http://enterprise.iko.hu/
Re: Enterprise program: Bricky Prise
« Reply #7 on: 2016.April.01. 15:23:58 »
Your game is wonderful...
And it is have a stereo sound effects! I think this is the first real stereo game on Enterprise! The left/right volume are depending from the screen position where the event occurred.

Offline CiH

  • Beginner
  • *
  • Posts: 25
Re: Enterprise program: Bricky Prise
« Reply #8 on: 2016.April.01. 20:39:03 »
Wow, nice work! Looks like a proper Enterprise game

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: Enterprise program: Bricky Prise
« Reply #9 on: 2016.April.01. 22:27:40 »
Nice:D

However I don't like the natural bounce mechanism of the ball when it hits the paddle. The creators of the original Pong also didn't go with that. They didn't go with the basic principle that the angle at which you hit the wall should be mirrored when you bounce off. They used an algorithm that worked as if the paddle had an elliptic surface... I think that you should also change the algorithm used as the game can get "boring" when you are left with one brick to clear the level. Also it's somewhat unintuitive for me that when you catch the ball on the right side and you release it it will bounce to the left because last it went from the right side... I don't know if anyone knows what I mean...maybe it's just my problem...

The change in the algorithm should make the ball more unpredictable (you don't know the exact angle) but at the same time also in some way more controllable (you will be able to control the direction of the ball)

In the appendix of the article below there should be some description of the algorithm...:
http://www.jgorasia.com/Files/Spring08/ICB/Gorasia_Harris.pdf

Basically the algorithm takes into account the distance of the ball from the center of the paddle when calculating the angle.
« Last Edit: 2016.April.01. 22:31:55 by ssr86 »

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #10 on: 2016.April.01. 22:37:22 »
I continue with my "totally free" hints....

To save some time, the external joystick 1 can be read at the same time, it is at bit 0(J column) of port B6, and EnterMice is read at  bit 1(K column) of the same port, rows(B5) 1 to 4.

Only that Entermice needs to be accessed two times(nibbles) between a short pause to compose the full X byte, and the external joystick only one.

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7232
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #11 on: 2016.April.01. 22:59:29 »
Bricky Prise has been changed, one problem was corrected : or 30h was used after in a,(0b6h), now it is or 0feh
and Pause for ESC key has been added, the original link has been updated also.
« Last Edit: 2016.November.10. 19:47:27 by geco »

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7232
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #12 on: 2016.April.01. 23:03:15 »
Nice:D

However I don't like the natural bounce mechanism of the ball when it hits the paddle. The creators of the original Pong also didn't go with that. They didn't go with the basic principle that the angle at which you hit the wall should be mirrored when you bounce off. They used an algorithm that worked as if the paddle had an elliptic surface... I think that you should also change the algorithm used as the game can get "boring" when you are left with one brick to clear the level. Also it's somewhat unintuitive for me that when you catch the ball on the right side and you release it it will bounce to the left because last it went from the right side... I don't know if anyone knows what I mean...maybe it's just my problem...

The change in the algorithm should make the ball more unpredictable (you don't know the exact angle) but at the same time also in some way more controllable (you will be able to control the direction of the ball)

In the appendix of the article below there should be some description of the algorithm...:
http://www.jgorasia.com/Files/Spring08/ICB/Gorasia_Harris.pdf

Basically the algorithm takes into account the distance of the ball from the center of the paddle when calculating the angle.

I chosed other solution, you can control the direction of the ball by moving the bat when the ball reach it (increase/decrease the angle)

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7232
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #13 on: 2016.April.02. 10:54:27 »
Small update happened:
Cheat: press G & A key simultaneously high value of lives will change to 2, if you used cheat then hiscore save is disabled.
F8: delete background palette of the game, if you did it once, the palette can not be restored, it will be restored at next level, or if a new game started.
The links has been updated.

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: Enterprise program: Bricky Prise
« Reply #14 on: 2016.April.02. 18:32:15 »
I chosed other solution, you can control the direction of the ball by moving the bat when the ball reach it (increase/decrease the angle)
Oh, now I see. Haven't noticed that yesterday :oops:
Looks better without the "gradient" background IMO :P
Fun.
The sampled sfx give it a 16-bit feel...
« Last Edit: 2016.April.02. 18:44:04 by ssr86 »