Java Programming Hilarity

Started by Hasabushi, November 17, 2013, 06:35:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hasabushi

I've been working on a Bard's Tale type game and was testing some of the code when I had this interesting encounter. Remember all this is randomly happening. So with no further adue' I present

Sir Mordrid vs the Rat :D



Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
1 points of damage
Rat repells
1 points of damage!
The Rat repelled all damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
1 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
1 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
1 points of damage
Rat repells
1 points of damage!
The Rat repelled all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
1 points of damage
Rat repells
1 points of damage!
The Rat repelled all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
1 points of damage
Rat repells
1 points of damage!
The Rat repelled all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
1 points of damage
Rat repells
1 points of damage!
The Rat repelled all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
2 points of damage
Rat repells
1 points of damage!
Rat took 1 points of damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
1 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
1 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
2 points of damage
Rat repells
1 points of damage!
Rat took 1 points of damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
2 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
1 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
1 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
2 points of damage
Rat repells
1 points of damage!
Rat took 1 points of damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
2 points of damage
Rat repells
1 points of damage!
Rat took 1 points of damage!

A Rat has gained the advantage!
A Rat attacks Sir Mordrid with
bite attack doing...
2 points of damage!
Sir Mordrid repells
6 points of damage!
Sir Mordrid repells all damage!

Sir Mordrid gains the advantage!
Sir Mordrid swings his sword doing...
2 points of damage
Rat repells
1 points of damage!
Rat took 1 points of damage!

Sir Mordrid
**uses special skill** SHIELD BASH

Rat takes 5 damage from SHIELD BASH

Sir Mordrid
**uses special skill** SHIELD BASH

Rat takes 5 damage from SHIELD BASH

Rat is dead!


The Results of the battle are:
Sir Mordrid Killed 1 Rat!



Now remember Sir Mordrid can do up to 7+ points of damage. So this is quite hilarious, he finally just resorted to shield bashing the bugger :D

Throndir

Is that a bug or something? Its great how the shield does more damage than the sword.

Hasabushi

Something with the logic that caused the bug, it's only happened once, but it's def hilarious.

Hasabushi

I'm actually considering using my engine to develop "Silver Arms" into a RPG using the deep system I'm designing :) You could be the creative designer that does all the plot work and world building :)

Grimston

Java = The Problem :D

I detest java, probably due to its crappy debugging/compiler errors
I'm a suicidal planet and I'm aiming at the sun,
All the gravity inside me will give way to a beautiful calm,
If you're gravitating to me, now's the time to turn and run,
I see a raging ball of fire, burning life lines in my palms

Hasabushi

#5
Ahh come on :P, You Don't like public private abstract static void implemented methods :P

Actually I always do my design in Java, JavaFX, although on release I tend to lend more toward Visual C# or Python. for final release.

And yes Java does have some issues especially in debugging, but once you get used to the ex's and alot of Try-Catch's you can easily track down the expections, of course granted, that takes experience. Also remember java 7 has come a long way since java 1.1. Just look at the memory allocation now compared to then as well as excellent garbage collection (unlike C++) catching all those dead Objects :D

**UPDATE**
And actually Java wasn't the problem, I found the error in that the ArrayList, didn't get one of its index's cleared, that was a programmers error, something that with just the right set of circumstances could happen :D

Grimston

I will agree that java has come along way, but it still a pain in the ass to read error on "Line 73" while you only have 70 lines.... just because it cant count lines, when it compiles the byte code :P (The error was actually a missing semi colon on line 13)

I prefer to write everything in C#.

One thing I would like to see is C# ASM Library's be nicer calling pure assembly code from C# for speed improvement.
I'm a suicidal planet and I'm aiming at the sun,
All the gravity inside me will give way to a beautiful calm,
If you're gravitating to me, now's the time to turn and run,
I see a raging ball of fire, burning life lines in my palms

Hasabushi

That I can totally agree on.

As far as errors like that netbeans has alot of useful tools in debugging.
I tend to always forget a ")" in a rather long an obnoxious if/else logic method lol I think 115 lines has been my longest if statement :D. And it gives me an error in line 512 LOL

Also I find the console logger to be my absolute best friend :D

Wanna try something really fun, build a complete roleplaying engine in PHP LOL, it can be done, but man the growing pains :P

Grimston

Java is a fairly strange language with debugging, Netbeans does help a lot thankfully.

PHP is so much fun, and I have tried that, cant remember how it went, think I got it up to walking around a world, using lots of AJAX and JavaScripts. I think I had basic combat as well.... lost on my old hard drive anyway :(
I'm a suicidal planet and I'm aiming at the sun,
All the gravity inside me will give way to a beautiful calm,
If you're gravitating to me, now's the time to turn and run,
I see a raging ball of fire, burning life lines in my palms