Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Nine Levels (Now available on Google Play)  (Read 5122 times)
0 Members and 1 Guest are viewing this topic.
Offline bornander
« Posted 2017-12-09 19:39:00 »

I have decided to build a platformer game for Android.

Finally released!

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

In past posts here on JGO I've stated multiple times  (like this, this or even this) that I will never do another game that requires me to design levels but I think that if I limit the number of levels to a ridiculously low number, like nine, I should be fine.



Link to Google Play;




So I'm going to call this game Nine Levels, it will be a 2D platformer where the objective is to collect all the collectables (most likely gems or coins) as fast as possible. To add replay-value I'll keep track of the best times and the plan is to also include Google Play leaderboards so that the players can compare their time to other players.

Right now the game is a very early stage and I am trying out some core mechanics that I would like to implement:
  • Basic jumping (obviously)
  • Enemies patrolling between two points
  • Enemies that walk until they hit an obstacle and then turn
  • Enemies that fly and attack when spotting the player
  • Enemies that can be killed by jumping on them
  • Enemies that can be hurt by jumping on them
  • Two way platforms (i.e. platforms that you can jump up through them, but down fall through them)
Additional things
  • Google Play leader board integration
  • Google Play achievements (not sure if this really adds anything)

I am using libGDX for the game library and  Box2D for the physics, not because it is necessarily a good fit for platform physics but becuase I really like it and want to get better at it.
Rendered using the debug renderer it right now looks like this:
Click to Play


For graphics and audio I'll try to find some CC0 licensed assets, which likely will mean I'll turn to Kenney again as he is awesome.

I'll try to post somewhat regular updates on my progress here and any comments you guys might have is greatly appreciated.

Thanks.




Try my Android games: Grapple | Hovercraft | Lala
Offline bornander
« Reply #1 - Posted 2017-12-14 21:59:21 »

To implement one-way platforms (that is a platform the player can jump up through, but will not fall down through) I hook into the Box2D contact listener.
My game entities can be either Contactable or Collidable, they're both sort of similar but have slightly different capabilities:
  • Contactable
    The entities are notified when a contact occurs, at which point they're given the other object and their Fixture that was involved in the contact.
  • Collidable
    The entities are notified when a collision occurs and can tell Box2D to cancel the collision before any collision response have been applied.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
      world.setContactListener(new ContactListener() {
         @Override
         public void preSolve(Contact contact, Manifold oldManifold) {
            Fixture fixtureA = contact.getFixtureA();
            Fixture fixtureB = contact.getFixtureB();
           
            Object userObjectA = fixtureA.getUserData();
            Object userObjectB = fixtureB.getUserData();
           
            boolean disableContact = false;
            if (userObjectA instanceof Collidable)
               disableContact |= ((Collidable)userObjectA).collides(userObjectB);

            if (userObjectB instanceof Collidable)
               disableContact |= ((Collidable)userObjectB).collides(userObjectA);
           
            contact.setEnabled(contact.isEnabled() && !disableContact);
         }
         
         @Override
         public void postSolve(Contact contact, ContactImpulse impulse) {
            contact.setEnabled(true);
         }
         
         @Override
         public void endContact(Contact contact) {
         }
         
         @Override
         public void beginContact(Contact contact) {
            Fixture fixtureA = contact.getFixtureA();
            Fixture fixtureB = contact.getFixtureB();
            Object userObjectA = fixtureA.getUserData();
            Object userObjectB = fixtureB.getUserData();
           
            if (userObjectA instanceof Contactable)
               ((Contactable)userObjectA).handleContact(fixtureA, userObjectB);

            if (userObjectB instanceof Contactable)
               ((Contactable)userObjectB).handleContact(fixtureB, userObjectA);        
         }
      });


Using these interfaces the Player entity can check when the collision occurs if it is with a part of the terrain that has been marked as one-way, and if it is, cancel it.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
         if (terrain.isOneWay()) {
            if (isFallThroughOneWayPlatformsEnabled())
               return true;
           
            if (isMovingUp())
               return true;
            else {
               float py = body.getPosition().y;
               float ty = terrain.getVerticalPosition();
               boolean playerCenterIsBelowTerrain = py < ty;
               
               if (playerCenterIsBelowTerrain)
                  return true;
               else {
                  boolean playerCenterIsMostlyAboveTerrain = py - ty < Player.bodyRadius * 0.975f;
                  if (playerCenterIsMostlyAboveTerrain)
                     return true;
               }
            }
         }


It requires a bit of logic to determine if the Player is sufficiently above the platform (in my case 2.5% of the size radius of the player)  to enable it, also to allow the player to drop down through a platform on command.

I thought it would be tricky to-get one-way platforms to work but it turned out to be a lot easier than dealing with other edge-cases of the implementation.

Try my Android games: Grapple | Hovercraft | Lala
Offline bornander
« Reply #2 - Posted 2017-12-16 20:57:29 »

So I am using TileD to create the levels and for past project I've built the visual parts as tiles and the physics world as geometric shapes in a object layer rather than a tile layer. That approach give great flexibility but it also means that the world has to be defined twice, first visually then physically, it can get a bit messy if the levels have many things going on as can be seen in this gif from a previous project of mine:
Click to Play


For this project I've opted for a different approach, this time I've applied metadata to the tiles in the tile set used in TileD, and then my level loader reads that and build the physical world from the visual parts.
I'm not sure it's a better approach yet but so far it seems to be working Ok and I am getting levels built and tested faster than before.

The gif below shows what the first test level looks like with and without the visual parts on top of the physical Box2D world:
Click to Play


I am using a tile set from an artist called GrafxKid, I think it looks cool and it'll probably be the one I use for the final version.

Try my Android games: Grapple | Hovercraft | Lala
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bornander
« Reply #3 - Posted 2017-12-20 22:42:12 »

So I playing around implementingan an enemy, if it walks into the player then the player dies:
Click to Play


Initially I thought I was going to use a Kenney sprite-sheet and my plan was to make the player jump twice on the little alien guys that Kenney has so many of, first jump to knock off their helmet and the second jump to kill them.
I am now leaning towards using this sprite-sheet from GrafxKid instead and as luck would have it he has a character that can be dispatched using two jumps as well:
Click to Play


I am not sure it's clever to have an NPC that is taller than one tile, but I guess if I design the levels so that they never occupy an area where the available height is just one tile it should be ok.

Try my Android games: Grapple | Hovercraft | Lala
Offline bornander
« Reply #4 - Posted 2017-12-23 15:39:56 »

As this game uses an on-screen joystick and the feel of it is important I wanted to give the player the ability to customize the size a bit.
I've added a settings screen where this can be configured and the way it is previewed is by showing the controls as they would appear in game when the user change the size, and then fade them out to avoid them cluttering and making the settings screen confusing:

Click to Play



Update!

I've added a HUD showing the number of coins left to collect and the elapsed time (the font used was part of the graphics pack I am using for the levels).

I've also fixed it so that spinning coins are displayed and there's a new type of enemy, a blue slime thingie that right now cannot be destroyed but I am thinking I'll probably make it so it can be jumped on and squashed or something.

Click to Play


Next task will probably be different materials for the ground as the tile-set comes with this cool winter theme and I want to have slippery ice in the game.

Another update!

I've added breakable brick blocks that can be destroyed in a very Marioesq manner by jumping into them from below, each consecutive hit earns one coin and after 4 coins the brick breaks, the idea being that it will provide a choice in some situations; either break the brick as soon as it's encountered or use is as a step to reach another place first, then come back and break it.

I've also added a new enemy, a bird that sits perched until the player gets close then it starts chasing the player, if it gets really close it dashes towards the player at a slightly higher speed.

Click to Play


Next update will be adding music and completing all the levels, after that it's really only Google Play integration for the leaderboards that remain.




Try my Android games: Grapple | Hovercraft | Lala
Offline Apo
« Reply #5 - Posted 2018-01-06 15:33:39 »

It looks really nice. Can't wait to play it. =)
Offline bornander
« Reply #6 - Posted 2018-01-10 19:41:45 »

It looks really nice. Can't wait to play it. =)
Thank you, hopefully it shouldn't be that much longer until it's finished.

In the meantime; I've added another enemy, this time an exploding pumpkin because what game is complete without one of those:
Click to Play

They drop at a configured interval and walk until they hit another Box2D body, they have a set life-span and at the end they stop and explode.
The explosion causes a small shockwave that might push the player off a ledge if he/she is close enough.

The pumpkins cannot be killed.

Also, posting this gif I realize that the parallax background for this level is wrong, it should be a snowy one instead of grassy hills  Emo

Try my Android games: Grapple | Hovercraft | Lala
Offline Gornova
« Reply #7 - Posted 2018-01-10 21:43:39 »

Good work so far, I like it! I've made some platformers in the past and found really fun to do and to play Cheesy

Hope you will release soon as desktop/web too so I can try it Cheesy

Idea: add some mid/final bosses and some puzzles, my 2 requests Tongue

Blog | Last game Drone Swarm
Offline bornander
« Reply #8 - Posted 2018-01-13 22:48:52 »

Good work so far, I like it!
Thank you for the feedback @Gornova, it's very much appreciated!

I've made some platformers in the past and found really fun to do and to play Cheesy
Are any of them available somewhere where I can try them?

Hope you will release soon as desktop/web too so I can try it Cheesy

Idea: add some mid/final bosses and some puzzles, my 2 requests Tongue
It's very likely I'll disappoint you on both requests I am afraid.  Cry

When I did Grapple, I found out that I am not very good at creating platform puzzles. In Nine Levels the only puzzle will be figuring out the fastest way to beat the level.

As for bosses, initially I hadn't planned on adding any since the game doesn't really progress like a platformer with an over-arching goal (like saving the Princess in Super Mario Brothers).
Having said that; I also like to incorporate feedback I get as I post the progress here (which is part of the reason I post about my games), so let me get back to you on that one. I just might add some sort of boss  Smiley .


Try my Android games: Grapple | Hovercraft | Lala
Offline Gornova
« Reply #9 - Posted 2018-01-14 16:50:35 »

Sure, feel free do give us a demo too Tongue

You can find my games on my blog:

- Zombie employee
- Fuzzy
- Childhood toys
- Gravity duck tribute

Blog | Last game Drone Swarm
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bornander
« Reply #10 - Posted 2018-01-24 19:48:37 »

So progress on this is fairly slow but I'm close to a point where I've got all the levels playable and most (if not all) of the game mechanics done.

Next large piece of work is Google Play leaderboard integration and creating the store listing, two tasks that are boring and therefore likely to take a lot longer than they should Sad

In the meantime; here's a game-play video that includes the music for the game (the music is made by Sketchylogic):

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

Apologies for the dodgy frame-rate in the video, capturing it proved more than my old laptop could handle  persecutioncomplex

Try my Android games: Grapple | Hovercraft | Lala
Offline bornander
« Reply #11 - Posted 2018-01-29 19:35:55 »

Leaderboards are mostly done and I've also added an achievement for each level that is unlocked when the level is completed.
As all the levels are named after video game characters the achievements are quotes from those characters:

Here we go!


To the edge of the universe and back.


...


I'll always have a minute for you.


Colder than a walk-in fridge.


I hate tombs.


Hiya!


Muscle and motion.


Is that a popcorn machine?



Having completed these means that the game is now feature complete. I'll spend some time testing it and then I'll release it to Google Play.

If anyone who's on Android is interested in helping me test this, feel free to send me your gmail address and I'll add you to the list of alpha testers.

Try my Android games: Grapple | Hovercraft | Lala
Offline bornander
« Reply #12 - Posted 2018-02-01 14:19:09 »

I've created an attempt at a Google Play store trailer for the game, any feedback you guys might have is greatly appreciated.

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

Try my Android games: Grapple | Hovercraft | Lala
Offline zngga
« Reply #13 - Posted 2018-02-01 17:05:29 »

The recording feels like the game was lagging big time. A little painful to watch actually. I wouldn't recommend using it on the store page. Content wise, It was lovely, but hard to watch.

My code never has bugs... it just develops unexpected features!
Offline bornander
« Reply #14 - Posted 2018-02-02 10:32:32 »

The recording feels like the game was lagging big time. A little painful to watch actually. I wouldn't recommend using it on the store page. Content wise, It was lovely, but hard to watch.

I'm on a crappy old laptop that struggles with capturing at a decent frame-rate, I've created a new version where I've tried to address this to a certain extent.
I've also compressed it in time and tried to be more visible about the fact that it is not an auto-runner (so I have more footage of the player running to the left).

New version of the trailer:
<a href="http://www.youtube.com/v/3-uzczmH2to?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/3-uzczmH2to?version=3&amp;hl=en_US&amp;start=</a>

Thanks for your comment @zngga, I very much appreciate it.

Try my Android games: Grapple | Hovercraft | Lala
Offline zngga
« Reply #15 - Posted 2018-02-02 15:23:42 »

That is so much better!

My code never has bugs... it just develops unexpected features!
Offline Apo
« Reply #16 - Posted 2018-02-02 17:22:24 »

Yes, much better.

Only one tip:
All in all imho you should make the trailer a little bit shorter. There are sequences where you are running or collecting coins. And you have seen it some seconds before too. You know most players "have no time" and they dont like repetition.
Offline bornander
« Reply #17 - Posted 2018-02-04 08:28:57 »

Yes, much better.

Only one tip:
All in all imho you should make the trailer a little bit shorter. There are sequences where you are running or collecting coins. And you have seen it some seconds before too. You know most players "have no time" and they dont like repetition.

Fair point, I'll cut some parts out and see if I can't get the whole thing to be around45 seconds long.

Thank you for the helpful hints, @Apo.

Try my Android games: Grapple | Hovercraft | Lala
Offline Gornova
« Reply #18 - Posted 2018-02-04 10:14:17 »

I like trailer, well done and I agree on a shorter version, 45 seconds for me is enough

Blog | Last game Drone Swarm
Offline br0ken_m1nd

Junior Devvie


Medals: 7
Projects: 1



« Reply #19 - Posted 2018-02-05 04:09:42 »

This looks like a really nice project, I'm looking forward to see the final product.

BTW, the google play link is not working, are you gonna release any alpha/beta version any time soon? I would really like to test it.

Cheers.
Offline bornander
« Reply #20 - Posted 2018-02-05 07:23:59 »

This looks like a really nice project, I'm looking forward to see the final product.
Cheers.
Thank you! Getting nice comments like this makes it so much more fun to tinker with hobby game development.

BTW, the google play link is not working, are you gonna release any alpha/beta version any time soon? I would really like to test it.

It's in closed alpha (as in tested by me and my kids Smiley, but should go to open beta within thr next couple of days, hopefully. There still a few issues around that need sort first.

Again, thanks for the comments I appreciate it.

Try my Android games: Grapple | Hovercraft | Lala
Offline br0ken_m1nd

Junior Devvie


Medals: 7
Projects: 1



« Reply #21 - Posted 2018-02-06 01:32:18 »

Quote
Thank you! Getting nice comments like this makes it so much more fun to tinker with hobby game development.
No problem! We are here to learn, share and help the community. If I can help the community I will, if a project gets my interest then I will want to be a tester, if I'm allowed to of course.

Quote
It's in closed alpha (as in tested by me and my kids Smiley, but should go to open beta within thr next couple of days, hopefully. There still a few issues around that need sort first.
Then, I will be waiting.  Grin

Keep up with the good work!
Offline bornander
« Reply #22 - Posted 2018-02-06 20:00:41 »

So this has reached a sort of first beta release, feel free to try it out if you're on Android:





Any comments are as always very much appreciated.

Try my Android games: Grapple | Hovercraft | Lala
Offline br0ken_m1nd

Junior Devvie


Medals: 7
Projects: 1



« Reply #23 - Posted 2018-02-07 00:08:28 »

Nice!
I gotta say, so far, so good.
The first levels are linear and easy, the controls work, the background music is very good.
The only thing I don't like very much is the coin's sound effect, I mean, I like the main sound effect, but the other one I don't.

I'm on aloy right now and I'm probably gonna play all the levels during the night, I gotta finish some things first.

Anyway, nice job.

PS: The game is only gonna have "Nine Levels" right? 
Offline FabulousFellini
« Reply #24 - Posted 2018-02-14 21:10:40 »

Man this looks great!

-FabulousFellini
www.fabulousfellini.com
Offline bornander
« Reply #25 - Posted 2018-02-17 14:23:00 »

Man this looks great!

Thank you!


Anyway, nice job.

PS: The game is only gonna have "Nine Levels" right? 

Thanks, and yes I am going to limit it to nine because I hate level design. Next game is going to have generated levels instead.

Try my Android games: Grapple | Hovercraft | Lala
Pages: [1]
  ignore  |  Print  
 
 

 
ivj94 (585 views)
2018-03-24 14:47:39

ivj94 (49 views)
2018-03-24 14:46:31

ivj94 (383 views)
2018-03-24 14:43:53

Solater (63 views)
2018-03-17 05:04:08

nelsongames (109 views)
2018-03-05 17:56:34

Gornova (159 views)
2018-03-02 22:15:33

buddyBro (704 views)
2018-02-28 16:59:18

buddyBro (92 views)
2018-02-28 16:45:17

xxMrPHDxx (494 views)
2017-12-31 17:17:51

xxMrPHDxx (734 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!