Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 31 Dec 2010
Offline Last Active Apr 25 2016 03:45 AM

#5288569 Total Begginer needs lot of advice

Posted by on 25 April 2016 - 03:42 AM

... but whats your thoughts on going with java? is the language capable of such things and run them smoothly and get a good end result? I dunno, im worried about what ever I learn handling the animation smoothly, (I have no foundations for such concerns but there ya go LOL) is java harder to code games and more to the point games like im looking to do point&click / visual novel....



Ofc. Java is capable of it, e.g. take a look at this


I like your down-to earth approach, you seem to pay respect to learning a programming language and don't take it too lightly.

Reading through your posts, it almost seems like you overanalyze and respect/fear it too much.


The thing with programming languages is - its not like you learn just one language and thats it, its over, you wont take a look at any other language.

Java IS one of the best languages to start with imho.

Once you master the language, which in itself is not that hard, there are just a few concepts you need to understand and learn the grammar of the language, all that is left to do is polish your design and problem solving skills, which is language agnostic.


Once you learn and become fluent in any programming language, it takes little to no time to learn another one. The concepts stay the same. The only thing that changes are miniscule (like grammar - takes one max 1 week to learn and max 3 weeks with a simple project to master).

Then there are few different programming paradigms but they wont concern you any time soon. I'd even say if you embark on a professional route, you will be fine.


Take a look at tiobe index, java is #1- For many years now java has either been #1 or at least top 5. So, in a few years, if you lose interest in gamedev you will have aquired a tool (programming language java) which you can use and earn money with.

Anytime I think of java, all that comes to my mind is that: its an easy language, its clean, its object oriented, its platform independent. Sure, its an interpreted language (instead of native [machine code]) and therefore a bit slower but there is JIT for that.

If you are not working on realtime systems where micro/nano seconds matter, you practically wont have any issues with java. And once you run into issues, you will be at a stage in your development, where you will easily pickup any other language.

Transitioning or picking up C / C++ after java will be very easy. Language wise they differe here and there and some concepts are different but overall, it will be easy, Id say. Well, Im only talking about my experience here.


Java, C++, Python - they rule!

#5287719 Efficient click detection design

Posted by on 19 April 2016 - 10:49 PM

For simple & lightweight GUI, your approach is ok.


More complex GUIs are usually managed hierarchically as in there are containers/views, which clip down recursively and so on.

Ascii drawing to clarify:

|V1     |

|-----+ |

|V2   | |

|-----+ |

|       |


V2 gets clipped by V1 and in a more complex setup, v1 could contain many more sub views and those in turn can contain some too.. You get the point I think.


One optimization that is being done is to check whether (x, y) is in the clipping rect of a node (e.g. ctrl or V1).

If its not, then you can skip recursively checking which it actually hit - with this, you can potentially skip thousands of controls.

Thats usually enough, I have never personally experienced a bottleneck on GUI systems.

#5173680 Best way to traverse a 2d array to dertermine the winner in Tic-Tac-Toe

Posted by on 14 August 2014 - 01:53 PM

A simple brute-force optimization that came to mind when reading the title was:





For each cell, you can perform 3 checks: Horizontal (H), Vertical (V) and Diagonal (D(D1, D2))

But not all checks are needed for each cell, so lets see:

Cell 1: H, V, D1
Cell 2: V
Cell 3: V, D2
Cell 4: H
Cell 5: -
Cell 6: -
Cell 7: H
Cell 8: -
Cell 9: -

In case its not clear:
Cell 2: H is not needed because its covered by Cell1-H and D is simply not possible

Cell 5: H is covered by Cell4-H, Diagonals are covered by Cell1-D1 and Cell3-D2 and V is covered by Cell2-V


So this leaves you with 3x H, 3x V and 2x D checks ~ 8x Checks in total, which is much less then 36x Checks

Ofc the other solutions are much more elegant (referring to the one suggested at #5)


Edit: Oh and ofc, the traversal itself could look like this:

// Horizontal
for (int i = 0; i < 3; i++)
  ... field[(pos.x + i) % 3, pos.y] ...

// Vertical
for (int i = 0; i < 3; i++)
  ... field[pos.x, (pos.y + i) % 3] ...

// Diag 1
for (int i = 0; i < 3; i++)
  ... field[(pos.x + i) % 3, (pos.y + i) % 3] ...

// Diag 2
for (int i = 0; i < 3; i++)
  ... field[(pos.x - i) % 3, (pos.y + i) % 3] ...

Im not sure about whether C++ % (mod) handles negative numbers mathematically correctly..

#5171892 Other uses for matrices in games?

Posted by on 06 August 2014 - 09:24 AM

Sobel-Operator (Image Processing - Edge Detection)
Gaussian Elemination

#5134479 How to get good fast?

Posted by on 25 February 2014 - 12:08 PM

There is one thing I havent read here yet:
Its not only practice and study but most of it
is the will to become better! You have to actually want to become better.
There is one parallel I can think of to make it more clear:
Your whole (school-) life you have been learning and practising
"writing" - such as grammar/spelling/different types of text/...
Yet not everyone (including you), who does this, is a (good) writer..
The same applies to programming & programmers. There are many types
of em: Some like the beauty in it, some just do it because they have to
and want to get the job done, even though sloppily...
I think the best way to learn anything is to do it autodidacticly.
If you let anyone else (teacher?!) shove knowledge down your throat without
really being interested, the results will be just the same as how you learnt to write!
Try to not lose your interest.
Also, stop distracting yourself with such petty worries. Just start learning and practising ^^
To me it almost seems like procrastination xD


Oh btw, to your original question at how to actually get better in a fast and effective way:
Well, it just boils down to practising and learning, steadily! And trying out new stuff.

You can buy a book or two and get the basics down.


You should tackle some projects / ideas you think you "might" be able to do. There should

still be stuff thats new to you that you have to learn about as you go along. If you repeat this,

you will gain knowledge, little by little, over time. It will become invaluable experience!