msoft 2020-04-09 05:37
A little program that generates a solar system that the player can fly around. Use arrows to move ship. I currently don’t know how to fix the planets overlapping (the black box still shows) and I also don’t know how I will handle collision detection since the planets are cells and not sprites.
GAMELEGEND 2020-04-09 06:08 (Edited)
This will get rid of the black box there are other people that can help you with the code on checking if there is a planet already there i know how to code that but there better way to do than the way i know how
BG 1
FOR I = 0 TO 1
FOR J = 0 TO 1
CELL I,J,1
NEXT J
NEXT I
BG 0
PAL 1
FOR I = 1 TO 2
FOR J = 1 TO 2
CELL I,J,1
NEXT J
NEXT I
#2:MAIN CHARACTERS
00000000000000000000000000000000
FFFFFFFFFFFFFFFF0000000000000000
The reason there is a black square when the planets over lap is because all your planets are on BG 0 in this little program here what happens is the top left corner of the orange square overlaps the the bottom left corner of the white square instead of replacing it
Timo 2020-04-09 06:12
You can make the planets sprites. You couldn’t fit other characters in the center of them anymore (Char Designer), but it solves all the other problems.
GAMELEGEND 2020-04-09 06:17 (Edited)
What i did will also get rid of the black square but i recommend doing what timo typed a lot more then doing what typed because well its timo and timo knows this stuff inside and out, twised, upside down, backwards etc and plus making them sprites takes a lot less code anyways
Timo 2020-04-09 06:40
There are always different solutions, each with its advantages and disadvantages. If for example it would be ok NOT to overlap planets, but you wanted to have a huge scrollable playfield, then cells could be better.
msoft 2020-04-09 14:44
How can you change palettes with sprites? I know the pal command only works with cells
msoft 2020-04-09 14:51
Never mind. Just re read the manual 🤦♂️