News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Putting Sprites on the Screen?

Started by Apidya, 14:16, 13 April 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Apidya

Hello all,


I am learning from Assembler book called "Learn Multiplatform Assembly Programming" that I just bought from Amazon.


I have decide code Z80 Assembler for CPC Emulator because it got Assembler built in :)


I am trying do image of the Bat and I seem get frustration on why I cant draw the Bat Correctly!
For Example...


TestSprites:
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000



Updated: I made corrections that is 8 lines of db.....not 7 as that was my error on typing here but does anyone how make bat Sprites?





SRS

#1
your Data is just a line of "- - - - - - -" ...
I'd recommend to look how CPC writes to screen (here in wiki) and the good article about sprites here: http://www.cpcmania.com/Docs/Programming/Sprites_I_Introduction_to_using_sprites.htm
And here : http://www.cpcwiki.eu/index.php/Programming:Coding_a_simple_BASIC_game_into_Assembly

Apidya

Thanks SRS and I will checked the links :)




keith56

#3
Hi there!... that book sounds familiar somehow! :-P

The example in the book is based on this one here:
https://www.chibiakumas.com/z80/simplesamples.php

https://www.youtube.com/watch?v=21jaMDKXfZ4

You can download the book sources here (and save yourself some typing)
http://www.chibiakumas.com/book/
I posted your bitmap into the example, and it works fine (attached)

if you post the full source code you're trying to run, I'll see if I can help

Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Powered by SMFPacks Menu Editor Mod