Game
Robot Unlock
13 years ago

OpenCL Experiments


<div class=”separator” style=”clear:both;text-align:center;”>

</div>While there are many applications (not necessarily scientific ones) for OpenCL and the technology has been available for some years, I have yet to see any piece of software that took advantage of this. There aren’t even many tutorials and books on OpenCL. Now, I’m no expert but I thought I could make some OpenCL demos and share them on Github. Here’s what I have so far:

Simulation of repulsive particles - similar to the n-body problem, except here all particles want to stay apart and all particles are attracted to just one. This makes them chase each other which results in some neat patterns and dynamics.Hillclimbing! - the hillclimbing algorithm is a very simple stochastic optimization algorithm. The algorithm can be described as follows: a dwarf is placed in the search space (the hills). The dwarf chooses a random direction and goes that way as long as he keeps climbing, after which he chooses another direction and does that until he’s on top of the hill. Obviously the hillclimbing algorithm is prone to getting stuck in local maxima, but that’s where OpenCL comes in to save us: initialize N parallel hill climbers (dwarves) from random positions in the search space. Thus, we get N local maxima, one of which is the global maxima (hopefully).Particle Swarm Optimization (actually Parallel Asynchronous PSO) - I’ve already covered PSO in this online demo and extensively in my Bachelor’s graduation thesis and Gloptat. PAPSO is more suitable for the GPU since synchronizing “threads” is costly. There is also no clear disadvantage in using asynchronous PSO and there are even scientific studies that show how reliable PAPSO is. PAPSO is even closer to what it simulates, to the natural model.Shadow demo - it’s just a little demo showing a simple way to compute shadows using rays. It also shows how you can have more than one kernel on the same context/queue and that they can use the same allocated global memory without issues.



0 comments

Loading...

Next up

"Thanks guys for endless hours of fun." 👍

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

Shoobies leave a sticky trail of mucus in their wake, which can impede movement for any creature that steps in it.

Today I was setting up the location of the first boss. His name is "Father" and he is the first of the Patagonians. His task is to guard the road to the House.🛡🗡 Bookmark pre-launch page🔖🔖🔖

https://www.kickstarter.com/projects/rdvindiegame/the-patagonian…

Protege el conocimiento, salva la historia. Guardian of Lore es un platformer 2D en el que debes luchar para mantener viva la memoria de la mitología latinoamericana. El juego llegará a Steam el 18 de mayo: https://steam.pm/app/1211740 #ScreenshotSaturday

Sometimes the suction cup get sticky. Small animation I made in Blender after doing my tutorial on picking up/dropping objects in animations. Crate model by jQueary (https://sketchfab.com/3d-models/game-ready-sci-fi-crate-d98deca6…).

Finished work on the emotions of a new character for the tank universe

My D&D art for my family so far (WIP if you couldn't tell)

I mostly build 3D First Person Shooter game mechanics in Unity, and in this I'm just showing C4 mechanics I made for a little side project I am working on! :)

Explosive domino effect

Only true badasses may pass! #conceptart #art #gamedesign