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 [2]
  ignore  |  Print  
  Fix "my" method to make an object A move toward X,Y coordinates  (Read 2515 times)
0 Members and 1 Guest are viewing this topic.
Offline alaslipknot
« Reply #30 - Posted 2013-04-22 02:02:41 »

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   Roll Eyes
i will follow your advice and start learning LibGDX  Cool
thank you very much for you help


"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Reply #31 - Posted 2013-04-22 02:30:30 »

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

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

1  
2  
3  
4  
5  
6  
7  
8  
// 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:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
   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!

Offline Regenuluz
« Reply #32 - Posted 2013-04-22 09:13:20 »

@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" Smiley )

@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. Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davedes
« Reply #33 - Posted 2013-04-22 14:40:15 »

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
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.....
... 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

Offline alaslipknot
« Reply #34 - Posted 2013-04-22 15:39:29 »

@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. Smiley

Am not programming for few month :p
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  Roll Eyes and a super graphic programming noob  Cool
but i get your point  Wink

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Pages: 1 [2]
  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.

Grunnt (13 views)
2014-09-23 14:38:19

radar3301 (14 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 (105 views)
2014-09-10 06:39:09
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!