Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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 03:43:30
If you saw the graphics they had at mojam (http://www.google.ca/imgres?um=1&hl=en&sa=N&tbm=isch&tbnid=BCPPfsCWXPJWOM:&imgrefurl=http://www.reddit.com/user/4c51&docid=kapwIgwopANIoM&imgurl=http://i.imgur.com/Isnl2.png&w=317&h=687&ei=5xtYT_7-EvGp0AHYoM3kDw&zoom=1&iact=hc&vpx=1077&vpy=244&dur=435&hovh=331&hovw=152&tx=120&ty=180&sig=104825597772300283008&page=1&tbnh=155&tbnw=73&start=0&ndsp=15&ved=1t:429,r:9,s:0&biw=1280&bih=688), you could use the getSubimage() method (http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/image/BufferedImage.html) to cycle between the rotations, and have a formula like so

1  
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 22: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
1  
2  
3  
4  
5  
- 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: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$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

1  
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 22: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?

Thanks
4  Game Development / Newbie & Debugging Questions / Remove element while being used on: 2012-02-24 01: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]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (34 views)
2014-07-18 06:55:21

Zero Volt (30 views)
2014-07-17 23:47:54

danieldean (25 views)
2014-07-17 23:41:23

MustardPeter (27 views)
2014-07-16 23:30:00

Cero (42 views)
2014-07-16 00:42:17

Riven (44 views)
2014-07-14 18:02:53

OpenGLShaders (33 views)
2014-07-14 16:23:47

Riven (34 views)
2014-07-14 11:51:35

quew8 (30 views)
2014-07-13 13:57:52

SHC (66 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!