CLIGUI 2025-02-22 14:36 (Edited)
I am trying to make a program that has a lighting system based on tinting cells. But I am having trouble making multiple player placed cells light up the areas around them. For some reason only the last cell placed functions.
Use pause to open the inventory and select the cell with the L, it is a lamp cell.
CLIGUI 2025-02-22 15:44 (Edited)
Attempt 3 is better. I think the problem is caused from constantly tinting the BG, but
I need it to be, so I can implement the code into another project.
CLIGUI 2025-02-22 18:16
This one mostly works
was8bit 2025-02-23 12:10
I would use
'WOOD
PAL 4
CELL (X/8)+11,(Y/8)+13,16
Rather than
'WOOD
ATTR(4)
CELL (X/8)+11,(Y/8)+13,16
was8bit 2025-02-23 12:14
You can use
TINT (X/8),(Y/8) PAL 4
For just one cell
was8bit 2025-02-23 12:22
The command TINT is abit misleading , as you can also use it to change not only cell color, but FLIP and PRIO settings
These function much like the Background editor does, allowing you to make changes some specific settings of a cell or block of cells...
You can also copy blocks of cells from your background file to the graphics page...
was8bit 2025-02-23 12:26 (Edited)
For advanced control over your background, you may want to investigate MCELL....
MCELL lets you create a space in memory larger than the normal background... you make changes to this large space, and then copy/paste a portion of it to the visual background as you move around...
Check out this sampler...
CLIGUI 2025-02-23 13:36
Ok thanks for the help
was8bit 2025-02-23 14:51
Good luck, your game is looking like a lot of fun :)
CLIGUI 2025-02-23 17:56
If I am using c.cell, in a 3000 token program, can I switch it to m.cell and should I.
I need to change cells placed by the player to different cells after a certain time has passed, to make a growth cycle for plants.
But I also need to make light sources that can be placed and removed.
Would m.cell make it easier?
CLIGUI 2025-02-23 18:02
Yes... sigh
was8bit 2025-02-24 04:43 (Edited)
Using the BG 0 or BG 1 is fine if your game is limited to the 32x32 size... or if your game is simple...
But if big and complicated, MCELL advantage is this....
1) can use a size bigger than 32x32
2) make all edits, reads, etc, with MCELL commands
3) only use regular backgrounds to actually display portions of MCELL
In a sense, MCELL has the advantage of using it to store actual stuff, can read and write stuff on it like you can with regular backgrounds...
But MCELL has the disadvantage of not being an actual background that a player can see... so you have to depend upon frequent COPY of the portion you want to display...
Also, if you see with my test program, it doesnt loop around smoothly as a regular background does, so you have to keep that in mind...
... it takes abit of getting used to, but once you get it, it can be really fun :)
was8bit 2025-02-24 04:51
FYI, when you COPY a portion of MCELL to a background, you "CAN" still make edits to the background with regular background commands.. BUT these edits are instantly lost with the next update with COPY MCELL to background...
... may be useful for random effects or something, but in general not recomended if you are updating constantly...
was8bit 2025-02-24 04:55
a simple use for MCELL is a scroller style game, where your player scrolls a long left or right run... i might make a sampler for that setup...
As your player interacts and makes changes to the scroll, by using MCELL, the changes are saved in MCELL memory as you scroll left/right
CLIGUI 2025-02-28 00:46
Thanks for the more in-depth explanation, I am going to work on some MCELL programs soon. Right now I am finishing up my CCELL intensive program and have been super busy.
was8bit 2025-02-28 05:01
:)
Since you cannot "see" mcell data, you may have use the BG COPY portions to the visible background to visually verify stuff as you are working on things... kinda like using TRACE alot to verify the variables are actually doing what you "think" they are doing ;)
was8bit 2025-02-28 05:02
I am still working on a "quicky" example, but as usual, life gets in the way ;)
CLIGUI 2025-02-28 17:24
How do I detect the pal of a cell?
was8bit 2025-02-28 21:02
P=MCELL.A(X,Y)
P=CELL.A(X,Y)
CLIGUI 2025-03-01 02:29
Thanks this will be very useful
was8bit 2025-03-01 05:31
Be mindful that this only works as if you are only setting pal color... if you are also changing a cell's flip or priority, then it gets abit tricky...
BG Data
A background is a map of 32x32 character cells. Each cell occupies two bytes:
- Character number
- Attributes:
Bit Purpose
0-2 Palette number
3 Flip X
4 Flip Y
5 Priority
6-7 Unused
Same thing happens if you use sprites bigger than a single cell in size... SPRITE.A for single cell easily yields color#, but changing any other attribute yields a trickier #
was8bit 2025-03-01 05:47
"IF" you want to think outside standard use, this is abit interesting...
ATTR 255
CELL 1,1,1
TRACE CELL.A(1,1)
... lets you store any # from 0 to 255 as an attribute value... as this also affects how an image appears, this is not recommended for normal stuff...
... i have tried using a hidden layer as a way to store enemy hit points for enemies on the visible layer... just as an experiment to use the layer to replace arrays, but it gets cumbersome keeping the hit point layer matching up with enemies on the visible layer.... long story short, arrays are easier...
was8bit 2025-03-02 08:23 (Edited)
MCELL sampler is posted, but as a game it isn't finished yet...
https://lowresnx.inutilis.com/topic.php?id=3673
I am going to try to add a moving scorpion to the first section...
CLIGUI 2025-03-08 03:56
Almost done with my new game, very glad
was8bit 2025-03-08 04:06
Cool :)
CLIGUI 2025-03-09 15:49
Done! Finally... it took forever to make