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   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Re: Online score database, confused... on: 2011-07-03 20:34:46
Hmmm, does MySQL not have a different syntax in it's queries compared to traditional SQL?
2  Game Development / Newbie & Debugging Questions / Re: Transparent Game Menu on: 2011-07-03 19:35:12
Hi all, and thank you for your replies Smiley

What I've done, in resort as I could not solve my problem after trying all your suggestions, is instead use my Graphics2D object and a mouse event listener in combination with a Point variable to draw some boxes and listen for a click on them if the Rectangle drawn contains the Point co-ordinates whilst a 'ingame' boolean variable (and other related variables) is/are false.

This also proved as a funky way to animate and make the menu more elaborate Cheesy
3  Game Development / Networking & Multiplayer / Re: Online scores system for games on: 2011-07-03 19:25:07
Commented on your blog, will support as much as I can  Smiley
4  Game Development / Networking & Multiplayer / Re: Online scores system for games on: 2011-07-03 19:06:06

I'm trying to make a plan for one, for my own project too. Quite interested, and will help where/if I can  Smiley
5  Game Development / Networking & Multiplayer / Re: Online score database, confused... on: 2011-07-03 19:03:55
Thanx for the response Riven!  Pointing

Are you suggesting I do something like have an Apache (or other) server running some webpages and a server application or applet to manage the database?

I have a colleague that has a server so doing this wont be a problem but I intend to test my theories an play around a bit before I move on drasticly, can you suggest any online webservers or services that are free to do such a thing? Or anything of the sorts? Online development is quite new to me and I've recently started learning JSP to script some webpages for my project, seeing as I have extensive Java knowledge already.

Thanks again  Smiley
6  Game Development / Networking & Multiplayer / Online score database, confused... on: 2011-07-02 13:01:18
Hi all Grin

Alrighty so straight to the question... Got a game working and want to host it on a website I created. Unfortunately I'm in a bit of a pickle now...

I created a scoring database which functions well with a test program on a local machine, and when I put the database on my website, I have no idea on how to link the program to the database.

Some additional information on the situation:
- The database is a Microsoft Access 2003 Database (with extention '.mdb')
- The database has its own url (eg:
- I use the JDBC/ODBC driver/bridge

Here is a code snippit:
public DatabaseConnection()  //constructor method: sets up connection
         String url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=XXXX";
         String nam = "name";
         String pass = "password";
            conn = DriverManager.getConnection(
            JOptionPane.showMessageDialog(null,"Connection successful");
             catch (ClassNotFoundException c)
               JOptionPane.showMessageDialog(null,"Unable to load database driver");
             catch(Exception e)
               JOptionPane.showMessageDialog(null,"Failed to get connection:\n"+e);

Where I put 'XXXX':
- Filling in the database name on the local machine works
- Filling in the online database url does not work, and a datasource name too long or other error is thrown.

Is there sometihng I am missing?
All comments are appreciated immensely...  Clueless
Thank you Smiley
7  Game Development / Newbie & Debugging Questions / Transparent Game Menu on: 2011-05-23 11:46:36

I would like to have a jPanel, which is transparent, drawn ontop of my game screen(which extends jPanel).
In my jFrame (or Main class), I add the game screen, and then my menu to the container.
However, when i do this, even when i the setOpaque is flagged false on the menu beforehand, it shows that nasty grey colour over the jframe and i cant see my game screen Emo

Any feedback would be much appreciated... Ive spent the past 5 hours programming different methods and cant seem to get it right... Clueless
8  Game Development / Newbie & Debugging Questions / Character Movement Bug on: 2011-04-18 08:30:23
Hello all Smiley

Ok so I've developed a small game and currently stuck on an annoying bug.

Bug description?
If a character is still, it reacts to the press of a movement key immediately moving in that direction (no matter what the new direction is...)
But however, once the character is in motion and a new movement key is pressed(i.e if the character moves up, and as the up key is released and the right key is released), the character faces the new direction with no movement for approximately 2, maybe 3 redraws (where 1 redraw is 80ms) before it starts moving again.

The problem I'm facing now is that if I change the update time for a redraw to something lower such as 30ms, the game operates faster, but how would I go about keeping the animation smoother without adding new images to my animation array?

Help would be greatly appreciated Smiley Smiley
9  Game Development / Newbie & Debugging Questions / Re: 2D Animating on: 2011-04-18 08:23:05
Ey Mads! Smiley

Ok cool, something I hope I can explain to you! Smiley

I struggled with this at first too, but I found some animation tutorials that helped me INCREDIBLY. They can be found at

In animation, it's reliant on the timer for updatin the graphics on the screen. When ever the timer reaches it's intervals at the given times, it must execute and/or process the following tasks:
1) to paint all the images on the screen by means of the repaint() method
2) update any variables where necessary, such as time, etc...
3) any other extras you may have added.

To animate the players character, its quite a simple process: increment the array point, of the array of images for simulating the person moving, by one through the interval of the update from the timer and when it redraws everything, according to the direction the character is facing.

Read those tutorials and keep in mind what I mentioned, I'm sure it'll help! Smiley
Keep well
10  Game Development / Game Play & Game Design / Re: Algorithm for Pattern game on: 2011-04-18 08:10:43
Ey there Smiley

I figured I could help when I attempted to make  a game very similar to this a while back.

If you would like the patterns to be completely randomized, you may create a method(or a few) to generate a pattern by means of a Random generator.

In a simple way, you may create a line to represent your pattern. The game I had was a lame attempt at a 4k game, where 5 circles were shown , and the 6th had to be guessed by the player.

There are 2 main things to take into consideration: how often your pattern will tesselate(or repeat) and how the data is selected to be shown(which colors to show).

By looking into this, you can code yourself a genertor for a random tesselation number and random numbers to represent an image to show.

Understand what I'm getting to?
Hope I helped a bit Smiley
11  Game Development / Networking & Multiplayer / Re: Online Scoring System on: 2011-04-18 07:49:11
Hi all!  Grin

Ok so I've been looking and observing and Googling and asking and... you get my point, about the different techniques I could use.

It seems as if sending data to a php page will be the most likely choice I will use... Sigh, I'll have to go and learn some new languages now (yay!)

Thanks for the link philfrei Smiley Pointing I'm looking into this game now (which by the way seems very well developed), but seems as if the reason why it has (or probably has) code for a scoring system is becaus it is scripted in Javascript, along with HTML and CSS...

Thanks all Smiley
12  Game Development / Networking & Multiplayer / Online Scoring System on: 2011-03-28 10:51:25
Hi all, (I'm baaaaaacckkk...)

In the process of completing a game for a company and will soon result in online deployment and a high scoring system...

One thing though, how would this be achieved? If it is hosted on a site, how would I go about having a scoring table? Would linking it to an SQL database as such be an option, and if so, how would I link the two?

I looked at other forum posts and the links they contained didn't help much.

Thanks in advance...
13  Game Development / Game Play & Game Design / Re: Sprite + background textures? on: 2011-02-07 13:36:55
Ah thank you very much, I really appreciate it. Smiley
14  Discussions / Miscellaneous Topics / Re: Back to the drawing board... Literally... on: 2011-02-06 09:04:36
Sigh I guess I'm gonna be the only person working on a Sunday?

Hahahaha  Grin

So a development blog is currently under construction to combine the features of twitter, facebrick and youtube... It's called...  Cheesy funny stuff there...
15  Discussions / Miscellaneous Topics / Back to the drawing board... Literally... on: 2011-02-05 19:48:12
Ok so busy with a little game for a company...

..and i finally got a chance to do a bit of testing today...

..but theres a bit of a drawing bug with my images... i have to edit all of them again. Oh, and edit their layout upon the jPanel they're drawn to.

(winge) oh well:)
16  Game Development / Game Play & Game Design / Re: wan't to programming an RPG on: 2011-02-05 19:39:34
Ah I just came across something that may be of interest to u Smiley
It's a 2D game maker that creates RPG Java games... Enjoy!
17  Game Development / Game Play & Game Design / Sprite + background textures? on: 2011-02-05 19:33:55
Ok so I've created some really (really...) bad textures for a game I'm currently making, and would like to search for some more appropriate ones...

I've spent quite sometime searching the net now and going trough recent topics here on, but still can't find any suitable ones... I'm particularly looking for grass & water textures that aren't particularly realistic... Please help!  Cry

It's a 2D top-down game by the way.

Much thanks in advance... Smiley
18  Game Development / Game Mechanics / Re: Small animation trouble... on: 2011-02-03 18:07:27
Ah ok i see, that sould be pretty simple to progem then Smiley thank you Smiley

I've taken a bit of time to reconsider my sprites and characters and have made new images however they do have some transparent bits. They are all of the .png format, but you say this won't cause trouble in an animation since their transparency data is preserved?
By the way, I have analysed a few tutorials in order to get an idea of how to animate the images, and will be forming my own sort of way, which too will still add some sort of originality seeing as I just finished highschool and am new to this.

All seems to be going well, so far it's aporximately 20% or so completed. I will post the code once it is done. Smiley
19  Game Development / Game Mechanics / Re: 2D Walking Animation (edited - different approach) on: 2011-02-01 17:58:47
Hi Mads Smiley

I see youre predicament... Hmmmm i really havent done much to be able to help u with anything, but when i do i will post it here and show u. Because i am still pretty new to this forum, i cant past any links to websites, but please go ahead and type "pacman java 2d game tutorial" in Google and look at the one from Zetcode. It is what i am basing my animation around, also maybe look at their tutorial on animation itself and moving sprites, i think there will be valuable information in there to help u Smiley

Concerning the two integer variables, becasue its 2d we're working in, u may want a character to to so something really strange like strafe or side step, and u cannot account for that with one variable... but if you only intend to have the character going in the usual up/down/left/right sort of fashion, it can suffice too Smiley when i have some spare time this week, ill take a look at your code and maybe help out a bit if i can Smiley

I plan to have my project finished in the next 2/3 weeks before university starts
20  Game Development / Game Mechanics / Re: Small animation trouble... on: 2011-02-01 17:45:16
Hi philfrei Smiley

No reason why you can't take the man's X,Y location and print the sand bag relative to that.
I had this in mind but there are a few things I am confused about... The x,y co-ordinates provided, are they from the center of the mans image?

All the pictures I use are 100% opague fortunately. I dont intend to have any of the other images i may add any transparent either...
21  Game Development / Game Mechanics / Re: 2D Walking Animation (edited - different approach) on: 2011-01-30 11:36:12
Oh, and one other thing, it may be useful to use the 'Sprite' class found in the tools directory of your Slick download. It represents a single sprite in your program, but you could make an AnimatedSprite class which extends Sprite and impliments the above code or something somehow... Just an idea
22  Game Development / Game Mechanics / Re: 2D Walking Animation (edited - different approach) on: 2011-01-30 11:32:30
Hi Mads,

It seems like we are working on a similar sort of thing.

I had a look at Slick, but decided to only use Java2D instead of any extra libraries. My animations are controlled with 2 integers for the direction which the character is facing(dirx, diry, where -1, 0 and 1 are values). This will help determine which image set to render.

My images are seperated instead of being on an image set, but there will just be a separate bit of programming for you to do. Whenever the actionListioner() is called by your timer, another method will alter another variable which changes the image currently being displayed. Here is a code representation, please keep in mind this only represents a single direction:

Image[] imgArr = new Image[3];//An array of 3 images, the images for your animation.
int currentImage=0;//An integer representing the current image.

public void changeImg()//A method to change the image to be displayed
currentImage++;//Increase the current image variable

if(currentImage==3)//If the current image is '3', which cant be used to get the image later, set it to 0.

public Image getImage()
return imgArr[currentImage];

This way, you can change the image in the paint() method of your program. Hope this helps a bit! Smiley
23  Game Development / Game Mechanics / Re: Small animation trouble... on: 2011-01-30 11:12:13
I was thinking having a horizontal image and a vertical image of the sandbag. When the appropriate keys are pushed(w,s,a and d are used to direct the man), a variable or two are altered and the sandbag is painted infront of the man's chest. I'm just a bit clueless about doing this though...  Huh

Hmmm... or I could have a two animation sets for the man, one with the bag, and one without, and use a rotation transformation on the images... But not too sure about this either and how it may affect performance
24  Game Development / Game Mechanics / Small animation trouble... on: 2011-01-30 08:09:17
Hi to all the avid developers/programmers out there Smiley

I'm currently in the process of developing a game(in a 2D, top-down view) which involves the animation of a man walking around, and has the ability to pick up a sand bag.

With that off my chest, I have a variable to detect which key is pressed to change the direction which the character is facing, and therefore alters the image loaded, as there are animations for every direction he faces. (ie. 4 pictures for moving up, 4 for moving left... and you get the idea.)

What im querying is how I would go about animating the sand bag in his hands? I feel creating a bunch of new pictures for the sprite and have a boolean variable to detect whether he has a bag in his possesion is going to unnecessarily increase the size of the executable, as I would like to keep it small.

Is there a possible way to instead draw the image x pixels infront of the character?

Thanks in advance for any help.
Keep it Java Smiley
Pages: [1]
ivj94 (583 views)
2018-03-24 14:47:39

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

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

Solater (62 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 (702 views)
2018-02-28 16:59:18

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

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

xxMrPHDxx (733 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 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‑
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!