Hey there, Gamers and Game Makers! In this weeks blog, I'm going to be going trough five basic yet fundamental tips for writing better code. So, let's get right into it! #1 Be Mindful of VariablesKeep in mind that every time you create a variable, you a reserving space in memory for that variable. Any time you leave unused variables in your code, you are wasting memory. And while this may not seem like a big deal given how powerful computers have become, it's still bad practice and to be avoided. This also raises the point about needing to think more carefully about your variable declarations. Look at your variables and ask yourself, do I really need that variable there? Can I achieve the same result in my code without the need to store something in that variable. #2 Comment Your CodeWhile this may seem like an obvious one, even I still need to remind myself from time to time to comment my code. It's important from the obvious point of helping others you work with or someone who will have to manage your code at a later point to understand what your code is doing. Hell, even if you're the only one who will ever be looking at the code, it's important for you to remember what your code is doing. There's been plenty of times when I came back to old code I've wrote that I forgot to comment and the amount of time wasted in trying to understand what I did and why I did it. So, comment your code.Even if it's just for you. #3 Understand Your CodeThere's going to be times when you are faced with a problem with your code and you may need to seek out a solution online. You may get it working as you wanted but now you don't fully understand why it works. This becomes a short term solution to a long term problem. You won't always be able to do this. You may run into a similar problem later down the line but now, the code you used before doesn't work. You need to learn what your code is doing. If you don't understand a part of your code, take it and break that section down into the most basic example possible. Play around with it and understand what it's doing and more importantly why it does it that way. If you can understand what a line of code is actually doing, then you can better understand how to apply that to future problems. #4 Use Meaningful NamesWhen naming your variables, try to make them as meaningful as possible. Having abstract or nonsensical variables is asking for trouble. As your code grows, you're going to have more variables and if you start to get confused as to what a particular variable is used for, then you're going to run into a lot of errors. Make your names clear to the purpose the variable serve. #5 Don't Reinvent The WheelProgramming has been around a while now. So, needless to say there are already good solutions to common coding problems you will encounter. Use them! There's is no need to create extra work for yourself by trying to think of another way of solving said problem. Unless you can come up with a better way, use the tried and tested method. The only thing you need to be sure of is that you understand the method and the logic behind it.
Until next time! Hey there, Gamers and Game Makers! So, it's that time again. In a couple of weeks, I'll be returning to college for another year as a mature student. While admittedly it's not as daunting as last year, when everything was new and scary, it still means a big change once again for me and how I structure my work. Luckily the summer has been quite a productive period of time for me.The current game which I still won't be talking about in detail for some time is slowly emerging from the pre-production phase and the pre-alpha stage has begun. It's going to take some trial and error to figure out my new schedule for fitting in development in the evenings but, I already have a fairly good balance struck from when I was working on Hide The Body last time. I'm lucky enough in the sense that I've done enough games at this point to know the way I've scoped this project means it's manageable during the college year. As for the Game Dev book I'm writing. It's unfortunately taken a back seat for now. I've managed to get a good amount more done on it but, in order to do it properly, I need to allocate more time to it later. I'll continue to chip away at it over the course of the coming year and I hope to have it finished by the time I finish my degree In terms of blog posts for the coming year, I'm hoping to do something similar to before and share some of what I'm studying as I go and maybe something along the lines of "A day in the life of a dev" kind of thing. I'm also planning on starting up some Unreal Engine tutorials since that was something that was asked for in the past. I'll most likely focus on doing Blueprint tutorials for starters. I'm also going to re-do my C# coding series in video format over on Youtube as I think it's a tutorial series that would benefit more from a more detailed approach through my channel. That just about does it for now. As always, if you have any suggestions for content you would like to see on the blog, let me know.
Until next time! Hey there, Gamers and Game Makers! We've all played those games that give us the option of choosing what path we take in a game. Be it the good or evil path. Normally these choices are given to us a key moments in a games narrative and are represented my a dialogue option or a basic action at a specific moment. Now, while Vampyr does the exact same thing, it does one thing different that makes it stand out for me. As a newly turned vampire, you are encouraged to murder the citizens of London in order to evolve your powers. In fact, you pretty much have to if you want to get any of the stronger powers. But, here's the thing, Vampyer makes this less than a simple black and white game mechanic. While you gain experience points from defeating the common vampire hunters and monsters of the world, you don't gain a great deal of XP from doing so. The game makes it very clear that if you want to really evolve your powers, you're going to have to take the life of an innocent citizen of London. Why should that be a big deal? Well, because the citizens of London don't feel like your typical npc prop. Each one has enough backstory and mystery to discover that I find myself unable to end the life of any of them. Even the roughest criminal characters have depth to them that drives me more to investigate than to murder. So, what does that mean for me as the player? As a result, I now find myself roaming London in search of answers but, I'm faced with more difficult battles and dangers as my enemies are significantly stronger. I find myself grinding more with low level enemies in order to slowly gain the experience I need to evolve my powers. The game does make it much more difficult if you decide to be good and that's not a complaint. The games difficulty is a direct reflection on they type of person you decide to be. Like real life, being good is not always easy. The easiest way through the game would be to simply kill all those needed for you to become stronger. Yet, I can't bring myself to it. That's not simply a reflection of my own conviction but rather a testament to the quality of the games writing, character design and world building.
The fact that the game handles its difficulty in this way is a great example of game design done right. The game constantly teases at how I could so easily succeed if I simply kill but the depth of the character makes that choice one that is both difficult and punishing. If I decide to kill, I get stronger but I loose out on investigations that could tell me more about the world. The city will also plunge into chaos and ultimately be lost if I take too many lives. I've not yet finished the game and for now, I haven't taken a single citizens life. I aim to complete the game without doing so but, who knows.... Until next time! Hey there, Gamers and Game Makers! I was recently part of a panel at this years Dublin Comic Con called Crafting Fear. On the panel we discussed the evolution of horror throughout the years across literature, movies and games. I covered the section on games by comparing jump scare games and psychological horror games and how they scare us in different ways. I've decided to post my slides from the panel which provide some notes on what I was discussing. |
Archives
April 2019
Categories |