Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
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  
  Logic Errors  (Read 2156 times)
0 Members and 1 Guest are viewing this topic.
Offline Troubleshoots

JGO Knight


Medals: 36
Exp: 7-9 months


Damn maths.


« Posted 2013-10-31 13:58:17 »

So we all get them from time to time. But how long have you previously spent trying to spot such a simple cause of an error?
Pretty recently I was setting up the boundaries of the camera in a game. This was my algorithm.

1  
2  
3  
if(camera.position.x + Gdx.app.getGraphics().getWidth() => map.getWidth()) {
    moveX = map.getWidth() - camera.position.x + Gdx.app.getGraphics().getWidth();
}

I spent 5 hours debugging it, wondering why it moved the camera 2048px. This error has to be such a classic.
But yeah, you have to love the rush from fixing them. Cheesy

Why are all OpenGL tutorials written in Brainf**k?
Offline tyeeeee1
« Reply #1 - Posted 2013-10-31 14:50:21 »

About six hours spent fixing a stupid obvious error...
Offline SHC
« Reply #2 - Posted 2013-10-31 15:24:13 »

My largest error happened when I was learning JNI. I've spent three days scratching my head about the linking error unresolved symbol. Then my brother pointed out, I've forgotten to link with the JVM.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Troncoso

JGO Coder


Medals: 20



« Reply #3 - Posted 2013-10-31 16:15:36 »

An entire 8 hour shift only to find that I called a method of the same name from the wrong class...
Offline Simn
« Reply #4 - Posted 2013-10-31 16:31:57 »

Spent about two days figuring out why my view matrix was buggy. Turned out I rotated my rotation matrix with degrees instead of radians. Tongue

- Simn
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #5 - Posted 2013-10-31 19:07:02 »

Spent a while trying to figure out why my vertex shader wasn't compiling only to realize I had put a colon instead of a semi-colon after a line of code Sad

Offline quew8

JGO Coder


Medals: 29



« Reply #6 - Posted 2013-10-31 19:22:28 »

Spent one week with no coding whilst looking for a bug. Turned out I was using "1" in for loop rather than "i". I recon this was my IDE auto-completing to the wrong thing, but I still should have noticed.
Offline UprightPath
« Reply #7 - Posted 2013-11-02 01:23:36 »

Biggest reason why I complain about the bracket-less/single line control statement (in Java):

I was working on a project for my BS in CS editing another team member's code to provide a better reader for an XML document we had to parse. I always use brackets, he didn't. So I was reading his code like it was mine. I added a line to an if statement and could not, for the life of me, figure out why that line was always executing. It took me about eight hours to discover that error.

Offline kingroka123

JGO Ninja


Medals: 29
Projects: 5
Exp: 1 year


Gamer's Helmet


« Reply #8 - Posted 2013-11-03 02:01:55 »

I believe that when i first started coding in java, I spent about a week trying to get a timer to work. Turns out that I imported the wrong Timer class

Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #9 - Posted 2013-11-03 02:09:54 »

I believe that when i first started coding in java, I spent about a week trying to get a timer to work. Turns out that I imported the wrong Timer class
Ah yes, I remember last year in my coding class my teacher had to keep telling the other students to import the javax timer, not the other one.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline HeroesGraveDev

JGO Kernel


Medals: 254
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #10 - Posted 2013-11-03 02:43:48 »

But yeah, you have to love the rush from fixing them. Cheesy

No, I absolutely HATE it, because it's always something like a hidden typo that is impossible to find.

Not so much a logic error, but once I spent 10 minutes debugging a shader to find that I missed a semicolon. Angry
Then I spent another few minutes trying to find another bug, which turned out to be a missing letter in a variable name. Angry

I have spent so much of my programming time debugging shaders. Cranky

Offline NegativeZero

JGO Knight


Medals: 30
Projects: 2
Exp: 3 years


Zero but not.


« Reply #11 - Posted 2013-12-22 06:34:45 »

I've been unable to get shaders working for several weeks, but today I realized that in my shader loader, I was appending '/n' to each line instead of '\n' ._.
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.

radar3301 (11 views)
2014-09-21 23:33:17

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (18 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

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

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

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

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

Tekkerue (50 views)
2014-09-09 02:24:56
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!