Animated tiles

Post Reply
User avatar
Electric cat
Posts: 155
Joined: Sun Oct 07, 2018 4:09 am

Animated tiles

Post by Electric cat » Thu Dec 12, 2019 8:02 pm

Hello all i have been working on animated tiles, im sure by the time i figure one out 4.x.x will be out and already have them as a usable feature.

But i have been doing research and wanted to post this code and see how far away this is from being usa le in NESMAKER. NOW this is not my code i sources if from Nerdy Nights




.inesmap 30 ;mapper30= NROM
.ineschr #2
.bank ;just make a new .bank file below your current CHR file, giving the next seq number and the
;when you set ehich bank to switch to this is the number used. PRG bank numbers are ignored so your original CHR bank will be #0
;and the new one will be #1
;(below the current one int the folder.
;Subroutine time.

....my game code...

LDA #$01;;; put the new bank to use into the A register
JSR Bankswitch ;;Vump to bank switch code
....My game code...

Bankswitch

STA $8000 ;;new bank to use

RTS

;;NO bus COnflict

LDA #$01 ; PUT NEW BANK TO USE into A

JSR Bankswitch ;;jump to bank switching code

...code...

Bankswitch

TAX;;copy A into X
STA Bankvalues, X;;new bank to use
RTS

Bankvalues

.db $00, $01, $02, $03;; bank numbers


As im working through ASM and NESMAKER locating CHR files in nesmaker im taking are the BACKGROUND CHR files and then the Code would be writen to the tile.
Last edited by Electric cat on Fri Dec 13, 2019 2:01 pm, edited 1 time in total.
Code Name : Silencer (WIP)
Legacy Of Black(WIP)
User avatar
Mugi
Posts: 808
Joined: Thu Dec 27, 2018 8:30 pm

Re: Animated tiles

Post by Mugi » Fri Dec 13, 2019 11:12 am

well, for starters, this is not even assembly, it's C, making inherently incompatible with nesmaker.
it's propably for ca65 which is a C compiler and could be ported to asm6 but as it is it wont do anything in nesmaker.

(the link is not working btw)
"what are you up to?" "Oh, not much... just... Parallaxing"
- Raftronaut
User avatar
Electric cat
Posts: 155
Joined: Sun Oct 07, 2018 4:09 am

Re: Animated tiles

Post by Electric cat » Fri Dec 13, 2019 2:10 pm

Ok so i switch the code it has to do with bankswitching. Im trying to learn ASM, and this is how i do so with with trial and error.

Can this be used in an animated tile application?
Code Name : Silencer (WIP)
Legacy Of Black(WIP)
User avatar
Electric cat
Posts: 155
Joined: Sun Oct 07, 2018 4:09 am

Re: Animated tiles

Post by Electric cat » Sat May 09, 2020 2:29 pm

Thank for the help Mugi. With a Swap code i have working in nemaker now , coding in which graphics banks and it will be animating shortly ;)
Code Name : Silencer (WIP)
Legacy Of Black(WIP)
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Animated tiles

Post by dale_coop » Sat May 09, 2020 10:16 pm

Cool, keep sharing your results and thoughts, here.
It might be interesting for everyone
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
mouse spirit
Posts: 48
Joined: Tue May 12, 2020 1:13 am
Location: Ohio,North America
Contact:

Re: Animated tiles

Post by mouse spirit » Tue Jun 30, 2020 6:24 pm

This sounds great.Would it be possible to just do something with monster locks code or something like that?Like just switch from one tile to another, but then back again?
I am game, hear me blip.

WIP my game Star Rider
https://www.mediafire.com/file/phef252j ... p.zip/file
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Animated tiles

Post by dale_coop » Wed Jul 01, 2020 7:32 am

The code for replacing a tile is really consuming... if you don't that repeatedly, your game will be very laggy and glitchy.

Currenlty, two solutions: using an object, that would have no collision, and be ignoring gravity... just make it flashing/changing like you want.
Or you can use palette cycling (colors changes), like that topic: viewtopic.php?p=25049#p25049
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
Post Reply