Vector2 Point versus Border Collisions > 2D

Very simple example to demonstrate the use of Vector2 points to check for collisions of a moving rectangle inside a border rectangle. Four Vector2 points are created for each corner of the rectangle, if one exits the border rectangle then the movement direction changes. View on Github

Before you start
I am a self taught Go programmer and do it as a hobby, the code below is my own interpretation of how to do something, probably not the only way or the best way. This is intended as a resource to learn some basic Raylib and Go game dev skills. If you want to use any of the code anywhere else, feel free to do so.

Making Games with Go(lang)

So, I am a (self taught) web designer and after a few years I got pretty bored of HTML and CSS and decided to learn another language. After messing around with a few things I stumbled across Go and have been trying to learn it ever since. Originally, the idea was just to use it as an easy way of coding a remake of the classic DOS game Rogue in the terminal (ASCII art) as it was something I had always wanted to do. Go, if you weren’t aware, is not a language originally intended for games development, more for servers and web development and things like that (I think). However, it was (for me) a pretty easy language to learn when compared to others that I tried and it seems you can make games with just about any language these days.

From there, via the Awesome Go list, I discovered the Go bindings for Raylib, which basically allows you to make games with 2D and 3D graphics using Go. This has pretty much turned into my hobby over the past few years and so I will be sharing a few things I have learned along the way that should (hopefully) help you if you are interested in giving it a go (excuse the pun). Just note, that this is purely hobby stuff and Go is (almost) definitely not the right languge to start with if you are planning to get into game dev as a career. However, if you are just wanting to make some pretty graphics appear on screen that you can move around without having to spend years learning a more complex language then Go is a pretty easy to learn and use.

Hidden Gem & Underrated Games

It happens to everyone, you have a long day at school or work, get home and sit down to play a game and then think, ‘I don’t have anything to play’ so here are some ideas for games you may not have played. I have played every game myself on the list below, and IMO (in my opinion) these are all definitely worth playing.