ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Ray Casting Through a Spatial Hash Grid (C++ Space Arcade Game Update 2)

Автор: enigma tutorials

Загружено: 2020-01-25

Просмотров: 1720

Описание: The tech I'm developing to cast a ray/line through my spatial hash system. The ray calculates all the spatial hash grid/voxels that it intersects. This returns a list of grid nodes. It is optimized to only return grid nodes for which there actually exists

This will be used to determine which grid nodes a projectile is potentially colliding with.

full playlist:    • Spatial Hashing (C++ Space Arcade Game Upd...  

Recorded 06-18-19
0:00 projectile model
0:55 test firing projectile in game
1:49 framerate hitch space skipping issue
2:48 spatial hash line trace test bed

My spatial hash grid has the ability to look up collision shapes within a given spatial hash cell.
But I did not really have the ability to easily query a line of individual cells.
If I wanted to trace a line through the spatial hash, I would need a shape encompassed the entire line.
This was extremely wasteful, as it would include a lot of insignificant cells (imagine a big box around the line trace).
So I wrote code that determines which cells the line passes through.
I can then run a special query only for those cells, which is much faster than a large box overlap.

The goal of this this ray casting system is assist projectiles.
Since projectiles are moving very fast, there is the potential that they may skip space if there is a large delta time.
But I can determine the line representing the projectile's movement since the last frame.
I can use this line to figure out which cells it intersects, and query those cells to see if any ships are within that portion of the grid.
If this line then also intersects any shapes contained within a cell, then it should process that as a collision.

This game is open source and not commercial.

Current libraries:
glm math library
glfw for window abstraction
glad for opengl function mapping
assimp for parsing model files
stbimage for image loading
imgui for debug GUI
nlohmann/json for json parsing and serializing in c++

rendering API is OpenGL 3.3

Update:
game released, play here: https://enigma-tutorials.itch.io/spac...
Disclaimer:
Opinions are my own and not associated with my employer.

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Ray Casting Through a Spatial Hash Grid (C++ Space Arcade Game Update 2)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Editor UI and Level systems (C++ Space Arcade Game Update 3)

Editor UI and Level systems (C++ Space Arcade Game Update 3)

Spatial Hash Grids & Tales from Game Development

Spatial Hash Grids & Tales from Game Development

Coding Challenge 145: 2D Raycasting

Coding Challenge 145: 2D Raycasting

Quirky Quad Trees Part1: Static Spatial Acceleration

Quirky Quad Trees Part1: Static Spatial Acceleration

How to use Unreal's Gameplay Framework to speed up Game Dev - UE C++ Tutorial

How to use Unreal's Gameplay Framework to speed up Game Dev - UE C++ Tutorial

RUST: Язык Программирования, Который ЗАМЕНИТ C и C++?

RUST: Язык Программирования, Который ЗАМЕНИТ C и C++?

Принц Персии: разбираем код гениальной игры, вытирая слезы счастья

Принц Персии: разбираем код гениальной игры, вытирая слезы счастья

I Optimised My Game Engine Up To 12000 FPS

I Optimised My Game Engine Up To 12000 FPS

ЧТО СКРЫВАЮТ РАДИОВОЛНЫ?

ЧТО СКРЫВАЮТ РАДИОВОЛНЫ?

SIGGRAPH 2022 - Advances in Spatial Hashing

SIGGRAPH 2022 - Advances in Spatial Hashing

Зачем Зеленскому война с Беларусью?

Зачем Зеленскому война с Беларусью?

11 - Нахождение столкновений среди тысяч объектов с невероятной скоростью

11 - Нахождение столкновений среди тысяч объектов с невероятной скоростью

Meshtastic в России: законно ли использовать?

Meshtastic в России: законно ли использовать?

Моделирование столкновений зданий: введение в компьютерную графику

Моделирование столкновений зданий: введение в компьютерную графику

Пожалуй, главное заблуждение об электричестве [Veritasium]

Пожалуй, главное заблуждение об электричестве [Veritasium]

Сверхбыстрое проецирование лучей в тайловых мирах с использованием DDA

Сверхбыстрое проецирование лучей в тайловых мирах с использованием DDA

Самая Сложная Задача В Истории Самой Сложной Олимпиады

Самая Сложная Задача В Истории Самой Сложной Олимпиады

Никон требует у Китайцев последнее, Кодак возвращает свое, 180МП Фудж, и АФ GFX Китайцы, Leica ОД48

Никон требует у Китайцев последнее, Кодак возвращает свое, 180МП Фудж, и АФ GFX Китайцы, Leica ОД48

Сделал визуализацию 4D, 5D, 6D. Как выглядит 6D мир?

Сделал визуализацию 4D, 5D, 6D. Как выглядит 6D мир?

Слабый ноут теперь ТОП игрушка! Как установить ChromeOS и получить ВСЁ!

Слабый ноут теперь ТОП игрушка! Как установить ChromeOS и получить ВСЁ!

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]