Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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] 2
1  Game Development / Game Play & Game Design / 2D Animation Art on: 2007-08-27 18:34:56
Ok, I'm working on a game with armor and such (all 2D) and the way I'm implementing it is when drawing players, each piece of armor that is equipped is drawn separately, and which picture to use for each piece is found based on whether the character is running, standing, attacking, which direction they are facing and so forth.  So this requires a lot of art work for each individual item added to the game, I've drawn out a lot of the still images for use to be seen in inventory and such, but the animation work is quite involved.  I'm wondering if there's any programs that make it easier to animate this type of thing without having to draw each frame from scratch (as I am currently doing).  I'm estimating that each item will need around 60-80 images total, maybe more.  Is there a good program I should know about or is there a better way of implementing this?  Let me know if you have any suggestions!
2  Game Development / Newbie & Debugging Questions / Re: Display Question on: 2007-07-17 15:19:22
Hmm, isDisplayChangeSupported() returns false for me >.<

EDIT: Nevermind, I'm an idiot.  Was doing check before I launched into FSEM.
3  Game Development / Newbie & Debugging Questions / Display Question on: 2007-07-16 04:53:32
Ok, so I've been setting up all my display pictures basically by specifying the x and y pixels to draw them on, using actual numbers.  Now I'm thinking that if I run it on another computer with a different sized monitor, everything could look really screwed up, things won't be on screen that should be and such.  Is this so?  If yes, how should I go about fixing this mess I've made?  If not, can you explain to me why it won't be a problem?

Thanks
4  Game Development / Newbie & Debugging Questions / Re: Tile map speed problem on: 2007-07-14 18:05:23
Wow, that helped TREMENDOUSLY oNyx!  Thanks a ton! 

Would you recommend I make create all my images in this fashion?  I mean the ones that aren't spliced, should I Still create them like this?
5  Game Development / Newbie & Debugging Questions / Re: Tile map speed problem on: 2007-07-13 16:31:08
This is how they're created originally:
1  
2  
itemPallet = javax.imageio.ImageIO.read(new File(C.PICTURE_PREFIX+"items.gif"));
defaultPic = itemPallet.getSubimage(0,0,50,50);


Where itemPallet is a big gif image with all the items side by side, and each item pic is a subimage of that pallet, the defautPic is the only 1 being used right now, so getPicture()'s code is:
1  
2  
3  
getPicture(){
    return defaultPic;
}


And the itemPallet.gif has a transparent background.  It's total size is about 3kB (not sure what parts of this matters :\ )

Also, I'm using the same methods for monster pictures, but I haven't drawn those yet, so just using gif images I have laying around.  The monster pics are about 2.4kB, so size isn't much different.  Although the monsters aren't using pallets and subimages, and I plan to do something similar as this itemPallet in the future, so definitely need to work out what's going wrong here.
6  Game Development / Newbie & Debugging Questions / Re: Tile map speed problem on: 2007-07-13 15:00:20
No, what I have written doesn't miss any null pointers.  I put the check for null first in an 'and' statement, the way java compiles, it checks the first test in the and, if it fails, then it doesn't check the rest of the and statement, because FALSE and anything is false, so it's optimizes it automatically by not checking the rest.  So if != null is ever false (hence it is null), then it will never check the size any way, so there's no exception thrown. 

Besides, the problem I'm having isn't that the program doesn't run, or that it crashes, the problem is that it slows down.
7  Game Development / Newbie & Debugging Questions / Tile map speed problem on: 2007-07-12 23:42:19
Ok, I have a tile map type game with about 24x13 tiles per screen.  To draw each frame, I would first go through each tile on screen and draw the background tiles.  Then I'd go through again and draw the players/monster.  This was working fine.  However, I just added in item drops on the ground, which are drawn immediately after each background tile, when applicable.  It only draws 1 item per tile max, 0 if no items are on the tile.  However, when I put a lot of items on the tiles on screen, the frame rate slows down a whole lot.  When I tested with lots of monsters on screen I didn't have this problem.

Here's the code where the items are drawn:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
   public void drawMap(Graphics g, int x, int y,int offX,int offY) throws java.io.IOException{

      int startLocX = x - C.TILE_WIDTH_PER_SCREEN/2 - 2;
      int startLocY = y - C.TILE_HEIGHT_PER_SCREEN/2 - 2;

      for(int mapY= startLocY; mapY<y+C.TILE_HEIGHT_PER_SCREEN/2 +2; mapY++){

         for(int mapX= startLocX; mapX<x+C.TILE_WIDTH_PER_SCREEN/2+2 ;mapX++){

            int effectiveX=C.centerX + (mapX-x)*C.tileW+offX-30;
            int effectiveY = C.centerY + (mapY-y)*C.tileH+offY-26;

            g.drawImage(getTile(mapX,mapY),effectiveX,effectiveY,null);
           
            ArrayList<Item> items=getItems(C.TEST_MAP,mapX,mapY);
            if(items != null && items.size()>0)
               g.drawImage(items.get(items.size()-1).getPicture(),effectiveX,effectiveY,null);
         }
      }
                      }

The getPicture() method just returns a pointer to a pre-loaded buffered image, right now it's just returning a default picture, regardless of the item.
Any ideas?
8  Game Development / Newbie & Debugging Questions / Re: Timers on: 2007-06-22 15:07:35
Yep, that's what I was trying to find.  Sadly, I've used those before and forgot about them : \

Thanks
9  Game Development / Newbie & Debugging Questions / Timers on: 2007-06-20 15:28:36
Trying to set up some timer stuff, having trouble figuring out what to use.  Was looking at using Calendar.get() with milli's and seconds, but looking at the way it's set up, it's not quite what I want.  The problem is they wrap around too often, so i considered just writing an equation using the minutes and hour as well perhaps, which wouldn't wrap around very often, just twice a day.  The problem here is that when it does wrap around, it could cause things to break for 12 hours, or possibly longer.  Updating everything using the timers every time it wraps around is not an option -- at least I don't think I want to do that.  How can I go about correcting these wrap arounds?  Or if there's a better timer system I should use, what is it?  For completeness, my timers are all consisting of a few seconds, around half a second to 10 seconds or so.


Just thinking about it a little more.  Thinking maybe I could do an equation based on minutes/seconds/milli's, or maybe just seconds/milli's and instead of checking to see if the current time is greater than the end of the timer, I could check the absolute value of the difference.  This will keep things from not working for a full wrap, but at the ends of the wraps it could cause timers to prematurely end, which, if happening only once an hour, that wouldn't be much of a problem.  Still think there's a better way I'm overlooking.  Ideas?
10  Game Development / Newbie & Debugging Questions / Stuck with NPC control on: 2007-06-18 05:27:35
Have a huge map which I want to populate various areas with monsters.  Problem is, I can't figure out where to put the control for the monsters.  Where do I have them move and such?  I was thinking just having them move when they are on screen, but already thinking of a lot of problems that will come up with that.  If I have them all move all the time, seems like that'll slow things down a good bit.  Ideas?
11  Game Development / Newbie & Debugging Questions / Re: Trade off question on: 2007-06-17 00:53:04
Wow, can't believe I hadn't even thought of that, it's so simple!  I'll have to change a couple small things to ensure they don't overlap, but that's definitely a huge improvement, thanks kova!
12  Game Development / Newbie & Debugging Questions / Re: Trade off question on: 2007-06-14 17:47:34
Ok, I think I'll just leave it how it is.  Really was trying to figure out if constantly creating this class of 3 ints was creating a lot of extra overhead, but since nobody jumped out and said "holy crap that's the most inefficient thing I've ever heard!", I imagine it's not going to cause a problem.  Thanks.
13  Game Development / Newbie & Debugging Questions / Re: Trade off question on: 2007-06-14 01:22:54
No I don't know, that's the whole point of my question :\
14  Game Development / Newbie & Debugging Questions / Re: Trade off question on: 2007-06-13 14:58:16
Yea, it's already working, that's why I'm looking into optimizing it.  But I don't know how java implements these things, so I need some input from others.
15  Game Development / Newbie & Debugging Questions / Trade off question on: 2007-06-13 05:39:24
I'm writing some code that uses a triplet of integers which new integers are created fairly often.  Currently I have them written as a class with 3 elements.  This makes it really easy to use and easier to understand.  However, I don't know what the creation of this small class actually encumbers, and I don't know how much extra garbage collection it creates.  So I've come up with a clever alternative, where instead of using a class, I just use a single integer.  I know each of the 3 ints will be small ranges, and will fit in 2 digits, so I figured I could use a 6 digit number and use divisions to separate them.  This code seems like it would take less memory and time to implement, though it's much harder to understand -- should I not look at it for 6 months, I might not remember what the hell I was doing.  Of course I can always comment away and hope it's understandable later.  So, if these triplets are created often enough, is it really worth it to make the code a little more complicated?
16  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-26 04:30:00
Argh, I'm guessing MPC just doesn't have a vista version is the problem.  Where else can I find a tutorial on clipping?  I can't even figure out how to use the clipping stuff -- none of the tutorials in inkscape say how to use clipping, there's a small blurb that says something useless about it, and that's it. 
17  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-25 18:17:25
Oh... Vista... why would anyone do that?

Do mpeg files work? If not, try to find newer drivers for your graphics card.

Yea mpeg's work fine, and I won my laptop in a competition...so I didn't get any choices.

And I just got the laptop about a month or 2 ago, from the company that makes the graphics card in it, so I'm assuming the drivers are already up to date?
18  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-25 02:54:16
 Tongue

Downloaded MPC and tried to play one of them but got the same thing, a black screen.  Couldn't find what you were talking about in my graphics card settings, I'm using vista -- not sure if that's the problem or not (has been most times I've had a problem  Undecided)
19  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-24 01:59:31
Eh :\

Is there an easy way to get the codec or whatever I need to play it on WMP?  It's not that I have a vendetta against MPC, but I hate downloading things I already basically have because a different one supports a particular file -- I don't wanna end up with 18 different media players ya know -- just a waste of space.
20  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-23 03:58:34
Yea, I put it into wmp but it just ran the bar like it was playing, but nothing was showing on the window.  I downloaded the ffd thing and just installed it where it wanted to be installed, apparently this isn't right....so, what do I do to install it?
21  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-22 05:34:28
Downloaded and installed the ffd thing but can't figure out how to play the mkv still  Huh

Explain it to me like I'm an idiot?  Tongue
22  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-21 04:26:44
Ok, I've been using inkspace and am really liking it, made some decent pictures that I never would have been able to make on paper.  I'm having troube with details though, I have good outlines mostly, but they aren't that detailed and I can't really figure out what tools to use for small details, and I've only been able to pain graphics a solid color, not able to break it up into pieces, coloring parts differently and such, what tools should I use to do this and for the details?  Didn't see anything about this type of stuff in the tutorials.
23  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-16 07:35:34
Sweet, inkscape definitely sounds like my ticket.  Thanks for the info
24  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-16 02:01:06
Thanks for all the info guys, helps a lot.  I'll probably download inkscape and give that a try later when I have more time -- it can create pictures with transparent backgrounds right?

why don't you just turn around the Gimp ? It's free and fast on many platforms.  Cheesy

Not sure what the Gimp is :\
25  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-15 21:28:50
I don't know what style I'm after :\

I just know I want 2d pictures...not 3d models.  What do you guys recommend for this, or, if applicable, what do you use for this?
26  Java Game APIs & Engines / Java 2D / Drawing 2D graphics on: 2007-05-15 05:11:57
I'm trying to do artwork for a game.  I'm not the best artist and even worse on computer drawing programs.  Any tips on what the best program is to use or how to create detailed pictures?  I don't wanna use graphics that look like a 2 year old drew it with a Crayola!
27  Java Game APIs & Engines / Java 2D / Re: Map question on: 2007-01-23 04:25:15
That's what I did Kova, it looks fine when I use fillRect.  Looking through DarkMortar's example now, going to take some time
28  Java Game APIs & Engines / Java 2D / Re: Map question on: 2007-01-21 23:58:12
The tiles sort of mix into each other, so it looks really screwy.  Not sure what the problem is.  I figured out what was going on in that scrolling example, they're doing the same thing I did it looks like, but they're using fillRect instead of drawing gif images, so the example doesn't have anything complicated enough as what I'm trying to do.

Anybody know how to do this scrolling with a tile map or know any other examples I can look at?
29  Java Game APIs & Engines / Java 2D / Re: Map question on: 2007-01-21 20:44:05
Just got the buffered image set up and got the edges to work with using partial tiles of the next tile, and it worked like I expected in the sense that it stopped the bluring and chopping at the edges, but when moving at moderate speeds it REALLY makes the map screwed up looking.
30  Java Game APIs & Engines / Java 2D / Re: Map question on: 2007-01-20 16:50:00
Well, I'm using an offset to scroll, so my other idea was to draw partial tiles on the edges, but you have to be using buffered images for that and graphics2D too I think -- I haven't had gotten my code changed to those (and operating) yet.  Maybe that'll work.
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

E.R. Fleming (12 views)
2014-07-29 03:07:13

E.R. Fleming (4 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

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

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

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

MustardPeter (44 views)
2014-07-16 23:30:00
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!