Тёмный

Making a Roguelike #5 - Wall Collision - Pico-8 Hero 

Lazy Devs
Подписаться 19 тыс.
Просмотров 16 тыс.
50% 1

Опубликовано:

 

26 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 44   
@mathaeis
@mathaeis 5 лет назад
If you want to be super lazy with the bump animation, ignore the mov_bump function in the last half of this video and just change tab 4 line 14 from p_sox,p_soy=dx*8,dy*8 to p_sox,p_soy=dx*4,dy*4. It doesn't look as smooth, but it still fundamentally works, which I thought was pretty neat if you are totally out of tokens.
@exploreworlds5998
@exploreworlds5998 5 лет назад
Thank you very much for making this tutorial series Another possibility for the bump animation that saves a little bit of tokens is: local tme = 0.5-abs(0.5 - p_t) p_ox,p_oy = p_sox*tme, p_soy*tme
@LazyDevs
@LazyDevs 5 лет назад
That is a cool use of ABS!
@Kulpo
@Kulpo 3 года назад
I think using min makes it more clear: local tme = min(p_t,1-p_t)
@springogeek
@springogeek 5 лет назад
With the flipping, you could save 5 tokens by saying "p_flip = dy != 0 and p_flip or dx < 0", rather than using an if statement to set true or false.
@LazyDevs
@LazyDevs 5 лет назад
Wait, is that the weird pseudo-terniary?
@springogeek
@springogeek 5 лет назад
@@LazyDevs it is, yes. I wish lua had a real tertiary but there we go.
@CharlesRubach
@CharlesRubach 5 лет назад
I added that to my code plus I learned something new. I saved 16 tokens. Thanks!
@JaapRood
@JaapRood 5 лет назад
@@LazyDevs It's just logical operators, right? But I guess with those you can write expressions that sort of look like a terniary operator.
@DeepFriedOreoOffline
@DeepFriedOreoOffline 4 года назад
I have already posted on this video, just rewatching the first bit to stay motivated as I re-setup the base of my project because I have some extra UI stuff I wanna add but messed up on. Well, I got it right the first time, but didn't index my array properly. Then I realized the array thing, but I had changed a lot of the code and now it just straight up returns errors, so back to the start line lol. I am making it so my inventory window shows 6 items, and scrolls through the list. It's actually really easy so I am sad I had the issue with the arrays and messed the code up lol.
@LupinosLionheart
@LupinosLionheart 3 года назад
Thank you so much. 4th episode today. That`s enough for one evening/night. ^^
@LazyDevs
@LazyDevs 3 года назад
You're welcome 😊
@DeepFriedOreoOffline
@DeepFriedOreoOffline 4 года назад
Edit: I had a long thing here about how to change the movement system to make it work better, but it actually works fine and I am just silly. Optionally, if you have the space, you can add in a check within each of these branches that checks if that input's opposite is also being pressed, and do nothing. This will make it handle basically exactly like most gameboy RPGs.
@LazyDevs
@LazyDevs 4 года назад
I cannot reproduce this error. The function won't trigger two button presses because once the first successful button press is registered, the update function is set to UPDATE_PTURN and the loop is interrupted with a RETURN.
@DeepFriedOreoOffline
@DeepFriedOreoOffline 4 года назад
@@LazyDevs Yes, actually I started the project over from the ground up to really get a grip for what you were showing, and I think the issue is that I must have forgotten the return statements the first time 🤣 I just left this here because of the second part. With your system the controls are uniquely separate, but I am still adding the functionality of, for example, if both left and right are down, instead of still moving left he just doesn't move. Which is only slightly helpful, with a btnp you can hold it and it will eventually move continuously, so if you hold left or right, then hold the other, instead of moving left it stops. Of the player never holds a button they will never know so it's not a huge deal lol, I just am a fan of gameboy controls.
@ghoom
@ghoom 4 года назад
3:35 mickey mouse says "woo crazy!"
@rafaelballarin9969
@rafaelballarin9969 5 лет назад
Awesome tutorial, thanks for it!
@ka-50withsaams36
@ka-50withsaams36 5 лет назад
This is really helpful, Thanks!
@jo-ellenphilander1230
@jo-ellenphilander1230 4 года назад
My mov_bump() animation is incredibility fast, changing the timer(p_t) does not slow it down. Any suggestions?
@KrystianMajewski
@KrystianMajewski 4 года назад
Maybe some typo somewhere? Post the code in the Discord if you want a person to look at your code.
@hapz_6636
@hapz_6636 5 лет назад
you could have used sine for the bump anim,so it just walks forward and walks back
@LazyDevs
@LazyDevs 5 лет назад
I could, but I wanted a sharp change from forward to backward. Sine has a smoother curve that doesn't look like impact.
@VillianousJ0ker
@VillianousJ0ker Год назад
Hey, So I started following these tutorials recently, but when I try to add a trigger to change rooms, the collision stays the same as the first room, is there any way to fix this?
@LazyDevs
@LazyDevs Год назад
That depends on your implementation of changing rooms - post you code in the Discord
@michaellanier7783
@michaellanier7783 2 года назад
You could also just play a sound if you hit a wall? Although, I like the idea of the animation.
@LazyDevs
@LazyDevs 2 года назад
We'll also play a sound, don't worry
@mateosaldivarcuetofelguero8328
@mateosaldivarcuetofelguero8328 3 года назад
I found that reducing the dx*8 to dx*3 had a similar effect for 40 less tokens :)
@LazyDevs
@LazyDevs 3 года назад
Similar effect to what?
@mateosaldivarcuetofelguero8328
@mateosaldivarcuetofelguero8328 3 года назад
@@LazyDevs Hello! I love your videos :) I've learned so much, what I meant is that by using the same walking animation function but changing the 8 to 3 in the pixel adjustment to tile made a similar animation to bumping into a wall without using two separate functions (it might not be the best way in the long run I just thought it would help optimize a little), again thank you for the classes, I hope I can make a small game from scratch and show it to you one day
@LazyDevs
@LazyDevs 3 года назад
@@mateosaldivarcuetofelguero8328 Oh, I see. Hmm, weird. I'll try it out, thanks for the suggestion!
@brandonphilander661
@brandonphilander661 5 лет назад
I am using a 16x16 sprite but only the first sprite in the upper left of the four sprites collide with the walls, the other three walks into the walls. How can I fix this. Thanks
@LazyDevs
@LazyDevs 5 лет назад
Hey Brandon. This is probably not the answer you want. But I would strongly recommend sticking with 8x8 sprites for this tutorial. A bigger sprite will pretty much break every part of this series for various reasons. This is a very demanding course as it is.
@brandonphilander661
@brandonphilander661 5 лет назад
@@LazyDevs Thanks man.
@stefoster7031
@stefoster7031 5 лет назад
Just wondering, regarding the flip thing, if P_FLIP is global why do you bother to pass it as a function parameter?
@stefoster7031
@stefoster7031 5 лет назад
Acutally I've just realised, so that you can call the function for different spirtes. Nice.
@LazyDevs
@LazyDevs 5 лет назад
@@stefoster7031 You got it!
@JoseSantos-bl9fk
@JoseSantos-bl9fk 3 года назад
Dude idk whats going on but my character is stilll interacting with the walls, can someone help me pls?
@LazyDevs
@LazyDevs 3 года назад
Join the discord and post your code. Or simply download my code from the video description and keep using this.
@JoseSantos-bl9fk
@JoseSantos-bl9fk 3 года назад
@@LazyDevs ty man, i hope that will do the trick
@ghoom
@ghoom 4 года назад
20:12 gamer sex education
@thelazyguy3735
@thelazyguy3735 2 года назад
29:11 programmer moment
@LakituStar
@LakituStar 4 года назад
6:46 did he fart?
@LazyDevs
@LazyDevs 4 года назад
LOL I wouldn't put it beneath me. I have needs too. :) But in this case I think it's just the cellphone vibrating on the desk.
Далее
Making a Roguelike #7 - Text Boxes - Pico-8 Hero
35:27
Wait for it 😂
00:19
Просмотров 3 млн
Three NEW MAPS in Update 0.31.0 Nightmare | Standoff 2
01:48
Making a Roguelike #8 - Message System - Pico-8 Hero
52:23
Making a Roguelike #10 - Mob System - Pico-8 Hero
30:23
The Trick I Used to Make Combat Fun! | Devlog
8:12
Просмотров 1,7 млн
Breakout #6 - Collision -  Pico-8 Hero
30:08
Просмотров 16 тыс.
Making a Roguelike #14 - HP Display - Pico-8 Hero
27:01
8 Reasons We Love PICO-8 [2021]
13:48
Просмотров 112 тыс.
I built my own 16-Bit CPU in Excel
15:45
Просмотров 1,5 млн
Harder Drive: Hard drives we didn't want or need
36:47