Board Thread:Questions and Answers/@comment-24454571-20140530055317

Today I decided to hop on and 'try to do something' - I ended up trying to create a nice looking grid on the bottom screen (256 by 192) using two FOR TO loops, one for drawing lines across the X axis and one for drawing lines across the Y axis, but no matter what I tried I couldn't seem to make it fit evenly. In doing so, though, I found out that by shifting the X & Y values the grid began to take on a 'trippy' look, so for fun I decided to try to make the starting and ending values for Y have a variation of 3 using RND(2)-1, but for some reason this produced some graphical phenomenon where the screen appeared to be 'dimmed' no matter how much WAIT or VSYNC I used, and ultimately didn't take on the appearance of a 'trippy wavy pattern' like I intended.

I'm not sure if I even care so much about that though - my original plan was to create grids and then maybe make it so that when you touched a particular area within that grid it lit up - somehow I can't bring myself to try that part because I couldn't make the grid pretty in the first place. I was thinking, "maybe I can apply what I've learned about Arrays to figure that out" - probably not, though.

To me, it seems like learning simple things should be the foundation for creating a game, and I'm not sure if it's worth it to go through and figure out all there is to know about the built in functions of the game (GRP, SP, or whatever) if I don't even know how to do those sorts of things for myself.

I did end up making a code that looks like this:

ACLS:CLEAR

X1=0:Y1=0:X2=64:Y2=64

@L ACLS GFILL X1,Y1,X2,Y2,1 VSYNC 1 IF BUTTON(2)==1 THEN Y1=Y1-64:Y2=Y2-64 IF BUTTON(2)==2 THEN Y1=Y1+64:Y2=Y2+64 IF BUTTON(2)==4 THEN X1=X1-64:X2=X2-64 IF BUTTON(2)==8 THEN X1=X1+64:X2=X2+64 GOTO @L

which produces another graphical error, only when the square is at the top of the screen, where there are black lines that mess it up. I don't know why these kinds of errors are occurring...

I've tried studying other programs before, but I'm feeling as though it's difficult to find a good starting place in any of them - I think the one that's closest to making sense to me is Brilliance's "Escape" - but even that is too comprehensive of a program for me to distinguish between things very easily when what I feel that I need are 'simple examples'.

I still don't even understand the last part of COLITEST - although I'm quite surprised that I practically completely understand the rest of it, putting values into an Array and spitting them out, and all - the idea behind the IF statements (as shown below) seems like sheer magic to me - what I've been told is that this can only output either a 0 or a 1, and I can ALMOST grasp this concept - that it's perhaps saying, "the player is here, that's a ?" although I don't see how it returns a 0 or 1 at all - but I still absolutely do not see where it's creating some delineation between what is colliding or not - to me it seems like it's going to 'update' the player values no matter what.

IF MAP(FLOOR(PLX/8),FLOOR(PLY/8)) THEN PLX=PLXO:PLY=PLYO IF MAP(FLOOR((PLX+5)/8),FLOOR(PLY/8)) THEN PLX=PLXO:PLY=PLYO IF MAP(FLOOR(PLX/8),FLOOR((PLY+5)/8)) THEN PLX=PLXO:PLY=PLYO IF MAP(FLOOR((PLX+5)/8),FLOOR((PLY+5)/8)) THEN PLX=PLXO:PLY=PLYO

Again, the statement seems so vaguely ambiguous that it just appears like magic to me and I haven't found a substantial explanation for what it's perportedly doing - some of you have been very generous with your time here with me, although I haven't found some of your explanations to make complete sense - maybe this is because I'm dense or something.

I'm just a little bit frusterated with the lack of progress I've been making. I feel as though there should be some 'secrets' out there that would make understanding this as a whole a whole lot more simple. I'm a big fan of simple examples to explain simple concepts - I feel like I created a pretty sweet one when I made that program that flashes a light & detects button inputs. It wasn't immediately apparent to me how the whole "looping incredibly fast to detect inputs" was necessary to the experience of coding, so it was sort of a challenge for me to figure out that I had to create a loop that counted a certain amount of times before switching to a different loop - but what I'm not understanding about how to do some of these other simple things, like creating a menu to scroll through, I don't know.

Actually, another example, and I can't remember who did this, was an animated sprite program that shows the numbers of the characters location on the bottom screen - before this I had seen example program of character movement and when the sprite moved off the screen, I wondered, "How did it do that?! How far can it go?!" which I now understand can probably be explained through math, and the number that it can achieve is probably so incredibly high it would take me awhile just to sit here with my finger on the 0 button just to reach that number. At least, I imagine it has that sort of limitation - maybe it slows down at higher numbers too.

Um... anyway... I don't know what I should be learning - one thing on my mind is that I imagine that in order to create a 'scrolling screen' you essentially take the values of a Sprite and/or Background's location and constantly re-calculate their position to take up the values of the screen, which I imagine can only be between 256 by 192.

See - I have a good concept of what should be going on in a code, but there's just something about it all that just seems like a gosh darn big wall to me... 