Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  Java in GTA5  (Read 2095 times)
0 Members and 1 Guest are viewing this topic.
Offline Troncoso

JGO Coder


Medals: 20



« Posted 2013-10-22 02:37:25 »

I found this in GTA5. I enjoyed it.



Here's the source code. Be sure to ask Rockstar before using it commercially:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
package java.cappuccino;
import java.shot.milk.foam;

public class Breakfast extends Meal {
    private double espresso;
    private int bread;
    private int bacon;

    public void sandwich() {
        bread = 2;
        bacon = 2;
        return bread + bacon;
    }
}
Offline opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #1 - Posted 2013-10-22 02:39:14 »

Haha oh that's amazing! Those variables in the sandwich method though... it's bothering me because they dont use the this keyword :/ I know it's not needed, it's just one of my weird coding practices to make things more readable in my eyes...

Offline ra4king

JGO Kernel


Medals: 338
Projects: 2
Exp: 5 years


I'm the King!


« Reply #2 - Posted 2013-10-22 03:01:17 »

"return bread + bacon" in a void method? Hahahahaha

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

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #3 - Posted 2013-10-22 03:31:11 »

"return bread + bacon" in a void method? Hahahahaha
Damn, didn't even notice that!
I'm turning in my programmer card now. Can't take the shame.

Offline Cero
« Reply #4 - Posted 2013-10-22 05:05:44 »

Haha oh that's amazing! Those variables in the sandwich method though... it's bothering me because they dont use the this keyword :/ I know it's not needed, it's just one of my weird coding practices to make things more readable in my eyes...
well if you always use it, then at some point like 30% of your code will be "this" - you may stop at some point too =P

Offline opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #5 - Posted 2013-10-22 05:23:39 »

Meh, I just like how it looks. Being able to scan through my code and see all my class variables vs my shared variables from other classes easily is nice.

Offline Elusivehawk

Junior Member


Medals: 1
Projects: 1



« Reply #6 - Posted 2013-10-22 07:12:00 »

I too use "this." whenever possible (Except for constructors, not sure why). It makes my code bulkier, but I'm fine with it.

EDIT: Nevermind, stupid RequestPolicy hid the image.

Funny, but why make that method void? Huh Pretty much any Java expert (Or newbie, for that matter) would've corrected that.
Offline Jeremy
« Reply #7 - Posted 2013-10-22 07:25:47 »

I think there is some really clever joke we're all missing in the code. Not sure what it is and I'm too lazy to try and work it out. It might've been some artist's terrible attempt at making a programming joke.

Maybe some developer didn't get their meal or something.

Then again, it might just be there for the fun of it.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline Troncoso

JGO Coder


Medals: 20



« Reply #8 - Posted 2013-10-22 12:48:03 »

The actual code in the game is missing the last two closing brackets.  I couldn't bring myself to post it that way,  though. 

At least we can say Rockstar used Java in GTA5.... obviously,  they are still learning.
Offline Troubleshoots

JGO Knight


Medals: 36
Exp: 7-9 months


Damn maths.


« Reply #9 - Posted 2013-10-22 12:55:10 »

Est. 2004? Coffee shops all came around in 1994.

Why are all OpenGL tutorials written in Brainf**k?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Troncoso

JGO Coder


Medals: 20



« Reply #10 - Posted 2013-10-22 13:09:22 »

Well....it's not like 1994 was the only year allowed to found a coffee shop...
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #11 - Posted 2013-10-22 14:08:56 »

That's the quality of code you get when you ask artists to program  Wink

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #12 - Posted 2013-10-22 15:01:23 »

Hahaha good find. I could tell these guys were actual programmers after that LifeInvader mission...

Any idea where this is located on the map?

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline Troncoso

JGO Coder


Medals: 20



« Reply #13 - Posted 2013-10-22 15:22:47 »

I think this should work: Link

Click the little pin icon next to the thumbs up. Should show the location. You'll probably have to log into socialclub.
Offline kingroka123

JGO Knight


Medals: 27
Projects: 5
Exp: 1 year


Gamer's Helmet


« Reply #14 - Posted 2013-10-23 00:37:41 »

It's funny b/c I probably wouldn't have laughed at this if I weren't a programmer  Grin

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.

Riven (15 views)
2014-07-29 18:09:19

Riven (10 views)
2014-07-29 18:08:52

Dwinin (10 views)
2014-07-29 10:59:34

E.R. Fleming (28 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (40 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (27 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!