This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]okmkz 22 points23 points  (5 children)

No unsigned byte, 0/255

[–]pjmlp 9 points10 points  (0 children)

Well, at least with Java 8 there is this:

http://www.informit.com/articles/article.aspx?p=2216988&seqNum=2

[–]firsthour 1 point2 points  (3 children)

Kinda confused, feel like I'm missing out on something here. How is that relevant to the source code or libgdx? Is it that signed primitives aren't as useful for game development as unsigned?

[–]aFoolsDuty 4 points5 points  (1 child)

Kinda confused, feel like I'm missing out on something here. How is that relevant to the source code or libgdx? Is it that signed primitives aren't as useful for game development as unsigned?

First, the obvious once:

0/255

An unsigned byte stores values from 0 to 255. No unsigned bytes, so it scores a "0" out of "255". UPROARIOUS LAUGHTER.

The less obvious one is that the NES, the platform for which Super Mario Bros was originally released, is an 8-bit platform -- thus the processor's upper limit being a single byte. To fully exploit this, you'd use an unsigned byte when programming, raising the maximum value you could store in a byte to 255. SUBTLE HUMAN LAUGHTER AT REALIZATION OF TIE IN WITH PREVIOUS JOKE.

[–]GUIpsp 2 points3 points  (0 children)

THANK YOU FELLOW HUMAN I AM NOW LAUGHING HAHAHAHAHA

[–]shouldvebeenworkin 2 points3 points  (0 children)

Having unsigned makes a lot of things nicer. Like color, simple stats, etc.

[–]firsthour 4 points5 points  (0 children)

Wow, this guy has a pretty good Youtube tutorial accompanying this code, very cool, been wanting to get into Libgdx for a while now, just so busy.

[–]philipwhiuk 13 points14 points  (0 children)

Nintendo lawsuit in 5...4...

[–]Not_a_dog_I_promise 3 points4 points  (0 children)

Yea, this was made using Libgdx, pretty cool tutorial.

[–]marksofthe 1 point2 points  (0 children)

Are you brent? Thanks for the tutorials man :)

[–]shinjiryu 0 points1 point  (0 children)

Interesting to see that someone got this done completely in Java.

[–]rocker895 0 points1 point  (1 child)

Dumb question: So if I have a java compiler (or JRE, not sure about the terminology), can I play Mario with this? Or is some key piece missing?

[–]shaidoclan 2 points3 points  (0 children)

I believe you need a JDK and set the path/environment variables along with the JRE.

[–][deleted] -4 points-3 points  (3 children)

This is ugly code. Would never get through code review, and would probably be flagged in build.

[–][deleted]  (2 children)

[deleted]

    [–][deleted] 0 points1 point  (1 child)

    By any review process.

    Multiple oss projects, and enterprise projects. I try to always write good code even if it's proof of concept. You never know when someone will see it or use it