For those interested... You can do the following to let Pico 8 do the math to center the text (or even a sprite, or shape) by doing the following: LOCAL TITLE="MY AWESOME SHMUP" LOCAL TX=(128-(#TITLE*4)/2 PRINT(TITLE,TX,yy,cc) Here's what's happening: Your text, "MY AWESOME SHMUP" is now a string. The # symbol in front a string label will return it's length. 128 is the width of the screen in pixels. In MOST cases (any of the Picoscii symbols are excluded) the text characters are 4 pixels wide. So you take the screen width (128) and subtract the length (#) of the string (TITLE) which is multiplied by 4 (the pixel width of the text characters) and that result is then divided by 2 finding the starting X coordinate to make your text nearly perfectly centered. You can also use this same formula for the Y axis or even to center a sprite.
ADDENDUM: It looks like I dun goofed up and used += without explaining what it does. Well, it's basically a shorter way to add something to a variable. So x+=1 is a shorthand for x=x+1 . I will come back to this topic in a later video.
I've been trying to teach myself game design for a while, but I always found myself getting stuck and having to start over. I'm 9 episodes in of this now and have been taught the knowledge I need to find and fix bugs myself (sometimes with help from the discord but still). Thank you so much
This tutorial has been so great! I was able to complete all of your doggie mode challenges before the video even ended. Tried to post a GIF, but that don't work. I like how you have covered a LOT of programming fundamentals. As a seasoned assembly language programmer it is hard some times to have the patience, but it is worth it to slow down and do this step by step. Thanks for your vids!
The way the blinking text is handled feels "cute", in a way! Just adding multiple of the same value in an array to make a certain color last longer and whatnot, it just feels nice and tangible! c:
well, i wanted to follow the next tutorial as always, and then you explained how to create modes. It made me excited about the possibilities and caused me to spend half a day coding random menus lol
In the old days of writing games in C I had a text file called "gameframe" that contained this sort of basic user interface ("any key to start"/"play again") and so on. When I started something new, I'd save it under a new name and edit the bits that were unique (game name and eventually graphics and such). I wonder if we could do this in pico-8?
:( was sad when the last eps doggy zone wan't followed up on. I saw the coolest effects messing with the lines that made me wonder if thats how things are made to look 3D. Anyway now my fastest stars have cool little purple trails. This episode was a tough one. I kind of get the tables and how they work. But creating a new one on my own i still get stumped on a little and i couldnt work out how to use one to put multiple sprites on the start screen, so for now i just did 4 spr's for each one in the start screen code. Can't wait to see how to do it properly in a later lesson. I love trying to guess how to do things too. I think i learn more when i mess up n break stuff as it makes it easier to understand why some things are done one way and not another and vice versa. This is cool af.
Yeah sorry we won't be following up on every Doggie Zone challenge. But we will have multiple bullets soon! Don't worry about the Tables. We will do them a lot. They will eventually make sense.
Pico-8 boot sound is the juice.. super minor - On this episode you dont really introduce the "+=" syntax (33m) in the Blink function .. you do later in series though.
To always perfectly center text what you do is set the x to width/2 - text.length*2 and just set the y to whatever you need So basically function center_text(text, y, col) print(text, (64-(#text*2)), y, col) end
Love the videos! I got a suggestion: let the guys following along making a shmup take gifs of their work and show them off in the video. Would be fun to see what they come up with 🙂
Yeah that would be great. It's a bit difficult to pull off right now because the episodes are being pre-recorded by a month. But I have an idea how we can get to see everybody's creations. Stay tuned!
Hey man, i love your tutorials. wanted to say that you can add "---tab name" (- - - Tab Name) instead of "--tab name" at the beggining of a new tab and it will display the tab name when you hover over the tab.
proxima vez que voce for fazer um tutorial coloque isso no episodio 1 porque isso trouxe erros pa caramba pramin tive que ver o video varias fazes pra ajeitar
It is called a tutorial. It is made up of many different elements and all of them are equally important. For example I am an artist. Planning composition, colour choices and framing is essential before I put brush to paper.
@@coachtomas It's a tutorial for learning the wrong way to make games - peripheral stuff that's entirely irrelevant. I speak from experience, my abandoned projects archive is full of logos, intros, menus, and credit rolls, but very few actual games. Learn to make the game first, then worry about the periphery.
@@hyperteleXii Well watch a different tutorial then. Clearly you are the one doing things wrong here, as you say you have lots of uncompleted works. Whereas I have seen dozens of great games come as a result of these tutorials. Facts don't lie. Creative processes are not a race to the finish line, they take patience. I also have experience, I have been an artist for 45 years, with the last 10 being a paid artist.
For those interested... You can do the following to let Pico 8 do the math to center the text (or even a sprite, or shape) by doing the following:
LOCAL TITLE="MY AWESOME SHMUP"
LOCAL TX=(128-(#TITLE*4)/2
PRINT(TITLE,TX,yy,cc)
Here's what's happening:
Your text, "MY AWESOME SHMUP" is now a string. The # symbol in front a string label will return it's length. 128 is the width of the screen in pixels. In MOST cases (any of the Picoscii symbols are excluded) the text characters are 4 pixels wide. So you take the screen width (128) and subtract the length (#) of the string (TITLE) which is multiplied by 4 (the pixel width of the text characters) and that result is then divided by 2 finding the starting X coordinate to make your text nearly perfectly centered. You can also use this same formula for the Y axis or even to center a sprite.
I was resisting that comment. I fear that I come off as overly critical of this fantastic resource.
ADDENDUM: It looks like I dun goofed up and used += without explaining what it does. Well, it's basically a shorter way to add something to a variable. So x+=1 is a shorthand for x=x+1 . I will come back to this topic in a later video.
Thank you for clarifying. I came here seeking that explanation. I thought it was a typo at first :)
I keep trying to use ++ and -- LOL.
I love when every episode of Lazy Devs tutorials starts with the Pico-8 boot sound! As we say in Italy It's the icing on the cake"!!!
*the whole cake
wait but dont u say it like this "🤌itsa🤌the🤌icing🤌on🤌tha🤌cake🤌🤌🤌🤌"
I've been trying to teach myself game design for a while, but I always found myself getting stuck and having to start over. I'm 9 episodes in of this now and have been taught the knowledge I need to find and fix bugs myself (sometimes with help from the discord but still). Thank you so much
This tutorial has been so great! I was able to complete all of your doggie mode challenges before the video even ended. Tried to post a GIF, but that don't work. I like how you have covered a LOT of programming fundamentals. As a seasoned assembly language programmer it is hard some times to have the patience, but it is worth it to slow down and do this step by step. Thanks for your vids!
The way the blinking text is handled feels "cute", in a way! Just adding multiple of the same value in an array to make a certain color last longer and whatnot, it just feels nice and tangible! c:
well, i wanted to follow the next tutorial as always, and then you explained how to create modes. It made me excited about the possibilities and caused me to spend half a day coding random menus lol
Happy to hear that! Seems like I did my job!
In the old days of writing games in C I had a text file called "gameframe" that contained this sort of basic user interface ("any key to start"/"play again") and so on. When I started something new, I'd save it under a new name and edit the bits that were unique (game name and eventually graphics and such). I wonder if we could do this in pico-8?
Yeah you can do that with the include feature. But that's something for the advanced tutorial
:( was sad when the last eps doggy zone wan't followed up on. I saw the coolest effects messing with the lines that made me wonder if thats how things are made to look 3D. Anyway now my fastest stars have cool little purple trails.
This episode was a tough one. I kind of get the tables and how they work. But creating a new one on my own i still get stumped on a little and i couldnt work out how to use one to put multiple sprites on the start screen, so for now i just did 4 spr's for each one in the start screen code. Can't wait to see how to do it properly in a later lesson. I love trying to guess how to do things too. I think i learn more when i mess up n break stuff as it makes it easier to understand why some things are done one way and not another and vice versa.
This is cool af.
Yeah sorry we won't be following up on every Doggie Zone challenge. But we will have multiple bullets soon! Don't worry about the Tables. We will do them a lot. They will eventually make sense.
Pico-8 boot sound is the juice..
super minor - On this episode you dont really introduce the "+=" syntax (33m) in the Blink function .. you do later in series though.
Argh! Are you sure? Bummer!
To always perfectly center text what you do is set the x to width/2 - text.length*2 and just set the y to whatever you need
So basically
function center_text(text, y, col)
print(text, (64-(#text*2)), y, col)
end
Thanks. Yeah I probably should add the center text function.
this is the best shmup tutorial
your lecture is awesome😂
Yay proud to be on the new supporter shout out 👏 Love this series so far 🤌
Love the videos! I got a suggestion: let the guys following along making a shmup take gifs of their work and show them off in the video. Would be fun to see what they come up with 🙂
Yeah that would be great. It's a bit difficult to pull off right now because the episodes are being pre-recorded by a month. But I have an idea how we can get to see everybody's creations. Stay tuned!
That would be cool. But my game pocket rocket would likely be NSFW as my ship bears a striking resemblance to a....well, a StarForge logo.
You didn't explain += I'm not sure whether you explained that before
The narrator somehow has a James Bond villain voice.
Yes, very reminiscent of dr. Strangelove.
Hey man, i love your tutorials.
wanted to say that you can add "---tab name" (- - - Tab Name) instead of "--tab name" at the beggining of a new tab and it will display the tab name when you hover over the tab.
Thanks! I don't quite understand what you mean. The comment seems scrambled up. Can you elaborate?
@@LazyDevs hes saying that you can put brackets before and after
@@LazyDevs i sent you a twitter mp with a picture, english is not my main language and sometimes its get hard for me to explain things haha
proxima vez que voce for fazer um tutorial coloque isso no episodio 1 porque isso trouxe erros pa caramba pramin tive que ver o video varias fazes pra ajeitar
It is a beginner tutorial so I can't start with something abstract and technical like a state machine
I have a question for you:
What is you native language?
Let me guess....
Spanish maby?
Nope
@@LazyDevs Oh, well I fail.
So, what it is? If you want to tale me, if not, no.
yes multiple bullets! I'm so excited!
Oh nose! Jacx is not "Jack-X" but more like "Jacks"... 😀
I understand your pain
Nine episodes in and you're still making everything EXCEPT the game. What's next, intro screen? Credits roll?
MAKE THE GAME.
2:01
It is obviously part of the game :)
It is called a tutorial. It is made up of many different elements and all of them are equally important. For example I am an artist. Planning composition, colour choices and framing is essential before I put brush to paper.
@@coachtomas It's a tutorial for learning the wrong way to make games - peripheral stuff that's entirely irrelevant. I speak from experience, my abandoned projects archive is full of logos, intros, menus, and credit rolls, but very few actual games. Learn to make the game first, then worry about the periphery.
@@hyperteleXii Well watch a different tutorial then. Clearly you are the one doing things wrong here, as you say you have lots of uncompleted works. Whereas I have seen dozens of great games come as a result of these tutorials. Facts don't lie. Creative processes are not a race to the finish line, they take patience. I also have experience, I have been an artist for 45 years, with the last 10 being a paid artist.