This was seriously one of your best and most helpful tutorials so far. I knew maps were arrays, but it didn't click with me that I could access or modify them like this. Thank you!
@GamingMonsters6 жыл бұрын
I know it's one a lot of people have been waiting for. Some games actually keep a second array of 1s and 0s as a "collision map" but I like this approach more.
@cozymonk3 жыл бұрын
@@GamingMonsters The collision map sounds like a more comprehensive solution, though. You can have textured tiles without collision. Like grass or stone patterns or whatever.
@cozymonk3 жыл бұрын
so, I've been making my own game and using collision maps is the way to go. I have more than one map per level: one for collisions and one for water for the player to fall into. It's super easy to just load a new array for a different level without having to worry about adding tilesets to the if statements for more variety in ground textures.
@localhost78355 жыл бұрын
Thanks for the great tutorials and effort you put into it! Instead of manually defining the coordinates for the key and door locations, I think it's easier to just check for the background tile value. This will also work with a different maze, since the values are not hardcoded anymore. eg. ... if (MazeMap[tileindexTL] == 2) { //Key haskey = 1; set_bkg_tiles(indexTLx, indexTLy, 1, 1, 0); return 1; } if (MazeMap[tileindexTL] == 3) { //Door if (haskey) { set_bkg_tiles(indexTLx, indexTLy, 1, 1, 0); return 1; } else return 0; } ...
@UgoRaffaelePiemontese5 жыл бұрын
I agree.
@Matheus-mf9nz4 жыл бұрын
Thanks for doing all this. This converter tool of yours is absolutely awesome! You're the best, man.
@yovarniyearwood5 жыл бұрын
The reason for the 8,16 offset is so you can partially display sprites on the screen!
@vriska2225 жыл бұрын
or entirely offscreen
@erich37843 жыл бұрын
small thing: when you declare blankmap, now you have to specify that the char is unsigned, otherwise it will not compile. const unsigned char blankmap[1] = {0x00};
@lt.schlechtnacht94143 жыл бұрын
How are games like super mario advanced 3 programmed. they are very colorful and it doesnt seem like those games use tiles
@corradotrigilia69895 жыл бұрын
hello sorry, it is literally 2 days that I try to understand your reasoning, which in the end is more than correct but I have a completely different map (with only the walls as a contour) and with my collision algorithm does not completely work. Instead I have only tried to recreate a map that is not the same but very similar to yours (the starting point is the same) and everything works perfectly! and I don't understand why
@corradotrigilia69895 жыл бұрын
UPDATE.: okay then, after making appropriate tests, I realized that everything works only if I set the position of the Character in the upper left corner, while if I set it in other points of the map the algorithm does not behave as it should
@jermsworms98002 жыл бұрын
Whenever I change backgrounds It keeps the collisions of the old screen.
@ombradiluce82895 жыл бұрын
Great tutorial, thanks.
@usman0604f4 жыл бұрын
Dear, please code a complete game in which background scroll as player move to , nd different enemy sprite also present.
@nicktube4143 жыл бұрын
Is better to have collectible objects as part of the background or as sprites?
@GamingMonsters3 жыл бұрын
As they are likely to not need to independently move Id say background also removes any limit of sprites
@nicktube4143 жыл бұрын
@@GamingMonsters so object like your example are better to have them in the background. But objects you can interact with like carry them across the map are to have them as sprites? Also thank you for your answer
@GamingMonsters3 жыл бұрын
Yes in principle that’s right
@plainlazy20975 жыл бұрын
This channel is amazing!
@ZombieNW5 жыл бұрын
I am doing a platformer and don't want just a floor, how could I make platforms and collide with (land on) them? Please and Thank You
@GamingMonsters5 жыл бұрын
Doing the complete physics for a platformer is hard. Hopefully I’ll do a future video on it but it won’t be soon sorry
@ZombieNW5 жыл бұрын
@@GamingMonsters Thanks! Can't wait!
@EdvinDraw4 жыл бұрын
Hi! Some of your tutorials are great, but I have a question about how to detect some tiles, if they are 16 x 16 pixels, instead of 8 x 8 pixels?
@kevinwallace37393 жыл бұрын
instead of if(tileIndexTL == XXX) maybe try if(tileIndexTL == XXX || tileIndexTL == YYY || tileIndexTL == AAA || tileIndexTL == BBB) for the four sprites that make up a 16 x 16. it'd be slightly different for a 16x16 made up out of 2 8x16s. I'm new to programming in C, but I am pretty confident this is the approach. there might be another way if you are trying to work with metasprites but this way should also still work. However when it comes to using debug with 16 by 16 i'd have to think more on how to adapt his implementation to structs. Edit: just noticed this is a year old, if you solved it already, sweet! if not, hopefully this resparks interest or something lol
@SammyForReal5 жыл бұрын
can you also show us how the whole thing works without an 8x8 grid? i found a way but it was very laggie D:
@GamingMonsters5 жыл бұрын
I gave up trying it was just too slow
@SammyForReal5 жыл бұрын
OK, thanks anyway
@RAFMnBgaming Жыл бұрын
"and then we're going to divide..." *stares*
@vriska2225 жыл бұрын
My animate sprite just doesnt work, at least the animation part. It still moves but completely skips the animation. Im certain there is no misspellings. Edit: it does not show debug either
@llawliet54345 жыл бұрын
Two questions Could you do an gameboy advance programming after you are finished with this series? And could you do banking in the near future?( Sry if i have already asked you this question, also sry that my english isnt the best, im from germany)
@GamingMonsters5 жыл бұрын
Take a look at kzbin.info/www/bejne/iJuTnZlqa86foMU for a new gba series. Rom banking is on my list to do so subscribe and keep an eye out for it in future
@llawliet54345 жыл бұрын
GamingMonsters thank you very much sir Your my hero