Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (604)
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  
  my first java game ("rpg" kind of ..)  (Read 6497 times)
0 Members and 1 Guest are viewing this topic.
Offline keisangi

Senior Newbie





« Posted 2006-10-25 01:56:31 »

hi there, i'm new to java,
i've made my first game..it's based on Kevin Glass cokeandcode tutorials.
it's far from finished, but i wanted to share what i got so far.
the java web start version is  here
and the "tutorial" and sources are here
sources need to be yet commented..
i did what i could considering my poor skills Wink code maybe really weird at certain times ..

there are few thing i would like to implement now, like:
- pathfinding... the monter right now just move randomly.. i would like em to chase the player as soon as he comes near monsters..
- bigger level with scrolling (game area larger than displayed)
- more stuffs likes doors and keys (you would need to find first proper key to unlock some doors)
that kind of things ..

i think this little project might be useful for other newbies like me who like to learn by examples..
any comment and help welcome Smiley

(updated: webstart link with newer version)
Offline CommanderKeith
« Reply #1 - Posted 2006-10-25 03:58:41 »

Nice work.  Congratulations on getting it Web-Started.

I notice that the character movement is a little jerky, but its a great demo.

Keith

Offline keisangi

Senior Newbie





« Reply #2 - Posted 2006-10-25 06:12:53 »

thanks for the kind words..
about the jerky player movement,
at first i tryed to simplifiate Kevin Glass tutorials,
so i removed things that looked tricky to me, so i removed the timer and the use of floats for movements.
the use of float were so you could walk across cells..by using ints instead all you do is jumping from one cell to the other.
now that i understand things a bit better i might try to enable floats for movements again.

i'm also unsatisfied with my animations,
i wanted to use animated gifs, but couldn't find any "simple and good tutorial. so i went by storing single static pics in an array and simulate the animation myself.

i would appreciate any help about how to access animated gif frames so i can put then in an array. that would prevent to have lots of separate pics..
 .. so far i have 2pics for each directions. (up1.gif, up2.gif / down1.gif,down2.gif..and so on..same for the other entities) it would really simplify to be able to put everything together like: 1pic for hero.gif, and 1another pic for monster..that would be all, or am wrong trying to do this?

but well...at least it's working.. so i'm now looking at scrolling functionalities Smiley
some one would care to review quickly the code, telling me if there's no really stupid things done in there ? Smiley
or help me with animation?

thanks
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline woogley
« Reply #3 - Posted 2006-10-25 10:43:04 »

this is cool, my first RPGish game was a find-the-chest game Smiley

keep it up!
Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #4 - Posted 2006-11-08 06:02:51 »

For starters, wrong forum.
Overall nice game set-up. I especially love the sound effect when you die.  Grin

Now all you have to do is include weapons and a levelling system. Smiley

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Kova

Senior Devvie





« Reply #5 - Posted 2006-11-08 15:45:14 »

there are few thing i would like to implement now, like:
- pathfinding... the monter right now just move randomly.. i would like em to chase the player as soon as he comes near monsters..
- bigger level with scrolling (game area larger than displayed)
- more stuffs likes doors and keys (you would need to find first proper key to unlock some doors)
that kind of things ..
Cool start.

doors and keys? This you can do with knowlage you have now. As you have an enemy you can add keys as well, it's even much simpler (like you probably won't have to create a class just for a key since it's so simple). As you do collisions with walls, enemys and stuff you do the same for a key. You can load image of a key and when drawing occurs you draw it's image if it hasn't been picked up. So I think you'll need 3 variables for a key: Point2D key_location, BufferedImage key_image, boolean key_is_acquired.
Similar for doors and other items. If you have more then one you'll need to put it into arrays.
Another thing so I don't get trashed again... it's more OOP to create own class, but I personaly think it's unneccessary to create classes just to put 2-3 variables in it, I maybe wrong, follow tutorial.

About pics you are using for each animated movement, you can put all pictures into one big picture (sprite sheet). When you load sheet then you can create pictures by subimaging from that sheet (creating picture that is a smaller part of bigger picture).

Keep up learning Wink
Offline kevglass

« JGO Spiffy Duke »


Medals: 221
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #6 - Posted 2006-11-08 15:54:18 »

Great stuff! And doubley thanks for making examples like this available to everyone.

Kev

Offline hgouveia

Senior Newbie





« Reply #7 - Posted 2008-07-26 19:30:24 »

wow man, very good first game, i really want to see your newest version Smiley
Offline Bonbon-Chan

JGO Coder


Medals: 12



« Reply #8 - Posted 2008-07-28 07:04:45 »

There is a problem in your jnlp file, I can't launch it :
1  
<j2se version="1.5"/>


put :
1  
<j2se version="1.5+"/>

Offline DMastaGX

Senior Newbie





« Reply #9 - Posted 2008-12-31 03:35:43 »

Hey nice game. I noticed that when I try to run in the opposite direction he has a delay before he starts to move. The problem might be that you have these calculations inside the Key Listener class so moving them out of there should make it smoother.

 I also have a game like this but I don't know how to turn it into a JNLP executable like you did. Can anyone show me a tutorial that shows me how ?

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

JGO Coder


Medals: 4



« Reply #10 - Posted 2008-12-31 06:25:26 »

Funky music you got there hehe.

I get a crash when leaving the top door.

Quote
java.lang.ArrayIndexOutOfBoundsException: -1
   at Map.block(Map.java:141)
   at Entity.validLocation(Entity.java:41)
   at Entity.move(Entity.java:28)
   at Game.logicHero(Game.java:178)
   at Game.gameLoop(Game.java:146)
   at Game.main(Game.java:304)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Hope you still working on the game  Smiley

Current project - Rename and Sort
Offline gouessej
« Reply #11 - Posted 2008-12-31 13:22:13 »

There is a problem in your jnlp file, I can't launch it :
1  
<j2se version="1.5"/>


put :
1  
<j2se version="1.5+"/>


Yes, please fix it, I would like to try your game, I use Sun's JDK 1.6 update 7.

Offline Swattkidd7

Junior Devvie





« Reply #12 - Posted 2008-12-31 21:17:31 »

This post is from 2006...Just thought I would let you guys know if you didnt notice..  persecutioncomplex
Offline DMastaGX

Senior Newbie





« Reply #13 - Posted 2009-01-04 01:12:16 »

This post is from 2006...Just thought I would let you guys know if you didnt notice..  persecutioncomplex

omg LMAO
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #14 - Posted 2009-01-04 06:06:04 »

A good start!

Have you gotten better in the past 2 years?  Tongue

See my work:
OTC Software
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #15 - Posted 2009-01-23 16:44:09 »

hehe I doubt he is even goinng to ever read all of the replies lol. besides the website wiht the code is not there anymore :/ and webstart is 1.5 so...
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.

CopyableCougar4 (16 views)
2014-12-28 02:10:29

BurntPizza (17 views)
2014-12-27 22:38:51

Mr.CodeIt (13 views)
2014-12-27 04:03:04

TheDudeFromCI (17 views)
2014-12-27 02:14:49

Mr.CodeIt (25 views)
2014-12-23 03:34:11

rwatson462 (56 views)
2014-12-15 09:26:44

Mr.CodeIt (46 views)
2014-12-14 19:50:38

BurntPizza (92 views)
2014-12-09 22:41:13

BurntPizza (113 views)
2014-12-08 04:46:31

JscottyBieshaar (86 views)
2014-12-05 12:39:02
How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

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