Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How do you test your game?  (Read 1494 times)
0 Members and 1 Guest are viewing this topic.
Offline Gudradain
« Posted 2009-03-10 01:40:41 »

Hello

Lately, I realize testing my game to check if everything works fine was a lot harder than testing my little school homework and that it consumes a lot of my developing time.

What I used to do in my school homework was simply to print out the information transform by my program and then check if it's the same as the value I expected. I repeat this test in a couple of different situations and if it's correct all the time I consider it works. If no, I try to find the bugs.

The problem is that this method don't work very well for testing my game. One of the issue I face is that my code is in a loop and it might work for the first 2000 times but at the 2001 time it will produce an unexpected behavior. No exception, no error, it's just that it doesn't produce the result I expected.
To test that, I usually try to execute the code on paper, if I think it's correct I run it and stare at the program to see if it does the right thing (which can be pretty long).

I was wondering if anyone know a better method.
Offline fletchergames

Senior Member





« Reply #1 - Posted 2009-03-10 02:15:12 »

You may be able to do unit testing for some parts of your code, but mostly you just have to play the game and try to break it.

It's usually a good idea to try to get other people to play it too.
Offline zammbi

JGO Coder


Medals: 4



« Reply #2 - Posted 2009-03-10 05:13:09 »

I find writing tests annoying, and if I'm the only one going to be coding the game then I won't write tests.
I just make sure my code is good quality (using findbugs plug-in helps) and have a good error logger which users can report the log to get it fixed.
Even though my game is an alpha it is very stable.

Current project - Rename and Sort
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2009-03-10 08:25:51 »

I have developed my own FPS and I give you the following advices:
- write at least some unit tests for the most complex parts of your source code even though you're alone on the project
- use some tools that analyses your source code (Findbugs...)
- release early
- release often
- if your project is open source, some people might give you more precise advices on the way of implementing some features
- allow the users to test your game (ease the way of installing your game)

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #4 - Posted 2009-03-10 11:23:56 »

I play my games during development for about 4 hours every day - the other 4 spent developing or so. It's pretty time consuming. When they're nearly ready for release we let them loose into the wild and pick up any stranger exceptions automatically via our hiscore table. That quickly finds nearly all the crashing bugs and helps us focus on what to fix for the release. Rinse, repeat.

Cas Smiley

Offline Gudradain
« Reply #5 - Posted 2009-03-10 14:06:00 »

Hmmm, looks like there is no way to avoid the play to find bug part  Sad. I usually test it after each modification so at least I find most of the bugs very soon.

I'm not familiar with unit testing. When you talk about the most complex parts of your code, does it means like the physics?
Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #6 - Posted 2009-03-11 16:54:39 »

Physics or code that is dependant on other code that is dependant on other code and so on.

Also, know what to focus on with each bigger build and try to at least test the crucial functionalities every time to make sure that they still work.

As for my practise I stand in line with the rest of the answers, add some big feature and test it often. And have your friends play through things as often as you can.

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #7 - Posted 2009-03-12 17:24:39 »

Use the breakpoint tool in your program, it can be your best friend. Have a test somewhere for the specific type of bug you're expecting, then once it's broken you can see the values of all your variables. Similarly you can go through your code line by line to determine exactly what it's doing.

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (22 views)
2014-09-19 03:14:18

Dwinin (35 views)
2014-09-12 09:08:26

Norakomi (62 views)
2014-09-10 13:57:51

TehJavaDev (90 views)
2014-09-10 06:39:09

Tekkerue (44 views)
2014-09-09 02:24:56

mitcheeb (65 views)
2014-09-08 06:06:29

BurntPizza (48 views)
2014-09-07 01:13:42

Longarmx (35 views)
2014-09-07 01:12:14

Longarmx (40 views)
2014-09-07 01:11:22

Longarmx (37 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!