Author Topic: Java Game Development  (Read 1021 times)

0 Members and 1 Guest are viewing this topic.

Kaynato

  • Cutey
  • **
  • Posts: 32
  • Cutes: 5
  • bird
    • View Profile
  • Pronouns: As necessary
Java Game Development
« on: January 19, 2016, 01:53:41 AM »
Current state of Java Game Development.

Executables (NEW to OLD):
0003_MovementTest.jar
0002_MovementTest.jar

Immediate Problems:
Image not drawn when y is negative.

Immediate Goals:
Animated image.
Composite object (multiple images / animated images)
Collision.
Exits when escape key is pressed.
.
« Last Edit: December 16, 2016, 01:43:48 AM by Kaynato »

hubol

  • Cutester
  • *****
  • Posts: 624
  • Cutes: 74
    • View Profile
    • hubolhubolhubol
  • Pronouns: he/him
Re: Java Game Development
« Reply #1 on: January 19, 2016, 02:16:08 AM »
System.exit(0)

Kaynato

  • Cutey
  • **
  • Posts: 32
  • Cutes: 5
  • bird
    • View Profile
  • Pronouns: As necessary
Re: Java Game Development
« Reply #2 on: January 19, 2016, 04:04:37 AM »
Aye, it's there now.

EDIT:


I am concerned that I am using the Entity Component System in a bad way. For example, with comparing "DEPTH" of objects I was using coordinate data and camera data, but, for exceptions, I made a new Component. For every exception, will I make a new component? Is this really bad for memory? Is this just bad? Is it not the right thing? MORAL COMPUNCTIONS.
« Last Edit: December 16, 2016, 01:43:59 AM by Kaynato »

hubol

  • Cutester
  • *****
  • Posts: 624
  • Cutes: 74
    • View Profile
    • hubolhubolhubol
  • Pronouns: he/him
Re: Java Game Development
« Reply #3 on: January 19, 2016, 04:30:55 AM »
you should just have some integer field "depth" for your entities which can be modified by entities whose depth changes and for others it is not manipulated after the constructor

Kaynato

  • Cutey
  • **
  • Posts: 32
  • Cutes: 5
  • bird
    • View Profile
  • Pronouns: As necessary
Re: Java Game Development
« Reply #4 on: January 19, 2016, 07:21:13 AM »
But what if you move behind a rock... When you are in front of the rock, it is behind you, but when you go behind the rock, you are behind the rock. That, I guess, is the reason for using coordinate-based depth for non-exceptions...

So, your idea is pretty great.

I guess I could have some Depth calculation and whatever also in the Sprite Render System so I don't clog up my code with unnecessary new systems.

aimaina

  • Administrator
  • Cutester
  • *****
  • Posts: 648
  • Cutes: 61
    • View Profile
  • Pronouns: she/her
Re: Java Game Development
« Reply #5 on: January 19, 2016, 01:19:05 PM »
i dont know what "using coordinate data and camera data" means but in game maker i always do stuff like that by just putting "depth = -y" or something in the step event, so that as you go farther up the screen your depth gets deeper

hubol

  • Cutester
  • *****
  • Posts: 624
  • Cutes: 74
    • View Profile
    • hubolhubolhubol
  • Pronouns: he/him
Re: Java Game Development
« Reply #6 on: January 19, 2016, 01:40:02 PM »
yeha tahts exactly what i meant too... you could modify the depth for those situations!

Kaynato

  • Cutey
  • **
  • Posts: 32
  • Cutes: 5
  • bird
    • View Profile
  • Pronouns: As necessary
Re: Java Game Development
« Reply #7 on: January 24, 2016, 05:38:10 AM »
I fixed a bunch of stuff and got rid of some super-redundant files...

download link at bottom

There's a gravity test which just confirms that I separated "passive" and "active" accel and velocity, so friction (for stopping active movement) only affects the active component... If you move sideways, disabling friction as such, you still fall at the same rate

I have right now also a version where you can change the scaling with keys...

But, I really should be focusing on the music and collisions (you will just fall down here) :x