Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
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  
  Do you ever 'need to go deeper?'  (Read 3839 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles

JGO Wizard


Medals: 66
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Posted 2013-12-09 23:42:13 »

Of course, obligitory inception bwaa: BWWWWOMMMMMMMMMM!!!

With that out of the way, I need to ask:
Do you ever feel like java limits you? Do you ever need to go even lower level? Can you think of any times where someone needs to go deeper? I was wondering, since I read up on native methods, and thought about why you would need to go deeper. I mean, LWJGL has to go deeper (using OGL on the graphics card), right? Lastly, how would you 'go deeper.'

GLOSSARY
'need to go deeper' - Inception reference. Here, it would mean going lower level, but still using java.

Just curious  Smiley

-wes

Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #1 - Posted 2013-12-10 00:11:51 »

Assembly.

And no, I never feel the need.

Offline wessles

JGO Wizard


Medals: 66
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #2 - Posted 2013-12-10 00:13:37 »

But native files do not count?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline chaucer345
« Reply #3 - Posted 2013-12-10 00:16:40 »

There are also languages that don't do as much for you as java, but are arguably a little more customizable. C comes to mind. I will say however that I started learning programming in C++ and rapidly switched to java as I find it easier to use... Though I admit, they're really the only two languages I've touched.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #4 - Posted 2013-12-10 01:07:16 »

I think Java can do much more than you've seen, its quite a capable language.

Offline HeroesGraveDev

JGO Kernel


Medals: 254
Projects: 11
Exp: 2 years


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


« Reply #5 - Posted 2013-12-10 02:54:20 »

When I try to go deeper I get StackOverflowErrors.

Offline SwampChicken
« Reply #6 - Posted 2013-12-10 04:00:52 »

Strange.

I usually get IndexOutOfBound exceptions...
Offline kingroka123

JGO Ninja


Medals: 29
Projects: 5
Exp: 1 year


Gamer's Helmet


« Reply #7 - Posted 2013-12-10 04:20:20 »

Weird I get QuitOverUsingMemoryYouFool errors. Strange... Wink

Offline ctomni231

JGO Wizard


Medals: 99
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #8 - Posted 2013-12-10 05:21:42 »

Go deeper. Use LWJGL.

Yeah, you don't really have to work hard to go deeper in Java. We have all the power of C by just using a few wrappers. Going any deeper than C ends in assembly... so yeah. Java works and is good enough for me.

Offline xsvenson
« Reply #9 - Posted 2013-12-10 08:36:50 »

On the contrary, I sometimes feel, I am too deep and the things I do could have been abstracted a bit more.

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Varkas
« Reply #10 - Posted 2013-12-10 09:39:45 »

With that out of the way, I need to ask:
Do you ever feel like java limits you? Do you ever need to go even lower level? Can you think of any times where someone needs to go deeper?

In the past I wa using C++ and coded low level routines like graphics and texture mapping/shading myself. But nowadays hardware got so fast,the Hotpsot compiler got better,  and there are good libraries available, so that Java has become quite sufficient for my needs.

I have a few legacy projects in C and C++ but I really don't like that anymore.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline gouessej
« Reply #11 - Posted 2013-12-10 12:09:07 »

Hello

Do you ever feel like java limits you?
No. Actually, that's the opposite. Java is like my mother tongue in computer programming, other languages limit me even in term of readability, ecosystem and performance (for example Ada, C, C++, Ocaml, Esterel).

Do you ever need to go even lower level?
I need to go lower level only when implementing or fixing some features in JogAmp (JOGL, JOAL, JOCL, ...) in its C code.

Offline theagentd
« Reply #12 - Posted 2013-12-10 12:36:35 »

I'd like stack allocated instances and something similar to C struct arrays (without the overhead of MappedObject). Stack allocated instances allows you to write much nicer vector math code without creating a mountain of garbage. C-like struct arrays would allow you to get much better memory locality and is also useful for uploading vertex data to OpenGL. Those are the only two features I'm missing at the moment...

Myomyomyo.
Offline Nate

JGO Kernel


Medals: 147
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #13 - Posted 2013-12-10 14:32:58 »

Native code is mostly needed to interface with native APIs or when you need to be closer to the metal for speed. You could see libgdx for an example. Eg, it uses native code for the Box2D wrapper. The native code is inline with Java code using a tool called gdx-jnigen, which is pretty damned neat. See JGLFW for more gdx-jnigen code. Another example is Matrix4 which uses native code for speed. This is mostly not an issue on the desktop though, where it is unlikely you'd need native code for speed unless doing something pretty specialized. Using gdx-jnigen is a waaaay nicer approach to writing native code. Not only is it inline with the relevant Java code, but the multi-platform build for is handled for you. Building is just running a Java main method and you're done.

Offline gimbal

JGO Knight


Medals: 25



« Reply #14 - Posted 2013-12-10 15:53:15 »

Different kind of answer: I've never had to do it (except for using libraries such as LWJGL for reasons already stated), but if I had to "go deeper" because after thinking long and hard about it I reason that it is the best way to go, I would do it.
Offline matheus23

JGO Kernel


Medals: 107
Projects: 3


You think about my Avatar right now!


« Reply #15 - Posted 2013-12-10 20:33:47 »

On the contrary, I sometimes feel, I am too deep and the things I do could have been abstracted a bit more.

Ever tried out functional programming? Wink

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline ags1

JGO Ninja


Medals: 62
Projects: 3
Exp: 5 years


Make code not war!


« Reply #16 - Posted 2013-12-10 20:55:33 »

No I would not. Java just runs. All the 'deeper' stuff is just a deployment nightmare.

Offline xsvenson
« Reply #17 - Posted 2013-12-11 09:34:31 »

On the contrary, I sometimes feel, I am too deep and the things I do could have been abstracted a bit more.

Ever tried out functional programming? Wink

Actually yes, I've used Haskell, took a bit of getting used to, to get the mindset right. In the end I decided that the imperative programming suits my thought patterns better. I might try again, just for beer&brezels.

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Offline matheus23

JGO Kernel


Medals: 107
Projects: 3


You think about my Avatar right now!


« Reply #18 - Posted 2013-12-11 12:36:12 »

On the contrary, I sometimes feel, I am too deep and the things I do could have been abstracted a bit more.

Ever tried out functional programming? Wink

Actually yes, I've used Haskell, took a bit of getting used to, to get the mindset right. In the end I decided that the imperative programming suits my thought patterns better. I might try again, just for beer&brezels.

Yes. It's about changing the way you think. Learning functional programming is like learning programming from scratch again, it's completely different. But now that I learned haskell I've found many problems to be solved in a more elegant way than in imperative programming Smiley

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Oskuro

JGO Knight


Medals: 39
Exp: 6 years


Coding in Style


« Reply #19 - Posted 2013-12-21 23:20:17 »

Last time I remember I had to go "deeper" was when I was trying to find out the display rotation angle. My search eventually lead me to conclude that it was a bit of info that had been left out of the Java implementation, and could be reached by JNI... Which lead to C++, platform dependent code, learning the Windows / Linux way of finding that information, etc...

But it was a very specific case, and hardly critical.


My opinion on the matter is that if the tool/API/language you're using makes you need to go "deeper" very often, then it's probably not what you need to be using.

Offline Slyth2727
« Reply #20 - Posted 2013-12-22 04:00:34 »

Yes, assembly.
I've messed with it, done some stuff with gdb and a C program to get a feel for the processor calls, and just confused myself. It's interesting stuff and I really want to learn it, so yes I do want to go deeper (but I don't feel like Java limits me), but I simply don't have the time with all the activities in my life :/

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline gimbal

JGO Knight


Medals: 25



« Reply #21 - Posted 2013-12-24 11:06:43 »

Yes, assembly.
I've messed with it, done some stuff with gdb and a C program to get a feel for the processor calls, and just confused myself. It's interesting stuff and I really want to learn it, so yes I do want to go deeper (but I don't feel like Java limits me), but I simply don't have the time with all the activities in my life :/

I did that for years; I ended up gaining a whole lot of knowledge I don't really apply nowadays. There is so much relevant stuff to learn, I would spend my time on that first unless you are really looking for a complicated hobby for which there is little tooling to make your life easier Smiley

Its cool to understand how game developers had to do it "back in the day" of course.
Offline tom_mai78101
« Reply #22 - Posted 2013-12-24 11:13:15 »

On a technical level, no. I prefer not to go deeper.
On a design level, yes. I want to be perfect.
On a gameplay, yes. I want to play to the best I can.
On sex, yes indeed.
Lucid dreams? Oh yes.
Programming? Not unless you're really committed to doing things from scratch. (I wished that's the case for me.)
Anything else? If time and interests are allowable, yes.
Offline gouessej
« Reply #23 - Posted 2013-12-24 14:29:24 »

On sex, yes indeed.
I thought about the same thing when I came back here.

Offline Varkas
« Reply #24 - Posted 2014-01-08 11:45:08 »

Yes, assembly.

It's no fun anymore with current processor architectures. But as you said, at times it's good to get a feeling for what is really happening "under the hood". Still I wouldn't recommend learning assembly anymore these days. Better leave that to the compilers and code generators.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline matheus23

JGO Kernel


Medals: 107
Projects: 3


You think about my Avatar right now!


« Reply #25 - Posted 2014-01-08 12:52:32 »

Yes, assembly.

It's no fun anymore with current processor architectures. But as you said, at times it's good to get a feeling for what is really happening "under the hood". Still I wouldn't recommend learning assembly anymore these days. Better leave that to the compilers and code generators.

I never learned assembly that way. Well, I don't know assembly of current processor architectures either ^^


I learned assembly - or better: whats really happening "under the hood" - by using logisim, a logic simulator, where it's possible to build and simulate almost every logic circuit, including simple CPUs. Combining knowledge from minecraft and a couple of youtube videos I was able to build some CPUs. It's one of the experiences I'd recommend the most! Smiley

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline tom_mai78101
« Reply #26 - Posted 2014-01-08 14:27:28 »

If one were to go assembly and wanted to go even deeper than that, I would encourage that person to go emulate a hardware device.

As far as I know, there's only one famous person who has ever achieved that: Martin Korth, the creator of no$gba and other no-cash programs. The reason he's famous is due to the fact he single-handedly wrote an assembly program that emulates Nintendo DS on a near-perfect accuracy back in 2006, which is the only emulator capable of playing most commercial games on old operating systems and old hardwares, such as MS-DOS.
Offline Varkas
« Reply #27 - Posted 2014-01-13 13:10:08 »

Do you ever feel like java limits you?

I had replied already, but a new point came to my mind.

Java has limits, not only in the question how close to the iron you can get, but also in some other areas.

C++ has less limits, but it has a whole lot of traps for programmers. I keep being told, that skilled programmers will learn to avoid them, but I find my productivity with Java being conatntly higher than with C++. For me, one of the reasons for higher produzctivity is that fact that Java has limits. These limits streamline the way of development to some extend, and make it easier to read and maintain code, also easier to find bugs.

If you ever had to work with a piece of C++ code where magicians went rampant on template and overloeaded operator use, macros and obscure syntactical tricks in the preprocessor, you know why the limits in Java are good.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline wessles

JGO Wizard


Medals: 66
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #28 - Posted 2014-01-13 21:52:21 »

Yeah. It would suck to figure out later after 7 hours of debug oh, I overloaded this operator wrong. D'oh!

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 (13 views)
2014-09-21 23:33:17

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

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

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

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

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

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

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

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

Tekkerue (51 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!