Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
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 / Game Mechanics / Re: Player Character animation question on: 2012-03-08 02:43:30
If you saw the graphics they had at mojam (,r:9,s:0&biw=1280&bih=688), you could use the getSubimage() method ( to cycle between the rotations, and have a formula like so

img.getSubimage(animationFrame * 32, 0, 32, 32);

where animationFrame is the current frame in the animation, which you cycle when you move, and you would replace the 32 with the size of the image in pixels (I used 32, because that is what it is in the mojam graphics).

Then you would just set the sub image that you got as the image you draw, and when you walk it would draw the image.
2  Game Development / Newbie & Debugging Questions / Creating a movie with JMF on: 2012-03-03 21:45:57
I have devised a quick little program that captures the screen and puts it in a vector, but my problem is that when I go to save it gives me this error
- create processor for the image datasource ...
Setting the track format to: JPEG
- create DataSink for: C:/Users/Adam/Desktop/Test Video
Cannot create the DataSink: Cannot find a DataSink for:$BasicMuxDataSource@7bb0e64a
Failed to create a DataSink for the given output MediaLocator: C:/Users/Adam/Desktop/Test Video

Here is my code where it saves

conv.doIt(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height, 30, imgs, ConvertToMovie.createMediaLocator("C:/Users/Adam/Desktop/Test Video"));

and conv is the class I am using for the program. I downloaded it off of a tutorial site, so that shouldn't be the problem.

Thanks for your help.
3  Game Development / Newbie & Debugging Questions / Re: Remove element while being used on: 2012-02-24 21:50:06
Thanks for the help. I am using the Iterator method currently, but please keep posting because I find this very informative.

Also could anyone tell my how I can figure out what FPS my game is running at?

4  Game Development / Newbie & Debugging Questions / Remove element while being used on: 2012-02-24 00:16:13
I have a player which can shoot bullets, and I have made it so that when the bullet is out of the frame the bullet gets removed. But when I run the program I get the ConcurrentModificationException error. I have all of my bullets stored in an ArrayList. Is there a simple way to remove the bullets?

Also my technique for game design is still quite basic. Could anyone link me to easy to understand tutorials(preferably video) for 2d game programming?

Thanks for the help
Pages: [1]
DesertCoockie (21 views)
2018-05-13 18:23:11

nelsongames (69 views)
2018-04-24 18:15:36

nelsongames (66 views)
2018-04-24 18:14:32

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

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

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

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

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

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

buddyBro (1047 views)
2018-02-28 16:59:18
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!