I’ve been developing an application in C++ with minimal dependencies to track recurring meetings and I’d like to cover a solution I developed to handle database operations.
My company has structured weekly meetings per department, and currently tracks them using Word documents - each week when a new meeting starts, the document from the last week is duplicated and completed tasks/items are removed manually. This leads to a ton of duplicated files, no easy way to view specific tasks or recurring tasks, and is a lot of manual processing that’s repeated every week.
Just a quick post here to show how useful Lerp can be.
For those that don’t know, Lerp is short for Linear Interpolation. It is used to calculate a value some percentage of the way between two numbers.
inline real32 Lerp(real32 A, real32 B, real32 Amount) { real32 Result = (1-Amount) * A + Amount * B; return(Result); } You know how in part 9.1 I was doing all this weird math by hand trying to change the base of some numbers?
This post is going to be a little different; I’m going to be writing this as I’m working through an issue. This will allow me to show a lot more detail as I’m working on things. I spent about 10-15 hours on this post and I definitely learned a lot through many face-palm moments, and will be telling you about all of them.
The Issue The current way we are generating asteroids occasionally causes some asteroids to spawn inside of eachother.
What I’ve been doing Feel free to skip this section if you only care about the project itself!
Since I ‘ended’ this project in Part 8 (August 2020, ~6 months ago), I feel like a lot has happened, but really not much has. I started and stopped the OMSCS program; which in hindsight might have been a mistake.. However now I’ve learned that grad school is for suckers, just build cool stuff!
Back in February of this year, I applied to Georgia Tech’s OMSCS program (Online Master of Science in Computer Science). Sometime over the summer, I got accepted and registered for my first course. Then in late August, the course started and was going fairly well; then by the start of October, I dropped out.
This post is to analyze my thoughts and emotions going through this process and why I made the decisions that I did.
End of the series for now It’s been a while since my last post, and this will be the end of the series here with the possibility of coming back to it later. The last couple of months I haven’t worked on this project very much at all - the only thing I really did was put together more collision detection which I will go over here.
I’d like to announce that I will be starting the OMSCS (Online Masters of Science in Computer Science) program through Georgia Tech this fall (starting next week).
We left off from part 6 with a few priorities, and the first one I started with was creating a mini ray tracer, though I’m not sure if it can be called a ray tracer. What I’m trying to do is draw a line from the player in the direction they are pointing and collide this line with the bounds of the window. I figured this would be a good exercise to learn a bit more about vectors and the calculations behind them, and this post will go into detail on how I implemented it each step of the way.
For the past couple of weeks, my work has started to pick up and I’ve been a bit discouraged for this project because I’ve somewhat coded myself into a corner. I didn’t make as much progress as I would have liked, but I learned a lot and continue to learn just how much I don’t know. (Also, thanks to Forestry.io, I lost about 2 hours of writing out the first half of this blog post - so here it goes again…)
I’ve been feeling a lot less motivated for this project lately, mostly because I’m not sure what I’m doing. I try to fight through those thoughts and learn things as I go, but it is tough to even get started when you don’t know where to start. I’m also realizing that some decisions I have to make soon are going to impact things later, and I’m getting a little stuck trying to make the correct decision up front - but that’s now how things should go.
Picking up right where we left off, I am starting on the player’s movement. Remember that in the game of Asteroids, our player is simply a triangle in the center of the screen and our only movement is rotation.
At the end of Part 3, I mentioned that my first attempt will be to initialize an array of static positions that I would then use to cycle through from the players input.
I’ve done a lot of things since the last post, so I apologize in advance if this post jumps around in topics, but I’ll try to keep it as organized as I can.
To pick up from where we left off from Part 2, I started drawing a tile map and I attempted to get some simple collision detection - getting the containing tile from any point on the grid. That wasn’t quite working, and I believe this was because the math done in the GetTileAtPosition() call.
Fortunately early on I am realizing we need some sort of coordinate system - otherwise, how would we know where anything is at any given time? This will be used to draw the map of where the game is played and for collision detection.
The first step I took towards doing this was just to visualize what our coordinate system might look like, so I drew a grid over the whole screen, looking something like this:
Heavily inspired by the Handmade Hero series, I’ve decided I’m going to re-create Asteroids from scratch. This was recommended by Casey Muratori (the Handmade Hero host) as a great first project to learn some the fundamentals of game development without an engine. Asteroids gives us a little bit of everything when it comes to what a game engine needs to do: drawing to the screen (not just rectangles, but oddly shaped asteroids), player movement/rotation, collision detection between bullets, asteroids, and the player, and I’m sure a bunch more.
My first post seemed kind of dreary, so I’d like to address that and try to analyze it.
My current theory is it has to do with self-confidence. A part of me feels that I’m somehow unable to accomplish what I set out to do; it’s too hard, or too big a project, or too much work - but that’s not true. If I had the self-confidence - the mindset that “Yes, I can do this” - then it would be much easier to get moving.
For the past year or so, I’ve been developing my website BowlingHub. It’s in a fairly stable state, but there may still be some bugs here and there. I use it to track all of my bowling scores for all my leagues throughout the year. I’m still the only user, but that’s ok since I’ve never advertised it, or even told my bowling friends about it. It’s a good project, but I really need to move on.