was8bit 2023-01-23 15:09 (Edited)
Watch as a new galaxy forms and grows.....
TAP very center to create a new random galaxy
DRAG up and down on the left/right edges to adjust different diameters
DRAB left and right on the top/bottom edges to adjust different rotation speeds
Watch your new galaxy grow :)
GAMELEGEND 2023-01-23 16:53
THIS IS SO COOL!!
was8bit 2023-01-23 18:27
This is what inspired me ...
GAMELEGEND 2023-01-24 01:49
Hey, I have noticed that right before you see the galaxy being created, there are a bunch of dots flying around in the shape of the galaxy.
Is the new Galaxy loaded or something?
was8bit 2023-01-24 05:01
I noticed the flashing bits too, but i didnt code that... but since i liked it, i didnt bother investigate it...
I know that the FIRST time you run it, there is alot of flashing just on the bottom... those are actually the preloaded font set being quickly remove... the subsequent flashings are from pieces of the previous galaxy...
Upon investigating, i figured out what is going on.... if you add WAIT VBL here in the code that erases the screen via loading blanks into each character:
FOR Y=0 TO 15
FOR X=0 TO 15
FOR IX=0 TO 7
FOR IY=0 TO 7
And run the program with the WAIT VBL, you will notice you dont see that flashing...
My original code does NOT use WAIT at all (the WAIT 15 should have been deleted, it was part of old code i deleted, its effectively is meaningless as it has no real effect)... so my code is running full blast without any WAIT
.... HOWEVER, lowres will force a WAIT if the code overwhelms its proccessing limits... so thats where the flashed quickly and randomly appear...
my "reload with blanks" code probably could be rewritten better to avoid the flashing effect, probably by copying cell 0 into all the other cells, and avoid the array looping in the POP and in the WRITECHAR.... this slows down the processing... but like i said, since i like the flashing effect, i will leave it in ;)
was8bit 2023-01-24 05:06 (Edited)
If you make a game that uses characters in background memory, and you are maxing out the processor, you risk getting unexplained errors that can occur because you maxed out the processor...
thats because the background changes cannot always keep up with your code, and it can read parts of the background that has lagged behind your code... i've learned to add a WAIT VBL directly after background changes, and magically the code will always work as intended ;)
SP4CEBAR 2023-01-25 10:22
@was8bit Here's a markdown trick:
If you put three of these: ``` before and after your code, it'll be formatted as code: tabs are kept, and multiplications * won't make your calculations look bold```
was8bit 2023-01-25 13:02
Ah, thanks :)
GAMELEGEND 2023-02-23 19:44 (Edited)
So this program makes a 16 cell by 16 cells square and edits the character data, correct?
was8bit 2023-02-24 05:00 (Edited)
Yup... it's the simplest approach.... note, you cannot edit cell#0 as by default that functions as "blank" ... so IF you edit it, a normally empty screen will be automatically totally filled up with the edited #1 cell, on BOTH layers...
Otherwise, it's super easy...
My math is drawn out and uses arrays as I need to see each step to wrap my mind around what's going on... it's possible to condense it, but for me I am more comfortable with how i use it...
Feel free to experiment :)
Again, all character cells from 1 to 255 are put on the screen as a 16x16 array, then edited ;)
was8bit 2023-02-24 05:06 (Edited)
POP sub resets screen and variables...
To simply initiate the drawing array, you can just do
FOR Y=0 TO 15
FOR X=0 TO 15
At the beginning of your code...
was8bit 2023-02-24 05:14 (Edited)
DIM GLOBAL GETCHAR(7,7) sets up the editable cell array, it stores data for a single cell
SUB READCHAR(ICHAR) Loads the cell array from a cell
SUB WRITECHAR(ICHAR) Writes the cell array to a cell
GETCHAR(PX,PY)=C edits the cell array, by setting a single pixel in the cell array
... if I remember correctly, you use the values 0,1,2,or 3 which are the same #,s used in the character editor, 0 being blank....
was8bit 2023-02-24 05:16
The remainig code in this particular program is just a Spirograph code.... what I posted here above is the core of what powers the cell editing ....
was8bit 2023-02-24 05:17 (Edited)
If you can find my 3d Pacman game, I use a 2 layer 2x2 cell map that edits the pixels to show you what is near you in the game... ;)