Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
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 Pots  (Read 4087 times)
0 Members and 1 Guest are viewing this topic.
Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Posted 2012-09-03 00:20:42 »

Falling Pots


Download: http://dl.dropbox.com/u/70454565/Falling%20Pots.rar

This is a game I made in a couple of hours (still pretty noob lol) to test LibGDX (just started learning). It's pretty bad in terms of being polished. File size is probably a little too large.

Objective - prevent the monsters from crossing the bottom of the screen and collect enough pots (Potions) to max all your stats!

Controls - Left/Right arrow keys to move, space to fire, move to a falling pot to collect it.

to max your stats you need...
4 speed pots (green)
4 dexterity pots (orange)
10 defense pots (black)
3 life pots (cyan)
3 mana pots (yellow)
2 attack pots (pink/purple)
2 wisdom pots (blue)
2 vitality pots (red)

All sprites copied from Realm of the Mad God (awesome game btw, too addicting), all sounds/music from freesound.org.
Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #1 - Posted 2012-09-04 20:52:00 »

I really like the outlined art style... I think I'll write a somehow "cool" version of this... I have a pretty fun Idea in my mind... hehe... Yeah...

*offtowork*
*tomorrow,causeI'llgotosleepnow...*

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline doppler

Senior Member


Medals: 10
Projects: 5



« Reply #2 - Posted 2012-09-05 23:24:10 »

I thought those looked familiar haha. Keep up the good work and definitely ask questions constantly; these guys love solving problems!

Practice! Practice! Practice!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GabrielBailey74
« Reply #3 - Posted 2012-09-08 01:28:25 »

Kept getting:


and also:
1  
2  
3  
4  
5  
6  
7  
8  
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.IndexOutOfBoundsException: 2
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:107)
Caused by: java.lang.IndexOutOfBoundsException: 2
        at com.badlogic.gdx.utils.Array.get(Array.java:125)
        at com.game.MyGame.render(MyGame.java:155)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:181)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:104)
Press any key to continue . . .


2 of the characters kept showing up too, could just be my poor computer Wink.
Besides that looks nice.

Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #4 - Posted 2012-09-08 01:58:07 »

Huh. OpenGL version 2.0 supported?
What OS?
Offline GabrielBailey74
« Reply #5 - Posted 2012-09-08 02:08:03 »

The game runs for a little bit, the exception happens during holding down the space bar Wink
Windows 7 HP
Not Responding is probably due to my slow computer Cranky

Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #6 - Posted 2012-09-08 03:14:20 »

@Jimmt, have you tried checking what could be causing this exception at line 155 of your MyGame class?

Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #7 - Posted 2012-09-08 15:04:42 »

Yeah, it's just batch.draw(enemies.get(i).image, enemies.get(i).x, enemies.get(i).y); in a for loop that iterates through enemies.size times.
I honestly don't care that much about this game lol, just want to get working on my next game Grin
Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #8 - Posted 2012-09-08 17:58:41 »

So 'i' got out of bounds Tongue

Either way, it's best you do Tongue

Offline ~Spaceaholic

Senior Member


Medals: 3
Projects: 1



« Reply #9 - Posted 2012-09-18 17:40:15 »

I have a game engine built on top of the predecessor to libgdx... In my experience, an index out of bounds error while batching items to the screen can usually be fixed with one of the following:

1. Making sure there are items to be drawn before starting a batch
for example
if(enemys.size() > 0){
beginbatch(enemyTex);
//loop and draw
endbatch()
}

or

2. The batchers buffer is too small and there are too many sprites to draw within the buffer, so increase the buffer size
for my sprite batcher the buffer size is denoted in the constructor
SpriteBatcher batcher = new SpriteBatcher(gl instance, bufferSize);

Hope this helps....
Pages: [1]
  ignore  |  Print  
 
 

 
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!