Тёмный

Strato Freaks 2 (Dev Log 7: Hitbox Viewer) 

SuperFreaksDev
Подписаться 228
Просмотров 63
50% 1

In order to do a lot of weird things in this game I had to completely ignore a lot of Game Maker's default stuff and write my own instead. I've turned the hitbox viewer on so you can see some of this in action. Here's what the different colors mean:
- Red are hitboxes. This is an improved system over the custom hitboxes used in Super Freaks 1 Ultimate Edition. If you've used Game Maker you know that object collisions are usually done by giving two objects a sprite mask and making a collision event for when they overlap. For this game, I had to write my own event system using structs, which was really hard to do and I don't know if I can explain how it even works! It's a miracle that it runs as well as it does. I also have currently two hitbox types: AABB (rectangles that you can't rotate, basically), and capsules (which can conveniently be sized down into circles). Honestly, this might be all I need--I sure hope it is, anyway.
- Blue is the "wrap area" around something. This is the area that is checked to see if something is looping around the edges of the level. With this I can check if things are touching each other around the edges, or I can see if something is on both edges of the screen and I'll need to draw it twice to make the looping effect look seamless.
- Yellow is spawning. This is probably the trickest bit to explain but I'll do my best. Basically, a lot of code in this game can get pretty intense, so you want to run it as little as possible so the game won't lag. This is why you'll see a lot of older games "despawn" or remove something if it moves offscreen. In those same games, you'll probably notice that if you walk offscreen just enough and go back, that thing will appear again. There are actually two lists storing the positions of everything in the level; the x list stores the horizontal positions of everything and is sorted from left to right; the y list stores the vertical positions of everything and is sorted from top to bottom. When the screen overlaps one of these positions, it will spawn whatever thing is at that position. Level objects will despawn themselves off screen (unless I flagged them not to). This ensures that only a fraction of the things in the level are active at a time. I have also written up a new "micromanager" system. You'll probably notice some yorbs spinning around a central point with a yellow line connecting to the middle. These yorbs have assigned themselves to be "subordinates" of an invisible "micromanager" object. I currently have a "zone" micromanager which is just an invisible rectangle, and a "rotate" micromanager that loops through its list of subordinates and rotates them around itself at a speed that I can set. By the way, not everything is added to the spawn lists; the players and anything created after the level was first loaded (usually stuff like bullets) are not added to said lists.
Whew! That was a lot. As you can see by those spider enemies being a bit buggy still I have some work to do, but I think I'm getting somewhere finally.

Игры

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

 

8 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
How We Beat The Password Game
15:38
Просмотров 8 млн
A Word Game Where The Main Character Can't Read
6:22
Просмотров 436 тыс.
Wait for the BOWLING BALL! 👀
00:38
Просмотров 18 млн
If UNDERTALE played ROBLOX (Animation)
46:02
Просмотров 1 млн
The Windows XP Frog Mystery…
11:44
Просмотров 115 тыс.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Every Mario Game but You Can't Press A
27:29
Просмотров 346 тыс.
Can you fit a whole game into a QR code?
20:03
Просмотров 8 млн
Destroying Brain Age With Image Recognition
8:02
Просмотров 54 тыс.
2DROTS vs RISENHAHA! КУБОК ФИФЕРОВ 2 ТУР
11:31
КРАФТИМ НЕМЛЕС ФРАГМЕНТЫ
1:5:04
Просмотров 255 тыс.
Как я играл в Chernobylite
1:17:07
Просмотров 490 тыс.