News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_PuzCPC

Scramble - New game for Amstrad CPC

Started by PuzCPC, 01:37, 06 March 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ast

What a good game... i really enjoy it !
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

XeNoMoRPH

your amstrad news source in spanish language : https://auamstrad.es

shaymanjohn

Well done PuzCPC - this is fantastic! My favourite arcade game ever, and this version is beautiful!

TotO

What I love on the Vectrex version, is the ambiant background sound... Not in arcade.


https://www.youtube.com/watch?v=JA5O18j0YlQ
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

JayBlood

You just learn ASM? :o :o ;D Congratulation for this awesome port of that game! Well done!
Jay

mr_lou

This look awesome! I wanted a Scramble game for the CPC ever since I was a kid. Looking forward to try this... when I can find some time.

PuzCPC

Quote from: TotO on 11:57, 07 March 19
What I love on the Vectrex version, is the ambiant background sound... Not in arcade.




I prefer CPC music from Targhan! :D
How much headache I suffered, that I could keep it as it is.
Namely, with sound I had problems with a slowdowns. >:(

PuzCPC

Ygdrazil

Hi PuzCPC
Congratulations on an extremely well done conversion of an all time retro classic!
I am really impressed how well you captured the essence  of the original scramble

You have shown true love to both Scramble and the CPC!

This was one of the first games I played in the arcades, and I always wanted a conversion for the CPC!
I like your "fake" scrolling... This way it should be quite easy to convert the game to both the Enterprise and the ZX spectrum.. so they to can experience your magic coding....
Thanks a lot!
/Ygdrazil

PS. Your first Z80 coding project... Impressive!

Novabug

Quote from: PuzCPC on 01:37, 06 March 19
Hi,
After about ten months of learning and coding it's finally here, my first game in ASM.

I would like to thank everyone who contributed here to CPCwiki source codes and tutorials.
Most of all, Thargan for his sfx, music and all the help that makes the game better than it would be otherwise!

Here are some instructions for Scramble on AMSTRAD CPC 64kb:

Menu                - ESC
Start the game  - FIRE1 for Joystick, A for Keyboard
Credits              - FIRE2 or S (They do not have any meaning except that you start a new game with one click.)

Joystick controls:

Move  - Joystick
Shoot - Joystick FIRE1
Bomb  - Joystick FIRE2 or SPACE

Keyboard controls:

Move   - Cursors keys
Shoot  - A
Bomb  - S
For redefine keys go to the Menu and also more lives can be found there.


And do not forget to show your best score to see who is the best Scramble player here. 8) 


Added CPR for GX4000!

PuzCPC


Great stuff. Will cover this in a future video. Brill.




jjaranda13

hi PuzCPC


Congratulations! it is really good game. I love it


Thanks a lot for this game. Good programming technic, good sound, good everything






Scarlettkitten

This is fantastic, well done  8)
Sophie Rose:- My musical works https://soundcloud.com/sophierosemusics

jjaranda13

hi PuzCPC


could you explain in detail your scroll mechanism? it is really good




Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Arnaud

Quote from: jjaranda13 on 20:55, 09 March 19
hi PuzCPC


could you explain in detail your scroll mechanism? it is really good

Yes i think so, i haven't understand how it works and i am really interested.

pelrun

#39
They're overdrawing the terrain and enemy sprites every frame, right to left left to right. Each sprite has black pixels on the left right side to erase any artifacts from the previous frame, and the ground fill is just old pixels from previous frames.

PuzCPC

Quote from: pelrun on 03:42, 10 March 19
They're overdrawing the terrain and enemy sprites every frame, right to left. Each sprite has black pixels on the left side to erase any artifacts from the previous frame, and the ground fill is just old pixels from previous frames.



Hi,

Yes, something like that.
They're overdrawing the terrain and enemy sprites every second frame, left to right.


I think the picture tells more than a thousand words. :)


PuzCPC

Arnaud

Thanks for explanations,
OK in this way you don't have to clear the trail of the scrolling sprites.

The drawback is that the scrolling sprites have to be duplicated, with and whithout offset.

Is the original game works like that ?

Kris

Very nice port and addictive game: congrats !!

TomEtJerry

Really nice game, it looks like a perfect port of the game (coded from scratch or did you had looked at the arcade code ?); For a Z80 "beginner", that's impressive !

I have just one (little) complain, intro screen would need some polish from a pixel graphist. I think CPC can be better :-).

PuzCPC

Quote from: Arnaud on 07:58, 10 March 19
Thanks for explanations,
OK in this way you don't have to clear the trail of the scrolling sprites.

The drawback is that the scrolling sprites have to be duplicated, with and whithout offset.

Is the original game works like that ?


Exactly! And at the same time it draws the ground inside.
Yes, sprites take a lot of space. And must be a compiled sprites.
Otherwise, it's not fast enough. :)
I do not know how the original works, I did not have the original source code.


Quote from: TomEtJerry on 09:41, 10 March 19
Really nice game, it looks like a perfect port of the game (coded from scratch or did you had looked at the arcade code ?); For a Z80 "beginner", that's impressive !

I have just one (little) complain, intro screen would need some polish from a pixel graphist. I think CPC can be better :-).
I coded from scratch.
Intro screen is not my work. I made it even worse. :D


PuzCPC

ervin

Quote from: PuzCPC on 12:13, 10 March 19
Exactly! And at the same time it draws the ground inside.
Yes, sprites take a lot of space. And must be a compiled sprites.
Otherwise, it's not fast enough. :)
I do not know how the original works, I did not have the original source code.

I coded from scratch.
Intro screen is not my work. I made it even worse. :D

PuzCPC

Hmmm, interesting.
I'd love to have a look at your compiled sprite code.
I'm doing some work with compiled sprites at the moment, and I'd like to see some other examples.

Would it be ok to have a look at your sprite code?



TotO

Quote from: PuzCPC on 04:30, 10 March 19
I think the picture tells more than a thousand words. :)
It looks a bit like Pac-Man emulator sprites and R-Type scrolling. ;)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

VincentGR

Quote from: TotO on 13:42, 10 March 19
It looks a bit like Pac-Man emulator sprites and R-Type scrolling. ;)


and jetpac 😀

PuzCPC


Quote from: ervin on 13:12, 10 March 19
Hmmm, interesting.
I'd love to have a look at your compiled sprite code.
I'm doing some work with compiled sprites at the moment, and I'd like to see some other examples.

Would it be ok to have a look at your sprite code?





Of course! :)



.SPRITE
LD A,17
LD BC,&C850
LOOP:
LD (HL), BYTE_01
INC L
LD (HL), BYTE_02
SET 3,H
LD (HL), BYTE_03
DEC L
LD (HL), BYTE_04
SET 4,H
...
RES 3,H
...
SET 5,H
...
RES 4,H
...
SET 3,H
...
SET 4,H
...
ADD HL,BC
DEC A
OR A
JR NZ,LOOP
RET
.SPRITE_01
LD (HL), BYTE_01
INC L
LD (HL), BYTE_02
SET 3,H
LD (HL), BYTE_03
DEC L
LD (HL), BYTE_04
SET 4,H
...
RES 3,H
...
SET 5,H
...
SET 3,H
...
RES 4,H
...
RES 3,H
...
RES 5,H
LD A,L
ADD &50
LD L,A
JR NC,SKIP
INC H
SKIP:
LD (HL), BYTE_17
INC L
LD (HL), BYTE_18
SET 3,H
LD (HL), BYTE_19
DEC L
LD (HL), BYTE_20
...




ervin

#49
Quote from: PuzCPC on 14:13, 10 March 19

Of course! :)


.SPRITE
LD A,17
LD BC,&C850
LOOP:
LD (HL), BYTE_01
INC L
LD (HL), BYTE_02
SET 3,H
LD (HL), BYTE_03
DEC L
LD (HL), BYTE_04
SET 4,H
...
RES 3,H
...
SET 5,H
...
RES 4,H
...
SET 3,H
...
SET 4,H
...
ADD HL,BC
DEC A
OR A
JR NZ,LOOP
RET
.SPRITE_01
LD (HL), BYTE_01
INC L
LD (HL), BYTE_02
SET 3,H
LD (HL), BYTE_03
DEC L
LD (HL), BYTE_04
SET 4,H
...
RES 3,H
...
SET 5,H
...
SET 3,H
...
RES 4,H
...
RES 3,H
...
RES 5,H
LD A,L
ADD &50
LD L,A
JR NC,SKIP
INC H
SKIP:
LD (HL), BYTE_17
INC L
LD (HL), BYTE_18
SET 3,H
LD (HL), BYTE_19
DEC L
LD (HL), BYTE_20
...


Very interesting!

I'm wondering if it can be optimised a little bit.
8)


ADD HL,BC
DEC A
OR A
JR NZ,LOOP
RET


Is the OR A needed?

Actually, I notice that you're using ADD HL,BC.
Is DE free in your sprite loop?
If it is, you can use ADD HL,DE instead.
That will then allow you to replace the looping code I've quoted just above with DJNZ, if you use B as the loop counter instead of A.

Powered by SMFPacks Menu Editor Mod