doc_robs
doc_robs
  • Видео 24
  • Просмотров 87 224
Developing a Pico-8 game from scratch - Part 5
Part 5 of the series of videos looking at building a Pico-8 game from scratch.
As promised, this is the video detailing collisions and, as a consequence, is longer than most. I go through the basics of hit_box collisions and look at integrating that into the main game loop.
Просмотров: 2 467

Видео

Working with the palette functions in Pico-8
Просмотров 2,1 тыс.5 лет назад
This video looks at the two palette functions pal() and palt() to allow you to control colours and transparency.
Developing a Pico-8 game from scratch - Part 4
Просмотров 1,5 тыс.5 лет назад
The fourth in a series of videos looking at completing a video game in Pico-8. This video looks at adding some more objects to the game (this time asteroids). It shows that, once you have the basics in place, you can quickly add all sorts of objects to your game. The next video deals with collisions - that'll be the big one!!
Developing a Pico-8 game from scratch - Part 3
Просмотров 1,9 тыс.5 лет назад
The third in a series of videos looking at completing a video game in Pico-8. I go through the various thought processes involved with taking lots of ideas to a finished game. In this video, I look at creating bullets by using tables the create objects. I also get stuck trying to debug problems with the code!!
Developing a Pico-8 game from scratch - Part 2
Просмотров 1,9 тыс.5 лет назад
This is the second in a series of videos looking at completing a video game in Pico-8. I go through the various thought processes involved with taking lots of ideas to a finished game. In this video, I look at getting the background star field scrolling down the screen.
Developing a Pico-8 game from scratch - Part 1
Просмотров 4,3 тыс.6 лет назад
This is a first in a series of videos looking at completing a video game in Pico-8. I go through the various thought processes involved with taking lots of ideas to a finished game. In this video, I look at getting the player sprite moving around the screen.
Converting between pixels and a tile grid in Pico-8
Просмотров 1,3 тыс.6 лет назад
This short tutorial looks at using the floor function flr() to calculate the grid reference of an object when you know its position in pixels. It also looks at how to then convert this back to the pixel location of the grid reference.
Pico-8 Collisions with background tiles using fget and mget
Просмотров 8 тыс.6 лет назад
A tutorial that looks at using the fget and mget functions to allow collisions with a tiled background.
Adding forces to you games - mainly gravity!
Просмотров 1,3 тыс.6 лет назад
How to implement forces in your games. This tutorial mainly looks at gravity, but touches on forces in all directions. I also look at air resistance and bouncing off edges and starts to cover how to get an object to jump.
Collisions in Pico-8 using the hit_box() function
Просмотров 6 тыс.6 лет назад
This video builds on the previous video which looked at the hit_box() function to actuall implement pixel-perfect collisions for you games. This is done in Pico-8, but it could be implemented for any programming language as it is the method that is important.
Scrolling backgrounds in Pico-8 (Parallax scrolling)
Просмотров 4,2 тыс.6 лет назад
This tutorial explands of the first one (ruclips.net/video/wFJqmqzwOxo/видео.html) and looks at adding parallax scrolling to you game. This is a great way to simulate depth in a game. Again, I should mention that if your map is wider than 16 tiles, you should adjust the value of 128 accordingly. So, for example, if your map is 20 tiles wide, you would replace 128 with 160 (i.e. 20x8).
Scrolling backgrounds in Pico-8
Просмотров 5 тыс.6 лет назад
Putting in place a simple scrolling background for a Pico-8 game. This video looks at a simple technique for having an endless scrolling background in your game. It's worth me mentioning that if your map is wider than 16 tiles, you should adjust the value of 128 accordingly. So, for example, if your map is 20 tiles wide, you would replace 128 with 160 (i.e. 20x8).
A collision function for Pico-8
Просмотров 8 тыс.6 лет назад
This video looks at how to write a function that can be used for collision detection in Pico-8. It makes use of bounding boxes to return true or false depending on whether two boxes overlap. The code is found here: gamedev.docrobs.co.uk/first-steps-in-pico-8-hitting-things (I can't post the full code as RUclips doesn't allow greater than or less than signs)
Managing Game State in Pico-8
Просмотров 2,6 тыс.6 лет назад
Keeping track of game state (menu, game over, splash screen, etc) can be tricky. This video give you an easy way of doing this using variables for _update and _draw that are called for each state. I use a table to store the variables but, for the token-conscious amongst you, you could just use variables. See my blog for a more detailed description: gamedev.docrobs.co.uk/game-state-in-pico-8 The...
Easing Functions in Pico-8
Просмотров 1,8 тыс.6 лет назад
This tutorial runs through easing functions and how to incorporate them in Pico-8. Easing functions allow non-linear movement between two locations (or, indeed, non linear actions in general). The tutorial uses the library of easing functions available here: www.lexaloffle.com/bbs/?tid=32124 Simply copy the easing function from the second tab, or the specific easing function from the third tab ...
Creating objects using tables in Pico-8
Просмотров 9 тыс.6 лет назад
Creating objects using tables in Pico-8
Dealing with the edge of the screen in Pico-8
Просмотров 1,3 тыс.6 лет назад
Dealing with the edge of the screen in Pico-8
Using random numbers in Pico-8
Просмотров 1,6 тыс.6 лет назад
Using random numbers in Pico-8
Animating sprites in Pico-8
Просмотров 12 тыс.6 лет назад
Animating sprites in Pico-8
Diagnosing and fixing errors in Pico-8
Просмотров 1,3 тыс.6 лет назад
Diagnosing and fixing errors in Pico-8
Drawing a map background in Pico-8
Просмотров 5 тыс.6 лет назад
Drawing a map background in Pico-8
Drawing shapes to the screen in Pico-8
Просмотров 1,3 тыс.6 лет назад
Drawing shapes to the screen in Pico-8
Moving an object in Pico-8
Просмотров 2,1 тыс.6 лет назад
Moving an object in Pico-8
Setting Up a Pico-8 Project
Просмотров 1,7 тыс.6 лет назад
Setting Up a Pico-8 Project

Комментарии

  • @chichibek
    @chichibek 2 месяца назад

    Thank you very much. I am very happy with the time and the teaching style.

  • @dieterhorvat5176
    @dieterhorvat5176 8 месяцев назад

    This is an excellent video! This perfectly explains something I've been having trouble with!

  • @SybilGrace
    @SybilGrace 10 месяцев назад

    Lovely video. Very helpful.

  • @llpBR
    @llpBR 11 месяцев назад

    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 11 месяцев назад

    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

  • @bubblesaurbubble
    @bubblesaurbubble Год назад

    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 2 года назад

    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 2 года назад

    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 2 года назад

    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 2 года назад

    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 2 года назад

      It's just a generic variable to allow the For loop to happen. It effectively stores which corner you are looking at.

    • @thejuicebox6470
      @thejuicebox6470 2 года назад

      @@docrobs so like a counter variable/sentinel?

    • @docrobs
      @docrobs 2 года назад

      @@thejuicebox6470 Yes, but it does represent more than simply a counter as it stores either x (left) or x+w (right).

  • @mirp124
    @mirp124 2 года назад

    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 2 года назад

    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

  • @divtag1967
    @divtag1967 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 RUclips 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 3 года назад

    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.

  • @jizza09
    @jizza09 3 года назад

    The fget doesnt work when i print it, it always says 0

    • @docrobs
      @docrobs 3 года назад

      You have set the flags for each sprite haven't you?

    • @jizza09
      @jizza09 3 года назад

      @@docrobs yes, I tried every flag and they were all 0

    • @kittyn5222
      @kittyn5222 2 года назад

      @@jizza09 I am getting a similar problem it's not showing the flag it just says nil

  • @ricardovelazquez7017
    @ricardovelazquez7017 3 года назад

    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 3 года назад

      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 3 года назад

      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

  • @2000hertz
    @2000hertz 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!

    • @2000hertz
      @2000hertz 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!

    • @2000hertz
      @2000hertz 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!