Mr. Rectangle's Adventure

Hello I am a 13 year old wanna-be game developer and this is a small “game” if you want to call it that. It’s in it’s first build that means what I first created (keep in mind I have pretty much 0% experience in java though I have learned quite a lot so now I have like %10 experience :stuck_out_tongue: In the .zip file will contain the executable jar file for my 1.0 Beta, all of the source code (in .java format) and READ-ME. Please do not hate but give constructive criticism and give me recommendations or any errors you may have! :slight_smile: ~Devin


UPDATE TO 1.3 CHECK MY NEXT POST ON THIS TOPIC!

Hey! Welcome to the forums and to game programming :slight_smile:

It looks like you messed up your link, if you edit your post there should be a button that looks like a world, click on it. It should do this :

[url][/url]

Or something like that. Just insert your link in between!

Nice job!

I might suggest a few things:
1: In the README, you shouldn’t be worried about if it runs on mac. This is java! It will run on pretty much everything (Even microwaves use java (no, microwaves will not use your game)). Unless you are working with a native library, but… baby steps.
2: The control seems a bit lagged.
3: Organize and clean up your code a bit. ‘Keying’ does not make much sense as it is your character and your key event listener. How about a ‘Player’ and a ‘World’ and a ‘Keying.’ It is just more organized. Trust me. Organization is key for coding. It will pay off in debugging.

Hope this helps!
Good luck on your coding endeavors!

P.S:
My formula for finding your amount of java learned:
your geuss * 0.1
You can never stop learning! ;D (unless your guess is >= 1000%)

Don’t worry, it’s working on my mac.

Thanks for all of the suggestions I will keep working!

I have updated the “Game” to 1.3 ;D ! Added: Clouds, Obstacles, and different colored terrain!!!
Includes Updated README, Updated Source Code and of course UPDATED GAME!
MAKE SURE YOUR COMPUTER RESOLUTION IS SET TO 1440x900 OR HIGHER!!!
Link:


Have Fun! ~Devin

The rectangle can move into the floor. See this.

I know this until i get better with java this may be a problem :frowning: new update currently in development

By the way ill except any coding help to fix the floor glitch! ;D

Your code looks like a simple GUI app, not like a game. The problems are

  • You are using layouts. A game should not use any layout managers.
  • Never make a new panel for the game’s background. You are using [icode]Images.java[/icode] to act as a Background.
  • In [icode]Keying.java[/icode] you are creating a new point object whenever the mouse moves or clicks. You have to reuse the existing object.
  • You have a private nested class called [icode]thread[/icode] inside [icode]Keying.java[/icode] which appears not to be used. Also you should name classes such that their first letter should be capital.
  • You are calling [icode]repaint()[/icode] in your [icode]paintComponent()[/icode] method. This will become a large flaw since you have no control on the timing. It’s better to use a GameLoop.
  • You are not using a proper collision detection system and you haven’t had a base class for your game objects.
  • You are doing your collision detection in the [icode]paintComponent()[/icode] method which causes tearing and flickering when the player moves.
  • And finally, you are using passive rendering which can drastically decrease the performance of your game. Try to use active rendering.

Be sure to fix these issues before doing any further updates for your game.

Some articles for beginners.

Hope this helps.

You’re checking the middle of the rectangle, whereas you should be checking the edges.

[quote]Make sure your computer resolution is set to 1440x900 or higher!!!
[/quote]
What?!

The window size is set to 1440x900.

Well you just lost a load of potential players.

Most common resolutions: 1366x768 and 1024x768. Why would you restrict the resolution to something so high?

I apologise if I come across as angry, but it really annoys me when a window doesn’t fit on my screen.

Very true. Allow the user to resize the window, all you’ll have to do is make sure your graphics are rendered using getters for the actual window width and height. Its really pretty easy and you’ll make people very happy.

Ok i will fix it

[qu/java/J8d_Game_Framework.html]Java GAME Programming - Game Engine & FrameWork[/url][/li]

Hope this helps.
[/quote]
The thread is for jumping and im working on the floor glitch im trying to figure everything out!

The thread is for jumping and im working on the floor glitch im trying to figure everything out!
[/quote]
… What are you even trying to say here? Again, you really should stop developing this game and learn how to do it the “right” way. The way you’re doing things right will only develop bad coding habits and wont show you how to properly code a game.

I am going to relearn java 2d game programming me and a couple of my friends are going to work together to create a game source code files will be available to anyone who wants to take this project over thank you!