Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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  
  Falling Rocks  (Read 1897 times)
0 Members and 1 Guest are viewing this topic.
Offline Gibbo3771
« Posted 2014-01-19 16:29:55 »

This was my second game that I made using the LibGDX framework, I originally jumped right into Pong which don't get me wrong, worked but seemed terrible so I decided to go back to basics and actually do something simple. So here we have it, falling rocks.

You play a cave explorer called Jim, after falling into a trench and upsetting the natural balance of the cave, you soon realise that you have caused a landslide of rocks and gems. Avoid the rocks and collect the gems, don't let Jim get crushed by too many rocks!

Although this game is getting very little attention, I am aware that it is just a reinvention of the wheel but going back to my first ever game and re-writing it with everything I've learned, has helped me learn so much more. As I work on other projects I will continue to add and mess with this so enjoy the updates.



Controls

A - Move Left
D - Move Right
B - Toggle Background
L - Toggle Difficulty Display
F - Toggle FPS Counter
R - Reset Score ( PERMANENT)
Left Alt - Show/Hide Cursor


Some art for you to look over!










Current Features Playable v1.0.0:

  • Full Box2D Physics and partial lighting
  • Chance based spawn system
  • Simple but informative user interface
  • Collect animation and score count indicator
  • Damage indicator
  • Camera shake
  • 4 Treasures to collect
  • 2 Health pickups
  • Highscore saving
  • 4 Difficulties, 2 unlockable
  • Menus
  • Gameplay music
  • health and gem pickups created using Bxfr

Planned:

  • Sound effects
  • New player sprite set
  • Power ups
  • Buff and Debuff drops(slow you down, speed you up, increase spawn rate, shrink size etc)
  • Game modes(Got 1 planned, way off it though)

Download:

https://bitbucket.org/Gibbo/falling-rocks/downloads

The source code should be visible, new to bitbucket. The code is pretty poor, it was written a month into me learning Java (6 or so month ago) Should look better as I refactor and add the changes.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Drenius
« Reply #1 - Posted 2014-01-19 17:37:47 »

Extremely simple but already quite nice.
If 'Jim' is a cave explorer, you yould add some kind of cave background, it could increase the look a lot.
Oh and why all the gems on death?
Offline Gibbo3771
« Reply #2 - Posted 2014-01-19 20:17:27 »

The gems on death don't add anything to your score, was simply a place-holder thing to show the game was over. Looked better than nothing lol.

I was in the process of adding a Game Over screen when I was working on it but stopped for some reason, so gonna polish it.

Cave background would be nice yeah, all the artwork is from opengameart.org. I will probably make my own graphics but time is not exactly in my favour atm with work + college hehe.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Gibbo3771
« Reply #3 - Posted 2014-01-20 21:24:30 »

Update v0.8.1

No visual changes in game  Sad

Code changes:

  • Removed a ton of duplicate code
  • Moved code to more appropriate places, e.g make Jim handle his own screen bounds
  • Refactored the update method of the FallingEntity class to be less ugly with less "instanceof" checks
  • Added a little Javadoc, will add more later
  • Added licencing to the classes

Next update I will be moving from LibGDX rectangles to Box2D bodies. Feel free to download, afaik you can download the source, if not let me know. It is free for anyone to use but not distribute.


"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Gibbo3771
« Reply #4 - Posted 2014-01-28 11:12:03 »

This update is not so much a new playable version of the game but is is the first version taking the game from basic collisions to having an implemented physics engine.

I have implemented Box2D and now all my entities use it, this adds for a more interesting gameplay when something lands, if the player is hit etc.

Deeper into the code I am still factoring things to make more sense, I have changed various classes and added some new ones to make the code seem less messy, I want to make more use of interfaces as well but my Java API knowledge just can't seem to find a reason at the moment. I have changed the class Jim to just be called Player for clarity. Others things are being added as well, such as a tier system for balance (I want to add stuff later, like special teasures, healthpacks, other things that can fall and damage you)

Below is a list of things I want to add to the game in the long run:

  • Other pick-ups (healthpack, powerups)
  • Other things to dodge
  • Level layouts would be cool but long way from that
  • More but unrealistic at this stage, so keeping sekret Cheesy

From CHANGELOG
0.9.0  -

Unplayable (no player) - STABLE

New
   
  • Started keeping track of versions
  • Implemeted Box2D Physics engine
  • Added propery boundary, we now have walls
  • Added filtered collisions, Rocks collide with nothing but the Player, Gems collide with Gems + Boundary etc etc
  • Slow down world simulation with UP and speed up with Down (good for testing for collison inaccuracies, which I know are present)

Changes
  • Refactored how entities are spawned, I can sorta fine tune it a little better now for balance
  • New rock textures, now have 5 different rocks with own box2d shapes (These are technicaly changes, but new at the same time. Changes extends New, implements Awsomeness)
  • New gem textures, each Gem now has a higher resolution texture to match the new rock textures

Download -
https://bitbucket.org/Gibbo/falling-rocks/downloads

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Gibbo3771
« Reply #5 - Posted 2014-01-28 22:34:11 »

A playable update!!

Added Jim back into the game, still working on a new set of sprites for him so you will have to good looking at that one for a while Cheesy.

Rocks damage you on first contact, from all angles. Gems get picked up by walking into them (nothing fancy atm, simply disappear).

Hope you enjoy Smiley

Here is the change log:

From CHANGELOG
0.9.1 -

Playable

NEW
  • Added 4 difficulties to the game, Easy, Normal, Hard and Impossibru. Use 1-4 to change difficulty dynamically in-game (will add proper functionality later)
        Easy -  Spawn time is doubled, chance of gems is doubled
       (Default) Normal - Spawn time is normal, chance of gems is normal
       Hard - Spawn time is 1.25x faster, chance of gems is reduced by 1.25x
       Impossibru - Spawn time is 2x faster, chance of gems is halved   
  • The player now uses Box2D body and Dermetfans AnimatedBox2DSprite class

CHANGES
  • Refactored the Player class to have a proper state system
  • Refactored the entity heirarchy, everything is now an entity within its own category (Collectible, Dangerous etc)

FIXES
   
  • Changed the way you control the character, will no longer get stuck when pressing one rapidly after the other
  • Game no longer crashes if 2 or more rocks overlap and go past the bottom boundary
   
Download -
https://bitbucket.org/Gibbo/falling-rocks/downloads#download-302435

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Gibbo3771
« Reply #6 - Posted 2014-02-05 20:28:03 »

    Big update Cheesy

    Been messing around quite a bit for the last few days, learnt a lot and got some nice reusable code snippets!

    This version is playable and imo, it looks considerably more polished that what I initially expected. Would appreciate some feed back, negative or positive, bugs etc.

    Feel free to post high scores as well lol.

    I will update the OP with the current features and a non shit screenshot.


From CHANGELOG
0.9.2 -

Playable

New

  • Implemented Box2DLights, it looks a bit more natural now that rocks come from darkness above
  • Added a Glowstick to the game (for future game-mode)
  • Added 2 new pickups to the game, First Aid Kit(+25), Medi-Kit(+100)
  • Added pick up animation, entities now float when walked over and fade out
  • Added score/damage/healing indicators
  • Added a health percentage on the healthbar
  • Added a background image, will add more to it later (those ejyption markings or something) B to disable (for whatever reason)
  • Added a death transition, for now it just fades the lighting out and the player accends to the heavens. Then a new game is automatically started
  • Added FPS counter, toggle with F (Default - Off)
  • Added difficulty display, toggle with L (Default - On)
  • Cursor is now locked to the screen, press Alt to release it
  • Added camera shake when hit with rock
  • Reset highscore by pressing R, temporary placement until I implement menus

Changes

  • Changed the font to look more "snazzy"
  • Gems/rock now have a variable size, their value is now determined using the following forumula: value = (value/dmg * size) * difficulty
  • Refactored the entire spawn code, it is more efficient and adaptable now
  • Items no longer lie on the ground indefinetly, they eventually expire
  • Balanced values to math new spawn rates, still needs work
  • Added camera shake when hit with rock

Fixes

  • Rocks should now collide with the side of the player and not just the head

Bugs

  • If a rock hits the player hard enough, it ends up stuck on his head like a hat
  • Sometimes the player will collide with a gem, resulting in you kicking it half way across the screen (no idea whats up with that)

Check OP for download link and commit

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 784
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2014-02-06 19:23:26 »

If you want more feedback, you could post more images of your progress. Very few people would actually enjoy plowing through changelogs.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Gibbo3771
« Reply #8 - Posted 2014-02-06 19:51:19 »

If you want more feedback, you could post more images of your progress. Very few people would actually enjoy plowing through changelogs.

Yeah I wanted to add images of the art I created for it but did not want to spam the thread with loads of pictures hehe. I will make the next update more "visual".

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Gibbo3771
« Reply #9 - Posted 2014-02-22 11:55:13 »

I think the game is pretty much ready for version 1.0.0 now! Officially beta, the point of no return. I think from here, anything I add to it will be purely for shits and giggles. It has been fun and all but I think I will be working on some of my other project ideas, use this for a code dump and reference, it has taught me so much! Cheesy.

What have I added?

NEW MENUS









Well yeah, new menus...that's great and all but I even took the time to self record some sounds, now when poor Jim gets whacked with rock he makes a rather odd grunting noise.

Added some 8bit pickup sounds as well, for some reason.

Oh, there is music, not composed by me of course but from open game art.

Did I mention I implemented touch controls and performance tuned it for android? It could be on the market in the near future. (Really need to replace that stupid player sprite)

Here is a proper list, from the change log:

1.0.0

Playable - Stable

NEW
  • Added a main menu
  • Added a difficulty select menu
  • Added after death menu
  • Touch screen controls implemented for android
  • Click sound effects for menus
  • Gem and health pack pickup sounds using Bfxr
  • Rock impact and player damage sounds (recorded by my awesome microphone)
  • Added a music track during gameplay
  • More I can't really remember Sad

CHANGES

  • Balanced difficulties slightly, the jump from easy to normal was enormous
  • Refactored asset code, the game now runs MUCH more efficiently (Solid 60fps on 4 different android devices of different hardware capabilities)
  • Removed dynamic difficulty changing during gameplay
  • God mode now requires some super sekret key combination
  • Removed Box2D debug mode


FIXES
  • Rocks will now properly be deleted after passing the bottom of the screen
  • Player will no longer collide with gems and health packs while ascending to heaven after death

BUGS
  • If a rock hits the player hard enough, it ends up stuck on his head like a hat, funny but very annoying
  • Sometimes the player will collide with a gem, resulting in you kicking it half way across the screen (no idea whats up with that)

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Pages: [1]
  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.

Nickropheliac (16 views)
2014-08-31 22:59:12

TehJavaDev (24 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (42 views)
2014-08-19 09:29:53

Tekkerue (41 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (26 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (73 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
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!