Fix "my" method to make an object A move toward X,Y coordinates

:o
is it possible ::slight_smile: ??

Ha not sure if you’re being facetious or coy… but if you want to make games for a living you need to build a portfolio of completed games… and the more the merrier. If you’re not interested in working for a game company (can’t blame you), then indie is a way to go. You can have two strategies for that… work years on a crazy good game… or crank out tons of decent games.

I went a harder route (IMO), which is working 40+ hours a week at a stable programming job and spending all my freetime on game related programming. It’s harder to be productive, but the stability is necessary for owning animals, house, and car (and woman?).

@ClickerMonkey
:stuck_out_tongue:
the thing is that i don’t know that someone can live just with making games, at least you work for a big AAA studio or you have a team with super programmers and awesome artists,
personally i gain once some money on making “games”, but it wasn’t like am gonna get payed every month or something like that, there was a guy (artist) who wanted me to help him making his portfolio where you can see the content (drawings) of the website while playing a small little games, i made it with Flash and he gave me 350€ ::slight_smile:
it was 2 years ago, after that i didn’t made any incomes ;D
in the beginning i was all excited about making Flash games and how FlashGame Portals are very popular and earning money will not be a hard task, but i never finished any game i start with flash :stuck_out_tongue: i always had the feeling that real programmers don’t use flash 8) (ignore that :stuck_out_tongue: )
and the reason why i start learning Java is that i really REALLY !! get pissed off after the two 1st months at college, the programming course are all crap multiplied by soo many craps
so i decided to learn a good language and be a freelancer programmer (just to prove to my mom that college sucks :wink: )
i start learning Java in last December, and somehow, i found myself following games tutorials everywhere :persecutioncomplex:
it’s not my fault ::slight_smile:
and the final result is that i completely screwed up at college 8) next year i should “re-do” the 1st semester of this year
and maybe the 2nd too ;D
i spend all my time learning Java, and the rest i spend it with my girlfriend
sorry if i talked too much, but since i said a lot here, i kinda have a little question
does it worth all this time ?? and specially the risks coming with it ??

thank you :slight_smile:

Is it worth it? All depends if you finish something substantial. If you are just doing it as a hobby, then making games are only worthwhile if that’s what you enjoy doing the most.

I’m not at the point where I’m ready to quit my full time job (was close many times), so I’m not “there” yet. But one day soon! Also, if you are working towards doing this full time for the rest of your life… be wary of burnout! I’m pretty burned out right now after doing stuff for Haxel, and now I’m overwhelmed with the number of things I need/want to do (stuff for Haxel, other WIP games, blog, etc).

You just need to clearly define what you want, then set goals (and due dates). When you pick a project you’re passionate about, develop some way to keep yourself motivated (I use a ToDo-list… I can’t stand seeing something on it… that’s my driving force behind me finishing things).

^
that makes a lot of sense i wish i find the right way someday
and good luck for you

thanx

There is a huge rift forming in this forum between 2 factions. There are those…

  1. Who are in it just to create games as quickly as possible.
  2. Who are in it to learn more about the Java (and OpenGL) technologies to write better tools for gaming.

The question is not if it is worth your time. I believe if you had the patience to post, you obviously want to use programming to create games. I think the assumption is that people are making games here solely for the interest of making them as fast and numerous as possible. Everyone who wants to do gaming for the sake of improving their own knowledge of the underlying technologies, (which games are the best way to do this), are wasting time posting in this gaming forum.

Let me be clear and to the point. All of you guys who are doing this to people, are completely wrong.

By this standard, we shouldn’t even be trying to create games. There are companies that are made to produce “AAA” titles. They have a lot more money and technology than we are able to fathom. We should just give up programming games and play the games that are tested, true, and are reviewed by people with high merits. What makes our gaming efforts better than any of those tested veterans?

And, yet here we are on a gaming forum for indie gaming, preaching standards. Pathetic.

I know, alaslipknot, that no one is force feeding you to try out new solutions, or the solution that is the most popular at the time. However, Java is much, much more vast than just LibGDX. From a programmer’s perspective, using a mainstream library is just as horrible as using a mainstream language.

The best course of action to take is one that will allow you to achieve your goals.

If your goal is to create a game as fast as possible, look into a library like LibGDX that has a lot of tools to help you out.
If your goal is to learn LWJGL inner workings, skip LibGDX and try to write tools for that.
If your goal is to learn Java inner workings, focus on looking through the Java tutorials and looking at code in Graphics2D.

In other words, you have to lay out for people exactly what you are looking for to avoid the generic cut/paste solution. I don’t believe there is a cut solution for any problem, especially one as vast as game creation. I just find it sad that people would rather stick to a routine, rather than question why they decided to become an indie game developer in the first place.

alaslipknot, regarding the original post: Learn vector math. It´s gonna help you out a lot and will make your games look and play better. Take a look at Davedes code and you´ll see how elegant the vector solution is to your problem. No more “if (this direction), if (that direction)”, it just looks… Nice. :slight_smile: Vectors will make your life a whole lot easier.

What everybody is missing in this thread is that Java2D is also a framework. You aren’t “going down to the wire” by using Java2D. Instead you are “letting it wipe your ass for you”, or whatever you want to call it. But, instead of letting it wipe your ass with cashmere (LibGDX), it’s wiping your ass with sandpaper. And doing a horrible job at it.

[quote]Exactly, that’s why i think that the good way to start is Java2D, then start to learn LWJGL step by step, it would be easier no ?
[/quote]
Learning Java2D won’t help you learn LWJGL. If you want to learn something “basic” that lets you transfer your knowledge to LWJGL (which is low-level), then you should learn LibGDX first. It will teach you essential concepts like Textures (GPU), projection matrices, batching, and maybe even shaders, which will transfer to LWJGL well.

If you want to learn graphics programming, this means learning vertices, shaders, vecmath, etc. You can choose to learn these concepts with raw OpenGL calls, or with LibGDX, or with my own lwjgl-basics API. IMHO you will learn the essential concepts faster using LibGDX or another high-level wrapper; and if you want to, you can always learn the boring OpenGL boilerplate later down the road.

To put it another way… LibGDX makes you a more productive graphics programmer, and lets you learn graphics programming faster. If you’d rather spend more timer tinkering and debugging calls to glXXX, then that’s your funeral.

The big problem with Java2D is that you might spend a month or two learning how to use it (buffer strategies, volatile images, odd tricks for faster composites and scaling, etc). And at the end of it all, your friend who spent the same amount of time learning LibGDX is already well ahead of you as a graphics programmer for hardware-accelerated devices.

[quote]Here’s the same code, using javax.vecmath.Vector2d:
[/quote]
Vecmath is not part of the standard JRE.

Well said.

I wanted to be a rebel and do it from scratch… writing out to pixels… drawing images, circles, lines, all sorts of fun. Total bad ass. And total waste of time.

Use whatever you want dude.

Sometimes that is fun, too. :slight_smile: But that’s different from typical Java2D, since you are rendering by hand, and learning lots about bits, bytes, and cool tricks.

My last Java2D project rendered a 3D procedural earth in real-time… I learnt a lot from that, but, of course, barely any of it was using the Java2D APIs. And at the end of it all, it performed like crap on most machines, and would have been many times more efficient as a shader.

well, i honestly have nothing to say with you guys, i started Java 4 months ago (2 months serious work) so as a super duper total n00b ::slight_smile:
i will follow your advice and start learning LibGDX 8)
thank you very much for you help

It was awesome, some of my favorite math dealt with colors… you can do so many cool color operations with some neat math.


// multiplies two values (0-255) together as if they were between 0 and 1
int mul(int a, int b) {
  return (a * b + 255) >> 8; // same as (a * b) / 255
}
// mixes to values (0-255) by delta (0-255) amount. 0 delta will result in a, 255 delta will result in b.
int mix(int a, int b, int delta) {
  return mul(a, 255 ^ delta) + mul(b, delta); // same as mul(a, 255 - delta) + mul(b, delta)
}

So you could do things like Blending functions pretty easy:


	public static final Blend Alpha = new Blend() {
		public int blend( int o, int n ) {
			return Color.mixRGB( o, n, Color.alpha( n ), Color.alpha( o ) );
		}
	};
	public static final Blend Additive = new Blend() {
		public int blend( int o, int n ) 	{
			return Color.add( o, Color.scaleRGB( n, Color.alpha( n ), 0 ) );
		}
	};

Fun fun!

@davedes
I didn’t install any extra things, so what I’m using is standard download and install from http://www.oracle.com/technetwork/java/javase/downloads/index.html (Also notice, how I myself mentioned that everything in Java were libraries… So you’re just repeating what I already said with your “bla bla library bla bla” :slight_smile: )

@the general popylation
And someone that has programmed for a few month probably should spend their time learning basic concepts before trying to learn graphics programming. I know a lot of people in here thinks that a game is utter crap, unless it has fancy graphics that can rival that of AAA companies, and thus it’s a big must to learn OpenGL… But imho then that’s utter and complete bullshit. Graphics is the least important in a game. :slight_smile:

Like I said; it’s not part of the standard JRE. Maybe your JRE or JDK installation included the optional Java3D libraries.

[quote]@the general popylation
And someone that has programmed for a few month probably should spend their time learning basic concepts before trying to learn graphics programming. I know a lot of people in here thinks that a game is utter crap, unless it has fancy graphics that can rival that of AAA companies, and thus it’s a big must to learn OpenGL…
[/quote]
… Exactly why newbies should start with LibGDX. It lets you jump right into making a game, rather than spending your time writing game loops, tiled map editors/loaders, input management, UI, etc for Java2D.

Case in point:
Java2D vs LibGDX

Am not programming for few month :stuck_out_tongue:
i learn the basics of programming with Pascal at high school (4 years ago) we also did : HTML,PHP,SQL and JavaScript
but it was very basics, the final exam was about files input/output
so am not a total noob in programming, am Just a java noob ::slight_smile: and a super graphic programming noob 8)
but i get your point :wink:

http://www.memecreator.org/static/images/memes/1260375.jpg