Discussion

NX Fantasy Console Cell Size?

1

tactics_pvp 2020-02-10 00:00 (Edited)

@Timo responded to one of my threads a week or so ago.

I canโ€™t seem to find that post he made, when I look thorough my post history. I apologize for this bringing this topic back up.

In the post, @Timo informed me exactly how many cells the NX fantasy console has going across horizontally and vertically.

Can someone please post these numbers? so I can add it to my notes.

I tried searching Cells in online but canโ€™t seem to find there, unless I am missing it somehow.

Thank you.


Roger Davis 2020-02-10 00:23 (Edited)

tactics_pvp, Hello there! I'm not sure if this is what you're after but on a post called : 'if up (0) y=y-1' etc. Timo stated that : "the fantasy console screen is always 160x128 (virtual) pixels". No matter which device you are using. Hope this helps : )


tactics_pvp 2020-02-10 00:26

@Roger Davis

Thank you

Pardon the noob in me, but by you leaving a blank space after the x

160x(blank space)

I am assuming you mean 160x160?


Roger Davis 2020-02-10 00:29

Sorry tactics 160x128 (virtual) pixels. But that's PIXELS, not CELLS.


Roger Davis 2020-02-10 00:32

I've been having trouble with text on my iPad! ๐Ÿ™„๐Ÿ™„๐Ÿ˜‚๐Ÿ˜„๐Ÿ˜Š๐Ÿ‘


Roger Davis 2020-02-10 00:35 (Edited)

It was the post where you asked the question "Does zero represent neutral".


Roger Davis 2020-02-10 00:38

๐Ÿ˜ƒ๐Ÿ‘Œ


tactics_pvp 2020-02-10 01:56

@Roger Davis

Yep that was it!! Thank you!

Yea likewise here my iPad does the same ๐Ÿ˜


Roger Davis 2020-02-10 04:50

tactics_pvp just so you know, I'm a complete noob on here too! I wouldn't have a clue how to code anything yet! But I'm good for idea suggestions, or for looking things up, like I just did for you! Because I have A:) A very good memory, and B:) unlimited time in which to search for things. ๐Ÿ˜Š


was8bit 2020-02-10 05:13 (Edited)

NX virtual console has a SCREEN, which you see, and it builds this screen from 2 BACKGROUNDS or layers...

Each BACKGROUND has 32x32 CELLS which can hold any graphic made with CHAR DESIGNER

BG 1 is farthest and BG 0 is on top ...

SCREEN combines both and only shows 20x16 CELLS at a time....


was8bit 2020-02-10 05:18

Each CELL on any one layer can only hold one CHARacter graphic (as designed with CHAR DESIGNER)

Each character graphic is 8x8 pixels or tiny color blocks in size...

CELL X,Y
CELL.C (X,Y)
both use cell coordinates as described above..

To understand the relationship between CELL coordinates and sprite PIXEL coordinates, see these two programs....

https://lowresnx.inutilis.com/topic.php?id=726

https://lowresnx.inutilis.com/topic.php?id=676


was8bit 2020-02-10 05:21 (Edited)

To further complicate things, SCROLL Bgnum,xamount,yamount does a hard shift of the chosen BG by the chosen x amount and y amount, the amounts are by PIXELS

Backgrounds are 256x256 pixels in size, and this command DOES loop the edges seemlessly together...

This command does NOT alter the background at all, it simply "skews" the view of it...


was8bit 2020-02-10 05:25 (Edited)

BG SCROLL is a different command and it is not recommended as it does change the background and it does not "scroll" as you would think scroll should....


Roger Davis 2020-02-10 08:03

Was8bit, well alright then! Lol ๐Ÿ˜‚ Thanks! That cleared up a lot of things for ME, how're YOU doing tactics_ pvp? ๐Ÿค” We're both benefiting from Was8bit's incredible knowledge here! ๐Ÿ˜ƒ๐Ÿ‘


tactics_pvp 2020-02-10 08:08

@Roger Davis

Amazing memory and search skills indeed, my memory is not all that - but I will remember to reach out to you, when I cannot find something that I saw in the forums. ๐Ÿ˜‚

Regarding was8bit - yea he is a fountain of knowledge. Which I am about to ask him a question that has been baffling me..


tactics_pvp 2020-02-10 08:27

@was8bit
That was incredible. Definitely removed clouds from my mind โ˜๏ธ

I kept counting 20x16 Cells on the program you created (which was super useful) But I would keep getting confused by the 32x32 I kept coming across in the online manual I think, but you quickly cleared that up with the: 20x16 cells at a time.


tactics_pvp 2020-02-10 08:28 (Edited)

@was8bit

That said, my main reason for creating this thread asking about the cell girds.. is for my confusion with controller pad direction variable placement on character movement. Please read below:

MY CONFUSION:
I was messing around with the gamepad 1 code.
This portion:

X=64
Y=64
IF UP(0) THEN Y=Y-1

I changed โ€œ-1โ€ into โ€œ+1โ€ what this did was change UP button to inverted. Basically, pressing up on my directional pad, made my in game character move down on the screen instead of up.

Cartesian Coordinates dictates on โ€œY axisโ€ + is positive and goes north.

So how is it that โ€œ-1โ€ is the value used to travel north, and โ€œ+1โ€ value has you going south.

Whatโ€™s baffling me is that โ€œ+1โ€ is an increment and NX is treating it as increment. Opposite of the Cartesian rules.

Yet...
IF LEFT(0) THEN X=X-1
IF RIGHT(0) THEN X=X+1
left and right follows the Cartesian coordinates.

I am confused about this and it leads me to the following questions:



QUESTION (1)
Does NX follow Cartesian Coordinate Rules?




QUESTION (2)
On the cell grid, in the app you shared, are the following values housed in the cells once we launch the app (Basically is character movement values stored in the cells):
X=64
Y=64




QUESTION (3)
I apologize for asking the following question before in a past thread and not recalling why I asked it, so here I am asking it again.

IF LEFT(0) THEN X=X-1

My question here is.. is the โ€œ0โ€ a default value assigned to a controller directional pad by NX as some sort of default assigned I/O value? which is stored somewhere within those cells when NX runs the program?


was8bit 2020-02-10 08:38

Ah... ok didn't you check out the two programs i posted ??

You will find your answers to these questions there too... ;)

https://lowresnx.inutilis.com/topic.php?id=726

https://lowresnx.inutilis.com/topic.php?id=676

... the answer, you must experience, grasshopper ;)



was8bit 2020-02-10 08:40 (Edited)

For gamepad #'s ... from the help section...

GAMEPAD

GAMEPAD n
Enables gamepads for n (1 or 2) players. Once the gamepad is enabled, the program cannot change to touchscreen/mouse input anymore.

=UP/DOWN/LEFT/RIGHT

UP(p)
DOWN(p)
LEFT(p)
RIGHT(p)
Returns true if the given direction is currently pressed on the direction pad of player p (0/1).



Gamepad 1 is for 1 player only
Gamepad 2 is for 2 players

UP(0) is for player 1 controls
UP(1) is for player 2 controls
(Yes, before you ask, 1=1 and 2=2 would make more sense, but... that is how NX does it, thanks to original lowres)


tactics_pvp 2020-02-10 08:45

I sure did look at your program. Ran it and moved the coordinates.

I am still lost. I even created a pdf to analyze it. See here:

https://drive.google.com/drive/folders/1HqQpk5oAU4aDbYDARfqp3UmjJBjLnkJD


was8bit 2020-02-10 08:53 (Edited)

Quick clarification for Q#2... x y = 64 is for your SPRITE (not a cell)...

Sprites HOLD a character reference #
Cells also HOLD a character reference #

When NX renders a cell, it forces the character graphic onto the cell grid for that background layer

When NX renders a sprite, it figures out how many character graphics it needs , with the given char# being the top left character, it retrieves based on the sprite size 1x1 or 1 characters, 2x2 or 4 characters, 3x3 or 9 characters, 4x4 or 16 characters... assembles all of the characters for that sprite into a square shape, then hovers the sprite's final image over top of the screen with pixel placement precision


was8bit 2020-02-10 08:55

NX coordinates are at the TOP LEFT (0,0) is at the TOP LEFT...

Y VALUE AT TOP IS ZERO

SPRITE Y VALUE AT THE BOTTOM OF THE SCREEN IS 127


was8bit 2020-02-10 08:58

CELL BLOCK #'s

(0,0)(1,0).....(18,0)(19,0)
(0,1)(1,1)....(18,1),(19,1)
.
.
.
(0,14)(1,14)....(18,14)(19,14)
(0,15),(1,15)...(18,15)(19,15)


was8bit 2020-02-10 09:00 (Edited)

Sprite pixel coordinate #'s...

(0,0)(1,0)....(126,0)(127,0)xxx wrong
(0,1)(1,1)....(126,1)(127,1)xxx wrong

(0,0)(1,0)...(178,0)(179,0)
(0,1)(1,1)...(178,1)(179,1)
.
.
.
(0,178)(1,178)...(126,178)(127,178)xxx wrong
(0,179)(1,179)...(126,179)(127,179)xxx wrong
.
(0,126)(1,126)...(178,126)(179,126)
(0,127)(1,127)...(178,127)(179,127)


was8bit 2020-02-10 09:07

For cell(0,0) .. the top left corner, contains inside that cell the following sprite coordinates...

Sprite (#,#) for cell(0,0)

(0,0)(1,0)(2,0)(3,0)(4,0)(5,0)(6,0)(6,0)
(0,1)(1,1)(2,1)(3,1)(4,1)(5,1)(6,1)(7,1)
(0,2)(1,2)(2,2)(3,2)(4,2)(5,2)(6,2)(7,2)
(0,3)(1,3)(2,3)(3,3)(4,3)(5,3)(6,3)(7,3)
(0,4)(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(7,4)
(0,5)(1,5)(2,5)(3,5)(4,5)(5,5)(6,5)(7,5)
(0,6)(1,6)(2,6)(3,6)(4,6)(5,6)(6,6)(7,6)
(0,7)(1,7)(2,7)(3,7)(4,7)(5,7)(6,7)(7,7)


tactics_pvp 2020-02-10 09:07 (Edited)

@was8bit

Responding to the grasshopper post :) (that was a good one)

Yes sir, I saw that in the online manual, but it was not working for me, I would get Syntax Error if I changed the online manual GETTING STARTED code:

GAMEPAD 1
X=76
Y=60
DO
IF UP(0) THEN Y=Y-1
IF DOWN(0) THEN Y=Y+1
IF LEFT(0) THEN X=X-1
IF RIGHT(0) THEN X=X+1
SPRITE 0,X,Y,225
WAIT VBL
LOOP

To:

UP(p)
DOWN(p)
LEFT(p)
RIGHT(p)

I would get โ€œSYNTAX ERRORโ€ UP(p)

But I think you answered my question in a different way.

Changing the code was not what I was really asking. What I was looking for, with that part of my question... I just wanted to know if NX uses Cartesian 2D Coordinates when coding player movement. Unity engine uses it, Unreal engine uses it, Godot engine uses it.. these coordinates define movement within 2D space.

However.. NX is on some thing else. CELLS

Which until I arrived here, I never heard of, unless I was doing a spread sheet.

Going to take me awhile to understand from what I am seeing. Just trying to learn basic movement and I am getting annihilated.


was8bit 2020-02-10 09:12

Each one cell has 64 pixels...

########
########
########
########
########
########
########
########

CELL coordinates reference this entire BLOCK (which is made up of 64 pixels)
SPRITE PIXEL coordinate references each indivual pixel

CELL doesnt care about pixels, pixels dont exist as far as CELL is concerned

SPRITES dont care about cells.. cells dont exist as far as SPRITES are concerned, sprites only care about pixels...


was8bit 2020-02-10 09:15 (Edited)

... be sure to back up and read "older"posts as we are cross posting and we can miss posts.,, ;)


was8bit 2020-02-10 09:22

... also i have corrected a few previous posts. Sorry :/


was8bit 2020-02-10 09:25 (Edited)

Maybe think about it like this..,

Think of the background as a tiled floor...each tile is big and gets stuck into the floor grid...

Think of sprites like clouds.. the float anywhere they want to, all over the place,, :)

Although they look alike, NX renders CELLS and SPRITES in 2 totally different ways.. to NX, CELLS and SPRITES are two totally different things...


was8bit 2020-02-10 09:33

In original lowres, CELLS did not exist... you have to pixel draw stuff on a hidden layer, then use GET BLOCK and PUT BLOCK commands to manually copy paste using pixel coordinates from the hidden layer to the visible layer... these were copied and pasted pixel by pixel... so changing things slowed things down and causes flashing and/or noticable delays... sometimes long delays..

By contrast, although there IS a learning curve ;) once you get comfortable with the NX system, it renders the graphics LIGHTNING FAST by comparison...


was8bit 2020-02-10 09:36

By PIXEL DRAW, i mean..

COLOR 4
PLOT 3,3
PLOT 3,4
PLOT 4,4
COLOR 8
PLOT 1,1
PLOT 2,2
..
Etc, until all of the pixels were drawn (ugh!!)


was8bit 2020-02-10 09:43 (Edited)

Here is REAL CODE from original lowres that i used for creating 16 tiles with a city grid layout to use the tiles to make a city... this code simply PIXEL DRAWS the tiles (NX does this with touch using CHAR DESIGNER)

COLOR 5
LINE 0,15 TO 9,11
LINE 9,11 TO 18,15
LINE 0,15 TO 9,19
LINE 9,19 TO 18,15
COLOR 6
PAINT 5,15
GET 0,11 TO 18,19
CLS
FOR IY=0 TO 16 STEP 8
FOR IX=0 TO 130 STEP 18
PUT IX,IY,0
NEXT IX
NEXT IY
BX=9
BY=4
DIM SX(16),SY(16),TX(16),TY(16)
FOR I=0 TO 16
READ SX(I),SY(I),TX(I),TY(I)
SX(I)=SX(I)*BX
SY(I)=SY(I)*BY
TX(I)=TX(I)*BX+SX(I)
TY(I)=TY(I)*BY+SY(I)
NEXT I
DATA 0,0,2,2, 0,2,2,2, 0,4,2,2
DATA 2,0,2,2, 2,2,2,2, 2,4,2,2
DATA 4,0,2,2, 4,2,2,2, 4,4,2,2
DATA 6,0,2,4, 6,4,2,2
DATA 8,0,2,4, 8,4,2,2
DATA 10,0,2,4, 10,4,2,2
DATA 12,0,2,4, 12,4,2,2
COLOR 9
PAINT BX,BY*3
PAINT BX*5,BY
PAINT BX*5,BY*3
PAINT BX*5,BY*5
COLOR 10
BAR BX*5-1,BY-1 TO BX*5+1,BY-2
COLOR 6
LINE BX*5,BY TO BX*5,BY+1
COLOR 12
PAINT BX,BY*5
CIRCLE BX*5,BY*3,2 PAINT
LINE BX*5-4,BY*3 TO BX*5+4,BY*3
COLOR 3
BAR BX*5-1,BY*5-1 TO BX*5+1,BY*5+1
PLOT BX*5,BY*5-2
COLOR 11
PLOT BX*5,BY*5
COLOR 2
LINE BX*3-4,BY-2 TO BX*3+4,BY+2
LINE BX*3+4,BY-2 TO BX*3-4,BY+2
LINE BX*3-4,BY*3-2 TO BX*3+4,BY*3+2
LINE BX*3+4,BY*5-2 TO BX*3-4,BY*5+2
FOR IY=-2 TO -4 STEP -1
COLOR 15
LINE BX*7,BY*6+IY TO BX*7-3,BY*6-1+IY
COLOR 14
LINE BX*7,BY*6+IY TO BX*7+3,BY*6-1+IY
NEXT IY
COLOR 11
PAINT BX*7,BY*6-6
FOR IY=-2 TO -4 STEP -1
COLOR 7
LINE BX*9,BY*6+IY TO BX*9-3,BY*6-1+IY
COLOR 8
LINE BX*9,BY*6+IY TO BX*9+3,BY*6-1+IY
NEXT IY
COLOR 11
PAINT BX*9,BY*6-6
FOR IY=-2 TO -4 STEP -1
COLOR 2
LINE BX*11,BY*6+IY TO BX*11-3,BY*6-1+IY
COLOR 1
LINE BX*11,BY*6+IY TO BX*11+3,BY*6-1+IY
NEXT IY
COLOR 11
PAINT BX*11,BY*6-6
FOR IY=-2 TO -4 STEP -1
COLOR 3
LINE BX*13,BY*6+IY TO BX*13-3,BY*6-1+IY
COLOR 2
LINE BX*13,BY*6+IY TO BX*13+3,BY*6-1+IY
NEXT IY
COLOR 11
PAINT BX*13,BY*6-6
FOR IY=-1 TO -8 STEP -1
COLOR 15
LINE BX*7,BY*4+IY TO BX*7-7,BY*4-3+IY
COLOR 14
LINE BX*7,BY*4+IY TO BX*7+7,BY*4-3+IY
NEXT IY
COLOR 11
PAINT BX*7,BY*4-9
FOR IY=-1 TO -8 STEP -1
COLOR 7
LINE BX*9,BY*4+IY TO BX*9-7,BY*4-3+IY
COLOR 8
LINE BX*9,BY*4+IY TO BX*9+7,BY*4-3+IY
NEXT IY
COLOR 11
PAINT BX*9,BY*4-9
FOR IY=-1 TO -8 STEP -1
COLOR 2
LINE BX*11,BY*4+IY TO BX*11-7,BY*4-3+IY
COLOR 1
LINE BX*11,BY*4+IY TO BX*11+7,BY*4-3+IY
NEXT IY
COLOR 11
PAINT BX*11,BY*4-9
FOR IY=-1 TO -8 STEP -1
COLOR 3
LINE BX*13,BY*4+IY TO BX*13-7,BY*4-3+IY
COLOR 2
LINE BX*13,BY*4+IY TO BX*13+7,BY*4-3+IY
NEXT IY
COLOR 11
PAINT BX*13,BY*4-9


was8bit 2020-02-10 09:43

Personally, I prefer NX's approach for tiles ;)


Timo 2020-02-10 09:51

This seems to be a good video explaining how tiles worked on the Game Boy. Lots of information that works for NX, too!

https://www.youtube.com/watch?v=zQE1K074v3s


Roger Davis 2020-02-10 09:54

Okay! Now I have a question! How do you two characters type stuff in so damn fast? Lol ๐Ÿ˜‚ ๐Ÿคฃ๐Ÿ˜†๐Ÿ˜„๐Ÿ˜ƒ๐Ÿ˜Š


tactics_pvp 2020-02-10 10:00

@was8bit

I must say thank you for this:

X=64
Y=64

โ€œSprites hold character referenceโ€


Reading that, I changed the X,Y values from 0 to 64 in your Cell/Sprite program. Now I understand what you are saying by itโ€™s for SPRITE not cell.

Once I saw my values moved your drone to the center of the screen - comprehension hit me immediately (I will be making some notes on that).

For some reason, with the other code, the one Timo does on his youtube guide, something I was testing in there (which I donโ€™t recall through all the recent confusion) kept me thinking..

those X,Y variables were for movement values, meaning: when you press the gamepad direction buttons, NX would respond with with X,Y output. Iโ€™ll test again later to unravel that confusion piece that got me.


tactics_pvp 2020-02-10 10:00

You brought up
SPRITES & PIXELS:
Iโ€™ll need to find out whatโ€™s the difference between a SPRITE & PIXEL in terms as to how NX defines it. Understanding that, will get me closer to comprehension. Because I did not comprehend much of what you were trying to teach, other than one does not care about the other.

When I looked it up online, I got the following definition:

โ€œSPRITES:
Generally mean the image representation of a thing in the game.

PIXEL ART:
The art style where you purposefully make things look low-resolution and blocky/squarey like very old console games in the 90โ€™s. Basically, you can make pixel art sprites, but you can also make sprites in another style.

Nowadays both terms are used interchangeably and are basically synonymous.โ€

Thatโ€™s online definition, Iโ€™ll have to see how NX defines them.


tactics_pvp 2020-02-10 10:00 (Edited)

Basically from this recent post you made, I gathered... that unlike Unity game engine, where your in game character model moves about via a variable that has values moving this character model along an invisible axis.

Here in NX,
The movement is defined by a designated sprite, which is where the character will be referenced to.

I hope, I got that understanding correct.

I will do more tests. Since I canโ€™t code a character, to just move on the screen, on my own, how sad. I will run more tests on your drone code - hopefully I wont run into Syntax Error.


Regarding everything else you expressed, I will back track due to cross posting and I will copy and paste your suggestions which I always do - to my notes app, so I can process later with some testing and make notes on it.

I will also look at that city tile set you shared (which by the way was8bit) I donโ€™t know how to open a copy and pasted character data set onto a new program. I tried copying it into the code editor, but it does not appear in the BG designer or Char designer when I tap on there. In case I wanted to bring your tile set over to my test grounds.

As always was8bit. Thank you, because of you, I gained a level:
I do understand character reference is stored in sprites. That gem, is gonna take me a long way!


tactics_pvp 2020-02-10 10:01 (Edited)

@Roger Davis

๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ

I am definitely using a keyboard. Canโ€™t do that glass tap or swipe to type on iOS.
I need the keys ๐Ÿ”‘ ๐ŸŽน bruh ๐Ÿ˜Š


tactics_pvp 2020-02-10 10:10 (Edited)

@Timo

Oh snapโ€™ look whoโ€™s back!

Wats up Big Pimpin!

I thought you were off somewhere creating galaxies and dimensions with your quantum computer. ๐Ÿ˜Š

Iโ€™ll look at that youtube video. Videos are the best. Text be kicking my ass trying to visualize what I do not know.

I might have to hibernate for a week, to let everything subconsciously process, after all that knowledge @was8bit dropped on us today.

*UPDATE*
Woa!

100,000 + respect points for you Timo.
Awesome video, yep I see how tile, cells, all broken down.
Will be taking notes along with screen captures off of this one.

Good share. I advise everyone still learning to check that video out.
I subscribed to that guy.


Timo 2020-02-10 10:24

Well it was just a quick youtube search, but I already knew the channel, so I thought it will be okay ;)


Roger Davis 2020-02-10 11:08

@tactics_pvp I hear you brother! Sing it! A keyboard is the way to go obviously! ๐Ÿ˜„๐Ÿ‘


was8bit 2020-02-10 19:11

Timo is forever at a very high programming level, his C programming makes NX work! ;)


was8bit 2020-02-10 19:14 (Edited)

This ez game uses sprites only...

https://lowresnx.inutilis.com/topic.php?id=984


... this game uses CELL only on both backgrounds...

https://lowresnx.inutilis.com/topic.php?id=1005

... both also use NUMBER to display values...


Log in to reply.