Posts

Showing posts from 2021

Semantic versioned Unity package template

As software developers, reusability is very important to speed up future development, continuously improve existing modules, promote decoupling. We had some manual process for reusing and importing existing packages we developed, but Unity is going towards a Node oriented package management system, and we decided to adopt this new way of packaging our modules in Unity. Not only did we want to create Unity packages quickly with a template, but also be able to do automatic semantic versioning, and force commit message format. That's why I put up this Unity package template with semantic versioning and commit lint integrated into it. Now we can just create a new repo using this one as a template (or forking it), and we have a nice quick start for our new packages. https://github.com/tuttocodes/Package-template Because I used Github, I created a Github Actions workflow in order to execute the semantic versioning when pushing to develop branch, but this is something that needs to be upd...

(coming soon) My first C++/OpenGL game engine (attempt...)

Overcooked VR remake - Proof of concept

Image
Another small project for masters degree. This time we had to design a VR experience, and of course this was a great opportunity to create a game! Discussed with my teammate what the topic could be, and after a while we decided to do a VR remake of Overcooked. For those of you who don't know overcooked, here's a sample gameplay video: Overcooked is meant to play in local coop mode, and has some very simple mechanics. But because of level design and the nature of cooperation, everything bursts into chaos and it's so much fun! For our VR experience we wanted to recreate part of the main cooking mechanics, but of course we wouldn't implement any multiplayer features because of time constraints (just a few weeks, and not full time). Dev challenges The pot Pot was involved in multiple mechanics as it's one of the central parts of the game. User needs to: Grab the pot by its handles. Put ingredients in it. Put it on the stove and detect an active fire to trigger the cooki...

(coming soon) CUDA parallel programming

Hogan's Alley VR adaptation

Image
This was a task for the computer graphics and VR masters degree. We got some assets for some of the characters in Hogan's Alley, and had to do a simple shoot to win experience. I already had a lot of experience with Unity and VR, so decided to take it 10 steps further. Not much dev time put into this, but the experience was smooth, and more importantly... so much fun! Many of my friends tried it and played it once and again trying to beat the record. Downloaded all the missing assets from the internet and created this VR adaptation of the game. I really tried to make it feel the same way as the original by adding even the shot missed sfx and background effects! Laser pointer is not retro at all, but it would be too difficult to aim without it, and I wanted to keep the experience casual. Feel free to take the source from my  Github repo  and build it for Oculus Quest. Difficulty increases while the game progresses, at the end it gets really difficult. Number of enemies that are...

State machine AI + pathfinding - python

Image
Programming task for the AI course, we had to implement a simple game with FSM AI, pathfinding, and random map generation. Python and PyGame were used in this case. Wrote a simple and classic game loop that updates and render the game: Even if being a simple game, tried to keep each logic separate and neat. The game entity had some simple methods, including the update and render methods which draws everything in the world: All this logic could be easily be used in some other engine for generating maps and enemy AI. Visually it doesn't look so good, but focus was on the logic. Here's the result: Simple game with smooth experience, poor visual feedback, but implementing things like map generation and A*(once again!) feels really nice!

Tempin - detective game

Image
Back in 2014 I got my first job in a videogame company, Kef Sensei . Core team was formed by a 2D artist, 3D and technical artist, game designer and a developer (guess who!). Company got funding and assembled a lean team for the development of a 3D game that mixed up virtual characters and real world environments. Something like the Space Jam movie, but with 3D characters. This game was targeting mainly iPad and other mobile devices. Real world environments For the environment generation there was a separate team that would take pictures of different scenarios and got multiple angles for each of them. Our technical artist would then create some 3D planes and other shapes were he would project the 2D pictures. By creating different shapes at multiple depths, we could hide a virtual character behind 'real world' objects. We had no internal tools or asset integration pipeline at the time, everything was brand new. Because of that I had to create my first ever Unity custom window, ...

Milico en el centenario

Image
Back in 2014 I was working in the videogame industry and had gained some more experience with Unity. From time to time I made some prototypes or some very specific scripts solving a problem just for fun. One day, while watching the most important soccer match in Uruguay, there were some violent incidents during the match. This happened most of the times these teams played each other, so it was no surprise that it happened again. But then I thought  'hey, I could make a game about this!'. Pretty controversial topic I know, but I found our game idea really funny in my early 20s. Here's the news from that time, pretty sad that this kind of things still happen from time to time: But back then I just wanted to make something awesome and that everyone would get to know in my country, so we teamed up with my roommate who is a graphic designer and always liked games as well. We discussed different types of games and mechanics, but we needed to keep it simple otherwise it would be t...

Convex hull 2D - python

Image
Made some convex hull algorithm implementations for my masters in computer graphics. Algorithms were implemented using Python and visualized with PyGame. After learning and manually executing the algorithms in the whiteboard during class, I followed Wikipedia's pseudocode to write my Python implementation. Created a simple game loop to render the current progress of the algorithm, but the algorithm was running too fast to see anything. So I had to execute the algorithms in a separate thread and expose its state to the main thread. After I got that working, I just made the algorithm thread sleep for a while after every new finding, and that made the trick. Here's how they look! Implemented algorithms: Gift wrap Graham scan Quickhull Fun Sunday afternoon with some cool nerd stuff :D

(coming soon) Our AR final degree project

Height maps and procedurally generated terrain topology

Image
This was one of the most instructive exercises I had to do back in 2012. After learning theory about the 3D graphics pipeline and how data was structured in memory, we were asked to read a height map and create a textured terrain out of it. Some configuration was needed like min and max height of the terrain, in order to interpret full black or full white accordingly, and also the separation between vertices. In this case the size of the terrain was defined by the resolution of the height map and the separation between vertices parameter. I created a vertex for each texel in the heightmap, calculated it's UV coordinates, and later assembled the triangles that formed the mesh, accounting for winding order because of face culling. This task was just awesome, being able to operate with vertex and index buffers directly was like a new superpower to me, and it was some really useful knowledge in the years to come. There are so many improvements that come to mind now that I look at it, l...

Diving deeper into 2D

Image
 Next course was about 2D and generic gameplay programming, using C# and XNA, which was a thing at the time. For this course we didn't have any strict requirements for the game, only use everything that we learnt during the course. We decided with my friend to make a 2.5 beat 'em up prototype to put our knowledge to the test. Here's what we had learned during the course: Simple dialog system that showed/hid sprites during it's execution. Sprite animations with sheets. Scrolling. LERPing (manually, no tools, I realize now we implemented our own tweener) UI Sounds Probably some other things that I can't remember now And so we started looking for some nice assets, and found some cool Wolverine spritesheets, which weren't nicely packaged, so I had to manually cut them and paste them, and use a special tool for sprite animations to set the times and preview the animation. Spent so much time fixing the positions and offsets of each frame, until it kinda looked good. W...

My beginnings!

Image
I started studying software engineering in 2008, having grown up playing some really awesome NES and PC titles. I'm from a small city in Uruguay and it was very hard and expensive to get a SNES or N64, so I just dreamt with those. Super Mario, Commandos, Age of empires, Half life, Half life 2, Half life 3, oh no, wait... "How was all of this possible? I need to know how this is made..."  And there I was, learning how to code the very basics. After 3 years of learning I had the opportunity to take on my first videogame development course, I was SO excited, that was why I was there after all. We used C# and Blitz3D. C# because we were very familiar with it, and Blitz3D, well, I guess because it was something that we could use with C#. We learnt the basics of writing a game loop and updating and rendering our game. Made a small game in 2D and then jumped into 3D. These games were developed in teams of 2 people, but I was so motivated that I'm sure I knew all the code inv...