[{"data":1,"prerenderedAt":388},["ShallowReactive",2],{"nav-pages":3,"footer-socials":160,"$nLR9CPt1-i":183,"projects-boids":204},[4,127],{"id":5,"title":6,"body":7,"crumbs":115,"description":119,"extension":120,"icon":117,"meta":121,"navigation":122,"path":123,"seo":124,"stem":125,"__hash__":126},"pages\u002Fpages\u002F1.index.md","Home",{"type":8,"value":9,"toc":109},"minimark",[10,15,19,24,27,61,64,96,99,103],[11,12,14],"h1",{"id":13},"my-portfolio","My Portfolio",[16,17,18],"p",{},"Hi there, welcome to my portfolio website.",[20,21,23],"h2",{"id":22},"who-am-i","Who am I?",[16,25,26],{},"I'm George, a software engineer with an interest in self-hosting, programming, and hardware.",[16,28,29,30,37,38,43,44,49,50,55,56,60],{},"I studied BSC Computer Science at ",[31,32,36],"a",{"href":33,"rel":34},"https:\u002F\u002Fwww.cardiff.ac.uk\u002F",[35],"nofollow","Cardiff University",", the projects I did during my time there can be found on my ",[31,39,42],{"href":40,"rel":41},"https:\u002F\u002Fcode.ggrainger.uk\u002Fggrainger?tab=repositories",[35],"Forgejo"," or ",[31,45,48],{"href":46,"rel":47},"https:\u002F\u002Fgithub.com\u002Frandomman552",[35],"GitHub"," though I have migrated most of these to my self-hosted Forgejo instance. For my dissertation I created a website to show sensor information in Cardiff University's new Abacws building, which you can see the code for ",[31,51,54],{"href":52,"rel":53},"https:\u002F\u002Fcode.ggrainger.uk\u002Fggrainger\u002FAbacws-Data-Vis",[35],"here"," or my deployment of ",[31,57,54],{"href":58,"rel":59},"https:\u002F\u002Fabacws.ggrainger.uk\u002F",[35],".",[16,62,63],{},"In my spare time I maintain a Linux server in my house, on which I self-host a couple of things including:",[65,66,67,76,88],"ul",{},[68,69,70,71],"li",{},"My own personal cloud storage using ",[31,72,75],{"href":73,"rel":74},"https:\u002F\u002Fnextcloud.com\u002F",[35],"NextCloud",[68,77,78,79,83,84],{},"My ",[31,80,82],{"href":40,"rel":81},[35],"code"," using ",[31,85,42],{"href":86,"rel":87},"https:\u002F\u002Fforgejo.org\u002F",[35],[68,89,90,95],{},[31,91,94],{"href":92,"rel":93},"https:\u002F\u002Fheadscale.net\u002Fstable\u002F",[35],"HeadScale"," for easy, self-hosted VPN access",[16,97,98],{},"In my spare time, I also write some code for Arduino's here and there, the connection between software and hardware is always fun to play with. I work for a company based in North Yorkshire that makes robotic automation systems, so I've got to work with some really cool hardware.",[20,100,102],{"id":101},"what-is-this-site-for","What is this site for?",[16,104,105,106,60],{},"I wanted a place to write about interesting projects I've worked on, here it is. You can check them out ",[31,107,54],{"href":108},"\u002Fprojects",{"title":110,"searchDepth":111,"depth":111,"links":112},"",2,[113,114],{"id":22,"depth":111,"text":23},{"id":101,"depth":111,"text":102},[116],{"name":6,"icon":117,"href":118},"material-symbols:home-rounded","\u002F","Welcome to George's portfolio website","md",{},true,"\u002Fpages",{"title":6,"description":119},"pages\u002F1.index","iJZaQtML6AUZWO7oOxOQo8ckoA7ZFdLQwhAci4MVMik",{"id":128,"title":129,"body":130,"crumbs":150,"description":154,"extension":120,"icon":153,"meta":155,"navigation":122,"path":156,"seo":157,"stem":158,"__hash__":159},"pages\u002Fpages\u002F2.projects.md","Projects",{"type":8,"value":131,"toc":148},[132,135,138,145],[11,133,129],{"id":134},"projects",[16,136,137],{},"My recent projects can be found below.",[16,139,140,141,144],{},"Can't find anything that interests you? Check out my ",[31,142,42],{"href":40,"rel":143},[35]," for some other things I've made that didn't make the cut (or that I haven't finished).",[146,147],"card-project-grid",{},{"title":110,"searchDepth":111,"depth":111,"links":149},[],[151,152],{"name":6,"icon":117,"href":118},{"name":129,"icon":153,"href":108},"material-symbols:deployed-code","View my projects here",{},"\u002Fpages\u002Fprojects",{"title":129,"description":154},"pages\u002F2.projects","ZvgQ8iafkO8Vo_2oMkyd_n-BCCp-tAooB16GjR_rLf4",[161,169,175],{"id":162,"extension":163,"icon":164,"link":165,"meta":166,"name":42,"stem":167,"__hash__":168},"socials\u002Fsocials\u002Fforgejo.yml","yml","devicon-plain:forgejo","https:\u002F\u002Fcode.ggrainger.uk\u002Fggrainger",{},"socials\u002Fforgejo","eLo2tedWGBfxJY_VmYmV0uFkIDhRuQvm4fmj_5QD7f0",{"id":170,"extension":163,"icon":171,"link":46,"meta":172,"name":48,"stem":173,"__hash__":174},"socials\u002Fsocials\u002Fgithub.yml","mdi:github-box",{},"socials\u002Fgithub","umA4vGSgNhkainXfqvtesFnwEcchjMuYOaVvJl409do",{"id":176,"extension":163,"icon":177,"link":178,"meta":179,"name":180,"stem":181,"__hash__":182},"socials\u002Fsocials\u002Flinkedin.yml","mdi:linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fgeorge-grainger552\u002F",{},"LinkedIn","socials\u002Flinkedin","bTHOxI-WAMN6H2Ub1ipKl89w3nM34aSFOrB4ziV6Nhc",{"id":128,"title":129,"body":184,"crumbs":199,"description":154,"extension":120,"icon":153,"meta":202,"navigation":122,"path":156,"seo":203,"stem":158,"__hash__":159},{"type":8,"value":185,"toc":197},[186,188,190,195],[11,187,129],{"id":134},[16,189,137],{},[16,191,140,192,144],{},[31,193,42],{"href":40,"rel":194},[35],[146,196],{},{"title":110,"searchDepth":111,"depth":111,"links":198},[],[200,201],{"name":6,"icon":117,"href":118},{"name":129,"icon":153,"href":108},{},{"title":129,"description":154},{"id":205,"title":206,"body":207,"coverImage":378,"description":379,"extension":120,"liveDemo":218,"meta":380,"navigation":122,"ogImage":381,"path":382,"publishedAt":383,"seo":384,"sourceCode":385,"stem":386,"__hash__":387},"projects\u002Fprojects\u002Fboids.md","Boids Simulation",{"type":8,"value":208,"toc":369},[209,213,220,225,229,237,241,244,247,274,277,285,288,292,299,308,312,315,318,322,325,359,363,366],[20,210,212],{"id":211},"demo","Demo",[16,214,215,216,60],{},"A video demonstration of the simulation in action can be seen below. To try it out yourself, click ",[31,217,54],{"href":218,"rel":219},"https:\u002F\u002Fggrainger.epicpages.dev\u002Flibgdx-boids\u002F",[35],[221,222],"prose-video",{"alt":223,"src":224},"Video of the simulation in action.","\u002Fvideos\u002Fprojects\u002Fboids\u002Fdemo.mp4",[20,226,228],{"id":227},"project-goals","Project Goals",[16,230,231,232,60],{},"In this project, I produced a Boids simulation using the libGDX framework.\nThis project was inspired by a similar project developed by Sebastian Lague, which can be found on ",[31,233,236],{"href":234,"rel":235},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=bqtqltqcQhw",[35],"YouTube",[20,238,240],{"id":239},"what-are-boids","What are Boids?",[16,242,243],{},"Boids are an algorithmic approach to simulation of flocking behaviour such as that found in flocks of birds or schools of fish.",[16,245,246],{},"They achieve this by following a series of simple rules which are defined in the report above\nand are as follows:",[248,249,250,258,266],"ol",{},[68,251,252,253],{},"Collision Avoidance\n",[65,254,255],{},[68,256,257],{},"Avoid collisions with nearby flock mates.",[68,259,260,261],{},"Velocity Matching\n",[65,262,263],{},[68,264,265],{},"Attempt to match velocity with nearby flock mates.",[68,267,268,269],{},"Flock Centering\n",[65,270,271],{},[68,272,273],{},"Attempt to stay close to nearby flock mates.",[16,275,276],{},"These are in order of decreasing precedence,\nmeaning that Collision Avoidance is the most important, and Flock Centering is the least important.",[16,278,279,280,60],{},"The Boids algorithm was originally developed by Craig Reynolds in 1986, for more information see this Wikipedia ",[31,281,284],{"href":282,"rel":283},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FBoids",[35],"article",[16,286,287],{},"In addition to the basic Boids algorithm, this simulation also implements a simple obstacle avoidance system using raycasting to detect and avoid obstacles.",[20,289,291],{"id":290},"libgdx","libGDX",[16,293,294,298],{},[31,295,291],{"href":296,"rel":297},"https:\u002F\u002Flibgdx.com\u002F",[35]," is a cross-platform Java game development framework that works cross platform on Windows, Linux, macOS, Android, iOS, and browsers.\nUnlike game engines such as Unity, libGDX is only a framework. It doesn't enforce much in the way of structure, instead expecting you to build out your solution as you see fit.\nIt handles rendering, input, audio, and includes Box2D for physics.",[16,300,301,302,307],{},"I used libGDX on a ",[31,303,306],{"href":304,"rel":305},"https:\u002F\u002Fcode.ggrainger.uk\u002Fggrainger\u002Fcm2305-group-11",[35],"previous group project"," at university and was familiar with it at the time I made this project, which made it the obvious choice.",[20,309,311],{"id":310},"spatial-partitioning","Spatial partitioning",[16,313,314],{},"To improve performance of this boid implementation, we make use of spatial partitioning.\nThis prevents us from having to loop over every other boid, per boid, for each frame.\nInstead, each boid may simply loop over it's list of neighbours for force calculations.",[16,316,317],{},"This implementation uses the underlying Box2D physics engine with sensor fixtures so that boids can only \"perceive\" other boids that are within a certain radius of them.",[20,319,321],{"id":320},"configuration","Configuration",[16,323,324],{},"The simulation can be dynamically configured using a series of tools built into the simulation UI, the following tools are available:",[65,326,327,335,343,351],{},[68,328,329,330],{},"Force Configuration\n",[65,331,332],{},[68,333,334],{},"Configure the scalar for each of the three boid rules\u002Fforces.",[68,336,337,338],{},"Debug Overlay\n",[65,339,340],{},[68,341,342],{},"Includes overlays to view the underlying physics engine, and forces acting on each boid.",[68,344,345,346],{},"Boid Spawner\n",[65,347,348],{},[68,349,350],{},"Create and remove boids from the simulation.",[68,352,353,354],{},"Obstacle Spawner\n",[65,355,356],{},[68,357,358],{},"Create and remove obstacles from the simulation.",[20,360,362],{"id":361},"results","Results",[16,364,365],{},"The simulation works well for a few hundred boids, but performance with large number of boids could be improved.\nThere are a couple of ways to improve performance.\nWe could offload the boid calculations to separate threads, or even create a GPU compute shader to handle the calculations for us (which would be significantly faster).",[16,367,368],{},"LibGDX is a great framework, but it's not as widely used as more popular game engines.\nIn a future project, I would like to explore using other engines such as Unity, Unreal, or Godot to see what I'm missing.",{"title":110,"searchDepth":111,"depth":111,"links":370},[371,372,373,374,375,376,377],{"id":211,"depth":111,"text":212},{"id":227,"depth":111,"text":228},{"id":239,"depth":111,"text":240},{"id":290,"depth":111,"text":291},{"id":310,"depth":111,"text":311},{"id":320,"depth":111,"text":321},{"id":361,"depth":111,"text":362},"\u002Fimages\u002Fprojects\u002Fboids\u002Fcover.png","Implementing a Boids simulation to model flocking behavior using LibGDX.",{},null,"\u002Fprojects\u002Fboids","2026-08-02 15:56:00",{"title":206,"description":379},"https:\u002F\u002Fcode.ggrainger.uk\u002Fggrainger\u002Flibgdx-boids","projects\u002Fboids","h74L8CFRmKaWv4k0auVJPPEk3FRYXnbGSLmypdd6jl4",1785882542391]