Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
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  
  2D platformer (Boxman)  (Read 9155 times)
0 Members and 1 Guest are viewing this topic.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Posted 2012-11-28 18:11:02 »

I started doing a 2d platformer and decided to share some thoughts of the development here. We are using Libgdx and aim for desktop and Android.

The latest screenshot:


Latest video:
<a href="http://www.youtube.com/v/MWrFUOIHpr4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/MWrFUOIHpr4?version=3&amp;hl=en_US&amp;start=</a>

Something else:
<a href="http://www.youtube.com/v/0IWoWuarjhE?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/0IWoWuarjhE?version=3&amp;hl=en_US&amp;start=</a>
Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #1 - Posted 2012-11-29 08:21:11 »

What are you supposed to do?  Clueless

Smiley
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #2 - Posted 2012-11-29 08:23:37 »

What are you supposed to do?  Clueless

I've just recently started to make the game, so there isn't much to do yet. Right now you can just jump around and so. I haven't even made the map editor yet, although I also try to add some kind of procedural map creation to this.

Edit: Right now I'm trying to make collisions work 100% accurately.

Problems:
a) Moving box on top of another moving box is not working all the time (sliding away)
b) Leaning against an object on the left seems to put you 1 pixel inside that object.
c) Some other problems I've not identified yet.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #3 - Posted 2012-11-29 17:12:12 »

I made the game area a bit bigger, 600x300. I also fixed one bug on physics, but you may still go inside walls sometimes. The problem might be, that if the position of the object is corrected, I don't go through all the other objects to make sure it doesn't affect them. I need to start polishing the code and then figure it out.

I made a randomly created path so there would be a bigger area to test the game, and noticed, that at some point drawing starts to bug a bit. I think it might be when the x-position goes negative.

Edit: use + and - to change the size of the character.
Offline supercapacitor

Junior Devvie


Projects: 1



« Reply #4 - Posted 2012-11-30 01:26:14 »

Nice! Seems to have potential. This reminds me of how mine started out (insert nostalgic smiley here) http://www.java-gaming.org/topics/bounce-2d-platformer-w-destructable-terrain/27023/view.html

Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #5 - Posted 2012-11-30 08:15:28 »

Nice! Seems to have potential. This reminds me of how mine started out (insert nostalgic smiley here) http://www.java-gaming.org/topics/bounce-2d-platformer-w-destructable-terrain/27023/view.html

Thanks, and wow! Cheesy Seems like you have put a lot more effort to your game. I'm trying to keep this small(ish), so I would actually finish the project at some point, and make it polished. I started this out as a "quick work sample" to my website, but it just keeps getting bigger (as they always do).

Two main things I'm considering right now are multiplayer and procedural map generation. Especially multiplayer is something I've never done, so it could be a real problem... And that's probably the reason I should do it.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #6 - Posted 2012-12-01 17:31:00 »

I made the highness of the jump depend on how long the player presses the up button. I don't know if it's better than before, but I like the idea of being able to control the jump better.

I should refactore the physics and collision detection part of the engine. Too many magic numbers, and the code isn't well structured.


Edit: Now you can also jump from the walls. Just lean to the wall (press to the side) and then jump. This can be done only once per jump (the character needs to be grounded in between).

I also noticed that when playing in browser, the game doesn't look as smooth as when using the Eclipse Applet viewer. Anyone got any thoughts on that?
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #7 - Posted 2012-12-05 12:27:12 »

I've been trying to port this to Android, but something is not working as I think it should. Without any heavyweight things I get around 17fps, and with everything (especially physics) on, the game freezes to < 1 fps. Apparently I'm doing something very, very wrong.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #8 - Posted 2012-12-10 13:45:54 »

I've added a way to "attack" by pressing down when the character is jumping.

Looks like hardware acceleration is not an easy task achieve with plain Java. I want to make this game without any external libraries which makes it hard to get smooth drawing... I'll need to get back to this later.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #9 - Posted 2012-12-11 10:08:18 »

I think new graphics are pretty (Teemu did those). Tongue

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline PeterNicholson

Senior Devvie


Medals: 3
Projects: 1



« Reply #10 - Posted 2012-12-11 10:10:18 »

The graphics look very nice. What program do you use? (I use Paint.NET for pixel-art, and gimp for making backgrounds)  Smiley

Subscribe to me on YouTube: http://youtube.com/javaprogrammerguy
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #11 - Posted 2012-12-11 10:23:28 »

The graphics look very nice. What program do you use? (I use Paint.NET for pixel-art, and gimp for making backgrounds)  Smiley

Teemu did mock-ups with Google Drawing. I usually use Paint.NET for everything I need to do (which isn't much or sophisticated). The drawing in the game is currently just filled rectangles - the intention is to change tile size depending on the screen size.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #12 - Posted 2012-12-12 09:01:24 »

Looks like I got the hardware acceleration to work after all. It would be nice to hear how smooth the game feels if someone has tested the Applet? You can also open the Java console while playing to see if the hardware acceleration works on your machine.

Edit: I've added one video (quite poor quality): http://www.youtube.com/watch?v=sTBJmiiL7Wo&feature=plcp
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #13 - Posted 2012-12-28 23:47:26 »

A small update. Rendering is now done in a separate thread which could make things smoother... But somehow something is still missing. You can compare the old and new implementations:

Old:
http://arttu.louhigames.com/game

New:
http://louhigames.com/2dplatformer/


The new one doesn't look as good because it has smaller blocks. I'll figure out a way to draw them more nicely.

All feedback is welcome as well as tips on how to make the game run smoothly.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #14 - Posted 2012-12-29 20:29:14 »

I added a bit longer tether to the camera and now this

http://louhigames.com/2dplatformer/

version looks "good" I think.

Content would be nice.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #15 - Posted 2013-01-29 07:29:36 »

I've added digging and building, and simple sounds.

Arrow key + x => digging.
c + arrow key => building.

Seems to be buggy and may crash. Deleting objects probably causes some nullpointers.

Jar also works as standalone:
http://louhigames.com/2dplatformer/
Offline HeroesGraveDev

JGO Kernel


Medals: 294
Projects: 11
Exp: 3 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #16 - Posted 2013-01-29 07:41:49 »

If your OS is Windows, you can use Microsoft Expression Encoder for screen recording.

It has amazing performance even with high quality recordings.

And it's free for the full version.

http://www.microsoft.com/en-us/download/details.aspx?id=27870

That might help you get a better video.

Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #17 - Posted 2013-01-29 09:52:58 »

If your OS is Windows, you can use Microsoft Expression Encoder for screen recording.

It has amazing performance even with high quality recordings.

And it's free for the full version.

http://www.microsoft.com/en-us/download/details.aspx?id=27870

That might help you get a better video.

Thanks a lot, I've added a better video. Didn't get the audio though, but I'll figure it out when I have the time.

http://www.youtube.com/watch?v=wMhLiHLCCnI

Edit: I also fixed a bug that caused a nullpointer ex and added some delay so that you could more easily jump from the edges (certain amount of time after the falling has started when the jumping is still ok).
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #18 - Posted 2013-02-03 09:07:12 »

I want the maps to be very big, so I've been implementing a way to activate and deactivate blocks based on the distance from the player. The base functionality is done and surprisingly also somewhat working, but I still need to do some performance tuning. At some point I was able to play 100x100 map without the modification, and 1000x1000 with the modification, so I think it's going to work just fine. Enjoyable programming.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #19 - Posted 2013-02-04 07:35:26 »

Now there is line of sight too. LoS and block activation / deactivation runs in a separate thread scheduled to run in intervals.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #20 - Posted 2013-02-04 14:57:23 »

Does anyone have an idea of how I could (should) make a "continuous" map, meaning that if you go far enough to one direction, you'll end up to the beginning at some point? And without the player noticing any "joints".
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #21 - Posted 2013-05-09 17:48:20 »

We have started using Libgdx for this game and it feels very promising so far. We will target both desktop and Android from now on.

http://louhigames.com/2013/05/07/we-are-back/

Here you can see "chunks" working:

<a href="http://www.youtube.com/v/HU3FMl0hsFI?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/HU3FMl0hsFI?version=3&amp;hl=en_US&amp;start=</a>

And here some new blocks:

<a href="http://www.youtube.com/v/elHqm3j_I20?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/elHqm3j_I20?version=3&amp;hl=en_US&amp;start=</a>
Offline newera31
« Reply #22 - Posted 2013-05-10 20:49:13 »

Break your maps into "sections".  If the player nears the end of a section, load the next section (from disk) in a background thread.  It's probably a good idea to keep the previous section in memory until the player nears another section.  If you need more detail, let me know.

The game looks really cool!  I like how you can create a block when jumping.  What would be neat is if you could create the block, jump off it and after a second or two, it drops (maybe on an enemy below -- killing it).

Keep up the good work!
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #23 - Posted 2013-05-11 21:10:03 »

Break your maps into "sections".  If the player nears the end of a section, load the next section (from disk) in a background thread.  It's probably a good idea to keep the previous section in memory until the player nears another section.  If you need more detail, let me know.

Yep I've done that. The map begins from (0,0) and each coordinate point is a section of a map containing blocks. The section in which the character and all adjacent sections are active, others are serialized to disk. It is not yet threaded because I had some weird problems and need to clean the design before adding concurrency. I'll post later how it works. :b I have some performance issues with Android and I think I'm killing the gc with those section loads and saves.

The game looks really cool!  I like how you can create a block when jumping.  What would be neat is if you could create the block, jump off it and after a second or two, it drops (maybe on an enemy below -- killing it).

Keep up the good work!

That sounds fun, I'll need to try it out! All the physics are not perfect yet. Earlier I had also moving blocks "done" but I had to redo most of the game when I started using Libgdx and haven't done them again yet.

Thanks a lot for the feedback!
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #24 - Posted 2013-05-11 21:11:43 »

One video to show those map sections loading:

<a href="http://www.youtube.com/v/0IWoWuarjhE?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/0IWoWuarjhE?version=3&amp;hl=en_US&amp;start=</a>
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #25 - Posted 2013-07-17 07:58:54 »

I've started adding lights with Box2d lights.



Next I should probably try to start using Box2D for collision detection too, and check if the physics would feel good in platformer. I like the game play feel of the game right now so I don't want to mess it up with too realistic physics simulation. Box2D would just allow us to make so many cool features that we are not going to be able to make ourselves.
Offline Vermeer

JGO Coder


Medals: 16



« Reply #26 - Posted 2013-07-18 09:43:50 »

That just looks so good! It really changes it with the lighting..
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #27 - Posted 2013-07-19 07:42:30 »

That just looks so good! It really changes it with the lighting..

Yeah it's amazing how much it changes the atmosphere of the game! I'm gonna concentrate a lot more to the lights and maybe use it as a game element. The graphical style might change quite a bit, but we will definitely use lights.

I'm not sure what the graphical style should be. I've been thinking about some kind of steampunk-kind-of-style mecha/tank, that could move and jump around, break blocks, and maybe get upgrades (jet packs and so on). The underground could be dark, and you'd need to use lights in the vehicle. Well, we'll see.
Offline arttu

Senior Devvie


Medals: 3
Projects: 4



« Reply #28 - Posted 2013-07-19 18:23:21 »

A short video:

<a href="http://www.youtube.com/v/MWrFUOIHpr4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/MWrFUOIHpr4?version=3&amp;hl=en_US&amp;start=</a>
Online wessles

JGO Wizard


Medals: 74
Projects: 4
Exp: 4 years


Radirius Software


« Reply #29 - Posted 2013-07-20 02:41:58 »

I think I came up with a game play Idea. You could have some blocks be corrupt, and kill you when you touch them. And make some coins! It would totally be the new doodle jump idea!

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.

trollwarrior1 (33 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (65 views)
2014-11-07 19:57:14

TehJavaDev (69 views)
2014-11-03 22:04:50

BurntPizza (67 views)
2014-11-03 18:54:52

moogie (82 views)
2014-11-03 06:22:04

CopyableCougar4 (82 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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