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

Short intro of us 💕✌️

We're an eletro duo based in Seoul 🇰🇷 Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era 💽 CD listenin 📟 beeper beepin 💾 floppy disks floppin days 😎

Stream now! 🎧

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqU…

Did you know that today is #InternationalJazzDay? 🎷😎

No? 😯 Well, we couldn't pass up this date!

And what better to celebrate this day than #Pecaminosa #OST? 🎷

Let us know what you think about it and have a great weekend!

We made a lot of improvements on the Freezing Plains visual. Things like pine trees, tiny bushes, some rocks, and others game props!

#IndieGame | #IndieDev | #GameDev | #PixelArt | #WaifuQuest | #WifeQuest | #screenshotsaturday

I-Buki

Mio-Da!

Ibuki Mioda!

Today I tackled drawing different variations of facial expressions for one of the main characters in Eden. What do you think of it? :) Eden: https://gamejolt.com/games/Eden/592698

Szayel Aporro Granz - Bleach

Super Sonic Pixel art.

Pigs can push buttons for you!

#gamedev #pixelart #screenshotsaturday

Don't forget to wishlist Toodee and Topdee on Steam!

https://store.steampowered.com/app/1303950/Toodee_and_Topdee/

:] me sigue sin gustar

:] I still don't like it