Sergioz82 Posted March 19 Share Posted March 19 This is a project I am currently working on. I wanted to create a trail behind a moving sprite (the yellow sphere). The core of the idea is the classic snake concept but expanded to take advantage of the bitmap mode. I also added a "spiritual flame" effect that is triggered when the sphere is not moving. The effect is not pre-calculated as the bitmap is modified real time with random values. There is still some polishing to do (i.e improve the flame effect and the vertical trail color pattern) but now I have the proof of concept I think it can be used to make projectiles, meteorities, ghosts, boat wakes and so on.. My idea is to make a fixed screens platformer with small puzzles to solve by using the sphere's abilities, but there is still a lot of work to do. The next step is learning XDT99 and bank switching. In more detail, the trail is made this way: the head is an empty 8x8 circle pattern with its color pattern. In each cycle the program reads from VDP the bitmap at head position, SOCB with circle pattern in next position then writes the resulting byte(s) back in VDP the tail has the same pattern of the head and works the same but SZCB with circle pattern instead the head writes position information in a buffer that has to be as long as the desired lenght of the trail, i.e 16 pixels means 16 entries in the buffer. When the head moves it writes its next position in the buffer. The tail reads the buffer in sequence. the bobbing effect is a very simple set of instructions that increment a -2 to 2 offset each 8 pixels I had to implement a collision detection between head and tail because when they overlap the tail doesn't work properly and it leaves stains on the screen, so when they overlap the head stops drawing (you can notice this in narrow turns) the flame effect is made by switching to an alternative head routine. It starts with a 00 byte pattern, then a random 0-255 number is generated to SOCB the pattern. Then the resulting byte is SZCB with a cutout pattern to turn off the bits around the edges to give it a rounder appereance. 26 Quote Link to comment Share on other sites More sharing options...
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.