Sylveon 2024-12-19 01:42
so there is an unused command called display [mode] and what does it do :3
was8bit 2024-12-19 17:14
For original lowres....
DISPLAY
DISPLAY mode [SHARED]
DISPLAY sets the screen resolution. When you call it all currently opened layers get closed (including the two default layers), so you will have to open any needed layer with LAYER OPEN. Available options for mode are:
Mode Screen Resolution
0 8x8
1 16x16
2 32x32
3 64x64
4 128x128
By adding the SHARED keyword, all layers will share the same color palette. Otherwise each layer will have its own.
was8bit 2024-12-19 17:17
LAYER OPEN
LAYER OPEN number,width,height,mode
Creates a layer which will be used as the destination of all subsequent graphical commands. number is used to identify this layer, possible values range from 0-3. Layers with higher numbers cover lower ones. If this layer is already open, it will be replaced with the new one. width and height hold the size of your layer in pixels. The maximum size is 512x512, so it can be larger than the actual screen resolution. With the LAYER OFFSET command you can manipulate the currently visible area. mode can be one of these options:
0 Standard (opaque)
1 Transparent for pixels with color 0
DISPLAY 4
LAYER OPEN 0,128,128,0
TEXT 64,64,"THIS IS HI-RES!",1
LAYER CLOSE
LAYER CLOSE number
Deletes the layer with the given number. If it was the current layer, following graphical commands won't have any effect until you open or set another current layer.
LAYER
LAYER number
Use this command to select the current layer. This layer will be used as the destination of all subsequent graphical commands. Each layer will even hold its own current colors and font.
By default LowRes Coder opens two layers: Layer 0 is in the background and usually the main layer. Layer 1 is in the foreground and is transparent in all pixels with color 0.
LAYER 1
LINE 0,0 TO 63,63
LAYER 0
DO
COLOR RND*16
BAR 0,26 TO 63,36
WAIT 0.1
LOOP
LAYER DISPLAY
LAYER DISPLAY number,[x],[y],[w],[h]
LAYER DISPLAY sets where a layer should be shown on the screen. x and y hold the position of the top left corner of the layer. You can even move it around like a sprite! w (width) and h (height) are not related to the actual size of the layer, but they set the visible size. If the layer is larger than its visible size, you can manipulate the current visible section with LAYER OFFSET. Parameters can be omitted to keep the layer's current values.
LINE 0,0 TO 63,63
LAYER OPEN 1,60,7,0
LAYER DISPLAY 1,2,0
CLS 14
TEXT 1,1,"I AM A LAYER"
DO
FOR Y=-7 TO 64
LAYER DISPLAY 1,,Y
WAIT 0.04
NEXT Y
LOOP
LAYER OFFSET
LAYER OFFSET number,[x],[y]
LAYER OFFSET sets the visible section of a layer. x and y measure the offset from the top left corner of the layer to the starting point for your section. By creating a layer larger than the screen resolution and moving its offset, you can produce scrolling in a very simple way. Parameters can be omitted to keep the layer's current values.
LAYER OPEN 0,256,64,0
FOR I=0 TO 20
COLOR RND*16
BAR RND*256,RND*64 TO RND*256,RND*64
NEXT I
DO
FOR X=0 TO 191
LAYER OFFSET 0,X,0
WAIT 0.04
NEXT X
LOOP
LAYER OFF
LAYER OFF number
Hides the given layer without losing its contents. It's still possible to draw on it and it can be shown again with LAYER ON.
LAYER ON
LAYER ON number
Shows a layer which was previously hidden by the LAYER OFF command.
SPRITE LAYER
SPRITE LAYER layer[,sprite [TO last]]
By default all sprites are shown on layer 0. This means they use the colors of that layer and they will be covered by all layers with higher numbers. However, positions of sprites are always independent from the layer position and offset. With the command SPRITE LAYER you can set the layer for each sprite.
REM ASSIGN ALL SPRITES TO LAYER 1
SPRITE LAYER 1
REM ASSIGN ONLY SPRITE 7 TO LAYER 1
SPRITE LAYER 1,7
REM ASSIGN SPRITES 0 TO 7 TO LAYER 1
SPRITE LAYER 1,0 TO 7
=LAYER HIT
v=LAYER HIT(layer,sprite)
Returns TRUE if layer collides with sprite. A collision happens when a non-transparent pixel of the sprite hits a layer pixel with a color different from 0.
was8bit 2024-12-19 17:19
Original lowres is its own thing, great for pixel focused stuff... i often made games as blocks of different colors or relied heavily on geometry commands like CIRCLE
was8bit 2024-12-19 17:23
Lowres NX has graphic cells and backgrounds and editors... original lowres has none of these things...
Timo 2024-12-19 18:35
DISPLAY exists in NX too, but it’s deprecated and was replaced with other commands.
Sylveon 2024-12-19 21:30 (Edited)
Was8bit, I’m talking about the one in LowRes NX :3
Sylveon 2024-12-19 21:30
Timo what does it do :3
was8bit 2024-12-20 04:33 (Edited)
Oh yea… that was like “day 1” of lowres nx…. I forgot…
@sylveon, it is more complicated or confusing way of squeezing many controls into one command… it has already been replaced with better commands …
Obsolete Syntaxes
These commands, functions and syntaxes should not be used anymore and may be removed in future versions.
SPRITE.A n,(pal,fx,fy,pri,s)
Use SPRITE (new syntax) or SPRITE.A (single value only) instead.
ATTR (pal,fx,fy,pri,s)[,m]
ATTR a,m
Use PAL, FLIP, PRIO or ATTR (single value only) instead. Use TINT and BG TINT for replacing attribute masks.
DISPLAY (s,b0,b1,c0,c1)
DISPLAY a
Use BG VIEW ON/OFF, SPRITE VIEW ON/OFF and CELL SIZE instead.
DISPLAY
Use PEEK($FF20) instead.
LFO.A v,(w,r,e,t)
Use LFO WAVE instead.
Timo 2024-12-20 15:15
By the way, the old syntax was inspired by Family BASIC for the Nintendo Famicom. But it was way too confusing.
Sylveon 2024-12-20 17:30
What is Family Basic ? :3
was8bit 2024-12-21 04:16
Basic programming refers to a simple format for programming…. Many different people/companies have made their own versions…