Advertisement

How to avoid bugs

Started by August 13, 2018 05:48 PM
24 comments, last by Anri 6 years, 1 month ago

I am taking a break from my YouTube gaming career to pursue game development. My question is, how do I avoid bugs? I know I cannot all the time. 

Forethought.

i'd rather remain silent and be thought of as a fool, than speak and remove all doubt -Albert Einstein
Advertisement
Just now, buttercup said:

Forethought.

What do you mean?

1 minute ago, Timothy Sharp said:

What do you mean?

The code is created in your head, not your fingers. 

i'd rather remain silent and be thought of as a fool, than speak and remove all doubt -Albert Einstein
1 minute ago, buttercup said:

The code is created in your head, not your fingers. 

I don't really know.... how to code

Bug mitigation is mostly about using the right tools, and developing sufficient discipline. Strongly-typed programming languages help, unit testing, contract-based programming, fuzz testing... lots of techniques available depending on your exact needs.

But before you worry about any of that, you need to learn how to program. Don't put cart before the horse.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement
4 minutes ago, swiftcoder said:

Bug mitigation is mostly about using the right tools, and developing sufficient discipline. Strongly-typed programming languages help, unit testing, contract-based programming, fuzz testing... lots of techniques available depending on your exact needs.

But before you worry about any of that, you need to learn how to program. Don't put cart before the horse.

I have a great idea and idea for the story... or atleast the beginning I just need to learn how to program

You can start learning programming and unit testing at the same time.  Instead of starting with "hello, world!" command-line programs, start with "hello, world!" unit tests.  For a while they might seem dumb, but once they save your ass a few times you'll start to understand why they're a good idea.

Well you can go to a store and buy a pesticide!

Joking aside, the only way to completely avoid bugs is ... to do nothing! They say, when there's no code, there's no bug. You will face a lot of bugs along the way, with most of them created by your very self. That's just a natural. With knowledge and experience, you will have a way to make a decision that leads to less bug. But to gain that you'll face bugs, a lot of them.

My suggestion would be, start slow, start small, get a mentor, and write unit tests if possible!

http://9tawan.net/en/

For me it's automatic regression tests with ample code coverage.

I find system tests do the job better than unit tests here.

My most complicated hobby project to date was a multiplayer RTS game.

There are lot's of bugs that can cause the game to go out of synch.

So I created a test where 2 bots played eachother automatically for every build that I made:

This was a complete end to end test: There were actually 2 separate instances of the program playing eachother over the network.All of this was launched automatically, so it was painless for me to test.

It took me several days to set this up.

But, It helped me catch 75% of my bugs.

In a hobby game this is specifically important because bugs demotivate you. 

 

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

This topic is closed to new replies.

Advertisement