Тёмный
doc_robs
doc_robs
doc_robs
Подписаться
Комментарии
@dieterhorvat5176
@dieterhorvat5176 5 месяцев назад
This is an excellent video! This perfectly explains something I've been having trouble with!
@SybilGrace
@SybilGrace 8 месяцев назад
Lovely video. Very helpful.
@llpBR
@llpBR 8 месяцев назад
Excelent stuff here! I'm new to Pico8 and I'm really loving it. But guys, I really don't understand the reason people uses multiple multiplications like x*x*x instead of x ^ 3. Is there any reason?
@sippysipsip
@sippysipsip 8 месяцев назад
where'd you go..?
@funniestmanalive221
@funniestmanalive221 Год назад
for someone who is brand new to pico-8 you've done a great job explaining it and helping me get an understanding of the program. Great job.
@delstuff
@delstuff Год назад
Used your code for my single screen platformer game. Many Thanks 👍
@guilhermemouraleite7373
@guilhermemouraleite7373 Год назад
Does anyone know if pico8 had any updates that make this code a little broken? I have the exact same code and the sprites with the same flags, but my character randomly changes direction even if I don't press any button, it looks like it "collides" with blank spaces on the map and then goes on a different axis. Here's the code: grid_x=0 grid_y=0 flag_tile=0 x=63 y=63 dx=0 dy=0 function _update() grid_x=flr(x/8) grid_y=flr(y/8) flag_tile=fget(mget(grid_x,grid_y),0) if btn(0) then dx=-1 end if btn(1) then dx=1 end if btn(2) then dy=-1 end if btn(3) then dy=1 end if hit(x+dx,y,7,7) then dx=0 end if hit(y+dy,x,7,7) then dy=0 end x+=dx y+=dy end function _draw() cls() map(0,0,0,0,16,16) spr(2,x,y) print(grid_x..","..grid_y,5,5,7) print(flag_tile,5,11) end function hit(x,y,w,h) collide=false for i=x,x+w,w do if fget(mget(i/8,y/8))>0 or fget(mget(i/8,(y+h)/8))>0 then collide=true end end return collide end
@Axuko
@Axuko Год назад
amazing tutorial
@TacoLover20718
@TacoLover20718 Год назад
Hey uhhh doc robs how do u even make backgrounds?
@hectorluceslobo9789
@hectorluceslobo9789 Год назад
Thanks a lot such amazing to learn that
@ThePhantomBowtie
@ThePhantomBowtie Год назад
you are like the khan academy of Pico-8 tutorials
@deadgeo
@deadgeo Год назад
question how would you use the S variable when you are using an SSPR sprites I'm working on a thing in class so I don't have any audio
@xanderpixel281
@xanderpixel281 Год назад
Please write a book!
@xanderpixel281
@xanderpixel281 Год назад
I hope you make more of these too ! Thank you!
@DefaultChef
@DefaultChef Год назад
always makes me move without stopping and when i collide, i cant move at all to any direction that doesnt have a wall
@trouble6043
@trouble6043 Год назад
Great vid! I have one question, how do you make it for the up and down animations. I tried to make it with the same code just different animations, it didn’t work. Could you please help:)
@sawyergrimm287
@sawyergrimm287 Год назад
Thank you so much for this video! I deeply appreciate you explaining how to round it to an integer, this is exactly what I was looking for!
@stevesgaming7475
@stevesgaming7475 Год назад
Well I got to 2mins 20 before being utterly out of my depth. Was worth a look though but jeez I wish pico-8 had a built-in collision command (like detectSpriteCollision(sprite1, sprite2) and it returned true if there was a collision.) as it stands now, pico-8 is fun but collision is an utter nightmate and might be the one thing that stops me from making games in this. a pity
@thejuicebox6470
@thejuicebox6470 Год назад
Could someone explain what the `i` variable is for in the `for` loop? My code works, but I didn't catch him explaining it in the video.
@docrobs
@docrobs Год назад
It's just a generic variable to allow the For loop to happen. It effectively stores which corner you are looking at.
@thejuicebox6470
@thejuicebox6470 Год назад
@@docrobs so like a counter variable/sentinel?
@docrobs
@docrobs Год назад
@@thejuicebox6470 Yes, but it does represent more than simply a counter as it stores either x (left) or x+w (right).
@mirp124
@mirp124 Год назад
does anyone know how to make the loop longer? can I use the whole span of the x-axis of the map to create a longer loop? how do I do that in the code?
@salm0n_148
@salm0n_148 Год назад
thank you so much, you helped me a lot, thanks for taking your time to record such a great tutorial. awesome radio voice and audio btw
@LucidDream1967
@LucidDream1967 2 года назад
perfect ..thank you!! exactly what i needed=)
@bblevins
@bblevins 2 года назад
These are excellent videos!
@Alexxave32
@Alexxave32 2 года назад
super cool, made it seem simple and now I understand how not to change every color but only the one sprite I need
@nomukun1138
@nomukun1138 2 года назад
Random numbers were such a headache in NES games. Pseudorandom numbers are often calculated as a bit shifting and reordering operation, but you need to be extremely careful to use an operation that doesn't have any predictable results. Imagine if your random number generator always returned 4, then 6, then 1, 4, 6, 1, 4, 6, 1. That could be a disaster, if you want it to be unpredictable, or to produce every possible value. The original Final Fantasy hardcoded a list of a few hundred predetermined numbers, and calling the equivalent of rnd() just looked up the next value in that table; that was the most reliable solution the programmer came up with. PICO8 being emulated allows it to pull unpredictable values from the host system, so rnd() is incredibly easy and incredibly reliable.
@ruvalolowa_2110
@ruvalolowa_2110 2 года назад
one question: What is the game you showed first? Could you tell me?
@kittyn5222
@kittyn5222 2 года назад
My brain gave up immediately
@vadicanik
@vadicanik 2 года назад
Hey Doc, thank you for all your tutorials. You have a very clear and calm way of explaining things, please don’t give up on making these excellent Pico-8 tutorials! We are sorely lacking in excellent video tutorials for this wonderful software!
@callum_monk
@callum_monk 2 года назад
Please continue this, I found you while looking for background scrolling and find your videos very useful. Thanks a ton
@that_bean1793
@that_bean1793 2 года назад
Anyone know why mines saying self is a nil value?
@that_bean1793
@that_bean1793 2 года назад
Could you use btnp to space out the bullets?
@docrobs
@docrobs 2 года назад
Hi. Not really. BTNP reports TRUE only for the next frame after the button has not been pressed, so it reports FALSE for a button hold. You'd need to mash the button to have it use BTNP.
@kadandreatta9190
@kadandreatta9190 2 года назад
Thank you so much for your videos Doc! You've helped me so much in my game dev journey!
@AmritZoad
@AmritZoad 2 года назад
Sooo good!!!
@pjbeardsley
@pjbeardsley 2 года назад
Searched RU-vid to learn how to do this. This explained it perfectly. Thank you.
@Noh_Kinda
@Noh_Kinda 2 года назад
I really appriciate this video! I fixed my problem in a few moments.
@VileoSufora4
@VileoSufora4 2 года назад
Amazing tutorial, as always. I was coming into this thinking I'd know everything already, but I was entirely unprepared for being able to put FUNCTIONS into objects. Not that I'm an expert, but I had read the documentation and, as far as I could tell, it makes no mention of this function-ality (ha). I'm going to have to revamp a couple of my projects to use this knowledge now.
@gwk2856
@gwk2856 2 года назад
The fget doesnt work when i print it, it always says 0
@docrobs
@docrobs 2 года назад
You have set the flags for each sprite haven't you?
@gwk2856
@gwk2856 2 года назад
@@docrobs yes, I tried every flag and they were all 0
@kittyn5222
@kittyn5222 2 года назад
@@gwk2856 I am getting a similar problem it's not showing the flag it just says nil
@ricardovelazquez7017
@ricardovelazquez7017 2 года назад
Instead of adding values one by one all the time, you can check if the x+SPEED value is not going to collide and add the whole speed otherwise you add values one by one until you reach the collision point. Great tutorial!
@docrobs
@docrobs 2 года назад
Good idea!
@ravegames1003
@ravegames1003 3 года назад
Quick Question, what if i wanted to make a space shooter, and my ship is trying to move in a way where if i go right it goes to one sprite change of it turning left or right.
@docrobs
@docrobs 2 года назад
If you mean rotating a sprite, that's on a whole new level. You could draw several sprites or apply some maths to the whole thing but that's a whole new tutorial!
@Akita_NeruDen2
@Akita_NeruDen2 3 года назад
thank you so much for this this has help me make so many games.
@noobmaster6387
@noobmaster6387 3 года назад
I stopped being able to move as you did x y and d y
@kurczakokoko
@kurczakokoko 3 года назад
my map is larger than 127x127, i wanted to make my character stop when on the edge of the camera, but its stoping on the edge of the map tile please help
@nomukun1138
@nomukun1138 2 года назад
If you have a camera and a map, they each have their own coordinate system. You need to be careful to know when "x" refers to the map coordinates or the camera coordinates. I hope you managed to solve this on your own. Good luck in your future endeavors!
@bernard6552
@bernard6552 3 года назад
Hello is it possible to have the game cartridge? thanks
@calllen
@calllen 3 года назад
are you going to continue this
@Jake-zp4xg
@Jake-zp4xg 3 года назад
@doc_robs thank you for the wonderful tutorial series! However, I do have a question regarding collision. I have followed both this tutorial and the fget mget collision tutorial. I have attempted to combine the two but when I try to return the X, Y, W, H to the collision i am receiving runtime error at IF HIT(X+DX,Y,W,H) THEN. "ATTEMPT TO PERFORM ARITHMETIC ON GLOBAL 'X' (A NIL VALUE)". Is this because the object BULLET has no way to index values? Any help would be greatly appreciated. Cheers!
@Jake-zp4xg
@Jake-zp4xg 3 года назад
function _init() x=63 y=63 dx=0 dy=0 w=1 h=1 bullet={} end function _update() if btnp(🅾️) then add_new_bullet(2,0) dx=bullet.dx dy=bullet.dy x=bullet.x y=bullet.y w=bullet.w h=bullet.h end for b in all(bullet) do b:update() end if hit(x+dx,y,w,h) then dx=0 end if hit(x,y+dy,w,h) then dy=0 end x+=dx y+=dy end function _draw() cls() map(0,0,0,0,16,16) spr(2,x,y) for b in all(bullet) do b:draw() end end function hit(x,y,w,h) collide=false for i=x,x+w,w do if fget(mget(i/8,y/8))>0 or fget(mget(i/8,(y+h)/8))>0 then collide=true end end return collide end --bullet function add_new_bullet(_dx,_dy) add(bullet,{ x=63, y=63, w=1, h=1, dx=_dx, dy=_dy, draw=function(self) pset(self.x,self.y,7) end, update=function(self) self.x+=self.dx self.y+=self.dy end }) end
@docrobs
@docrobs 3 года назад
Hi, It could be that you have the function HIT running in the UPDATE function every turn but not specifically for an instance of BULLET. Try embedding the HIT function into the BULLET UPDATE function instead. There is a good chance that this might break things the first time you try it, so I would use the comments to delete code rather than actually deleting it, then you can roll back changes if it doesn’t work!
@Jake-zp4xg
@Jake-zp4xg 3 года назад
@@docrobs Thanks!
@wilsonfromwales
@wilsonfromwales 3 года назад
As I continue to learn PICO-8, I always come back to your videos as the best tutorials with the best explanations, and no time wasted. Thanks again!
@ossoace
@ossoace 3 года назад
Wow! I've been trying to do this!
@UnsensoredGaming
@UnsensoredGaming 3 года назад
This video isn’t very good you leave multiple things un explained
@tercoil
@tercoil 3 года назад
hey mate, loved all your videos. sad to see they seem to have ended, but i appreciate that you made them in the first place! Would love to see how you make a functioning game with different tabs for the init, update, draw!
@truckjumperdude
@truckjumperdude 3 года назад
Great video! Very easy to understand and implement into my game.