Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
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  Discussions / Miscellaneous Topics / Need PCI Video Card Advice on: 2010-02-16 23:06:31
Greetings. It's been a while since I've been on this site. Anyways, I'm trying to squeeze some video performance out of an old el cheapo Dell Dimension 2400. I'd like to get the best possible performance for full screen Flash Video running on a 17" monitor.  The current card is an onboard intel.

The computer supports only standard PCI cards. I have done a little research and it seems I can't go wrong with GeForce FX5500 128MB, or ATI Radeon 9600. But my sources are kind of old. So I figured the gamers here would know a thing or two about video performance.

Any comments?
2  Discussions / Miscellaneous Topics / Re: Did you hear the one about the computer programmer... on: 2009-11-13 19:05:40
Congrats!

congrats for telling a good joke?

3  Discussions / Miscellaneous Topics / Did you hear the one about the computer programmer... on: 2009-11-13 18:53:25
who recently became a first time father?

When asked if it was a boy or a girl, he replied yes.
4  Game Development / Newbie & Debugging Questions / Re: Improving Look and Feel of Swing Components on: 2009-10-20 15:51:33
Cool chess game! Working out the AI must have been interesting.

To should take a look at the substance api here: https://substance.dev.java.net/

It's got the best high-contrast game-y look and feels. I like the RavenGraphiteGlass skin the best.

Thanks, yeah the program is a lot of fun. In one sense I'm just getting started with putting my own stamp on things, algorithms for game tree traversal, such as negamax and alphabeta, are well documented and widely used, it's just a matter of applying the pseudo-code. That part is more or less independant of the type of game being played. The real challenge comes now, with figuring out ways to impart "chess knowledge" to the program. In that respect I have only scratched the surface.

anyways, I'll check out the substance API, and post a new link when I get things fixed up.
5  Game Development / Newbie & Debugging Questions / Improving Look and Feel of Swing Components on: 2009-10-20 14:26:32
Greetings. Below is a link to my permanent work in progress hobby chess program. The only aspect I am not satisfied with at the moment is the look and feel of the center control panel. Right now this JPanel has BorderLayout, and the Button panel is BorderLayout.NORTH, the JTextField is in its own JPanel that is BorderLayout.South. So you can see the Control area involves three JPanels

Anyways, I would welcome any suggestions on giving the center control area a more professional look and feel. Visual design is not my strength, and I don't have a lot of time to spend on the topic right now.

You can try the game if you want, it is weak on strategy but pretty good with tactics if you give it the chance. Make the first move and click start if you want to play white, else just click start if you want to play black.

http://fchess.uuuq.com/fchess2/fchess2.htm
6  Discussions / Miscellaneous Topics / Re: Stack Overflow on: 2009-10-08 18:08:19
Alas! You're right!

I am a horrible human being.  Sad


That's ok bud, I just killed three blades of grass myself by pointing out the error of your ways   Grin  Cool
7  Game Development / Game Play & Game Design / Re: Drag and Drop of Chess Pieces on: 2009-10-08 16:40:05
Actually, if my interpretation of your clamping idea is correct, then I think there is a problem. If I drag the mouse off the board, then the game still thinks the piece is on the board, So if the clamped piece stays on a square that represents a legal move, then you may end up being forced into a legal move that you had no intention of making, See what I mean?
8  Game Development / Game Play & Game Design / Re: Drag and Drop of Chess Pieces on: 2009-10-08 16:12:55
Yeah, I can see that your method is better, in the sense that it captures the "bad" event sooner. Without actually trying your idea, what I visualize is the piece staying within visual range, along the border of the panel, and even though the mouse pointer is no longer "on the piece", the piece would still have vertical movement if the pointer is off to the right of the board.
9  Discussions / Miscellaneous Topics / Re: Stack Overflow on: 2009-10-07 18:34:51
Just wanted to point out that I have 256 reputation on Stack Overflow. I did not plan to get such a nice power of 2, it just happened. WOOOOOAAAH.

http://stackoverflow.com/users/117588/eli

I know RAM is cheap, but 256 is a waste of electricity. 255 is a greener number. Somewhere a blade of grass has just withered and died.
10  Game Development / Game Play & Game Design / Re: Drag and Drop of Chess Pieces on: 2009-10-07 18:06:43
Instead of doing 4 with mouseExited, you should just clamp the values you use within mouseDragged as the drag happens. Notice that width is the check in both directions because the board is square.

...


Actually, I ended up adding the following code to my mouseReleased method, which achieves the effect that I wanted all along. I guess the point I originally missed was that the (x,y) co-ordinate system of the JPanel extends in all directions past the boundaries of the panel.

Thanks for the help.

1  
2  
3  
if( (x >= width) || (y >= width) || (x <= 0) || (y <=0 ) ) {
    // return piece to original square and call repaint()
}
11  Game Development / Game Play & Game Design / Re: Drag and Drop of Chess Pieces on: 2009-10-06 14:57:06
Decorated portions of windows in Swing still count for coordinates, so it's not a good idea to use the JFrame as a mouse listener. You should use wherever it is that you do your drawing. This is because you want the coordinates of your mouse to be in the same local space as the drawings, or you have to constantly worry about translating them which doesn't make much sense to do.

Yeah that makes sense. And that's the way I've always done it. Anyways, I'm gonna try your ideas about clamping, but before I do I wanna see what effect my chess move legality code has on this situation. Just for curiosity sake, it won't be the final solution, cause I don't want to run a move legality check on a move that isn't even on the board.

regards.
12  Game Development / Game Play & Game Design / Re: Drag and Drop of Chess Pieces on: 2009-10-06 07:41:47
What I meant was simply that you shouldn't have to worry about the mouse release not being fired off just because you're outside the application. On the other hand I don't use JPanels a lot so if it isn't registered it might indeed be an idea to use the highest level container for the mouse listener.

Yeah, I'm beginning to see that that is the case, as I rewrite my chessboard class. It's as if the xy co-ordinate space extends past the dimensions of the JPanel, which makes for some interesting moves on the chessboard, whereby the piece is dragged off and released on one side of the board, and re-appears on the other side of the board, except at the next row down. I'm not sure how I managed to overlook that fact before.

regards
13  Game Development / Game Play & Game Design / Re: Drag and Drop of Chess Pieces on: 2009-10-05 22:12:03
Thanks, I'll give both ideas a try in the next couple of days and let you know how it goes.

I must say though, with regards to the first response, I don't quite see how the issue of focus could be relevant. After all if the last thing I do is click on the board in order to start dragging a piece, then how is it that the board (JPanel) would lose the focus required to detect the mouse release. Unless... the high level container class is supposed to be acting as the mouse listener for events like that?
14  Game Development / Game Play & Game Design / Drag and Drop of Chess Pieces on: 2009-10-05 16:03:52
Greetings.

In my chess program my chessboard is a JPanel with a mouseListener on it. I have implemented drag and drop of the pieces as follows...

1. mousePressed to pick up a piece.
2. mouseDragged to move a piece, with appropriate calls to repaint()
3. mouseReleased to place a piece on a new square.
4. mouseExited to prevent a piece from being dragged off the board.

Everything works fine, but I am not totally satisfied with item 4.

As it works now, as soon as the mouse reaches the edge of the board, if a piece is being dragged it is automatically placed back on its original square, without the mouseButton being released. Also the repaint doesn't remove the piece being moved from where it left the board, until a subsequent repaint, but that is a small thing that I am not concerned with right now.

Anyways, I have seen programs where you can pick up a piece and drag it off the board, and if you release the mouse button while the pointer is off the board, then the piece will return to the original square. I can't figure out how to do that, as how can the application generate a mouseReleased event if the mouse is not over the application for which the mouseListener is defined? See What I mean?

Thanks.
15  Java Game APIs & Engines / Java 2D / Re: A strategy for designing chess graphics on: 2009-10-03 18:04:21
If you want to do it while loading your images it's called 'colour keying', and should be do-able with regular BufferedImage stuff without too much problem.

If you want to do it manually then you could try gimp or paint.net. I prefer Paint.net but it's windows-only, so you might have to go with Gimp.

OK Thanks, I'll look into color keying and let you know how it goes. It'll be next week sometime before I get around to it.

p.s. For anyone who visits my site to see the images, i had to get rid of them, and go with my primitive shapes. Sort of a personal dispute with the guy who gave me the images. Which is why I am revisiting the issue now.
16  Java Game APIs & Engines / Java 2D / Re: A strategy for designing chess graphics on: 2009-10-03 17:47:00
For your external images, you will want a format that supports transparency like png or gif.

I have another question. I have access to lots of images, but not so many that have transparent backgrounds. Can you suggest a strategy for modifying an existing image with a solid color background,, usually white so that it has a transparent background? Any good open source or freeware to do the job?, I'm not a big fan of Microsoft Paint, but I'll use it if I have to.
17  Discussions / Miscellaneous Topics / Re: Worst OS ever? on: 2009-09-27 01:39:18
Norton Commander for DOS was pretty cool.
18  Discussions / Miscellaneous Topics / Re: Worst OS ever? on: 2009-09-26 13:25:31
BeOS was the best thing I used since the Amiga. Nothing's come close since.

Cas Smiley

I only know a small handful of people who have ever used BeOS, but they are all very emphatic in their admiration of it.

Is it still alive? Any development work still going on?
19  Discussions / Miscellaneous Topics / Re: Worst OS ever? on: 2009-09-24 16:55:03
Vista is the epitome of Parkinson's Law.

http://en.wikipedia.org/wiki/Parkinson's_Law
20  Java Game APIs & Engines / Java 2D / Re: A strategy for designing chess graphics on: 2009-09-23 21:42:42
Thanks. It's worth pointing out that there really is no Graphics2D involved here. All the drawImage() stuff is from the Graphics class. I did use createGraphics() on my blank BufferedImages which creates a Graphics2D context, but then I used basic draw methods for my old style pieces. But what I have done is two set the stage for using advanced primitives and GeneralPath which is Graphics2D. If I ever get around to it. But again as far as i can see you don't need Graphics2D for external images.
21  Java Game APIs & Engines / Java 2D / Re: A strategy for designing chess graphics on: 2009-09-23 18:16:54
Thanks Demonpants, I ended up using Class.getResourceAsStream, which retrieves the png from the jar file as an InputStream, then used a version of ImageIO.read() that takes an InputStream as a parameter.

Anyways, the results are available on my website if anyone wants to take a look. I included a checkBox in the GUI to toggle between the old and new piece style.

cheers.
22  Java Game APIs & Engines / Java 2D / Re: A strategy for designing chess graphics on: 2009-09-21 16:33:54
ok good, didn't know that. Without doing the research, by intuition it seems It would be better if my backgrounds were transparent before the images were loaded into java?
23  Java Game APIs & Engines / Java 2D / A strategy for designing chess graphics on: 2009-09-21 15:50:36
This is my first try to do something meaningful with Graphics2D, previously I have worked only with the Graphics class. It's not so much that I need help, rather I just want to bounce my ideas off the board and see what comes up.

OK, the goal is to improve my chess graphics. The idea is to learn graphics, not just create a better mousetrap. Eventually I want a system where the user can choose beteen piece designs. Some of the designs will be created using the GeneralPath class, others will be from externally created images, such as jpegs.

It seems to me that since I want to switch between both methods of design, then rather than drawing a GeneralPath object directly to the drawing surface, a JPanel, I should proceed as follows...

1. Draw the board directly on to the JPanel. This means the dark and light squares, not the pieces.
2. Create a BufferedImage object, then associate it with a Graphics2D context by using the createGraphics() method.
3. The BufferedImage should have a transparent background, so that a piece can be dragged without obscuring other pieces.
4. Use the usual methods for designing a GeneralPath object, except because of step 2 we are modifying a BufferedImage.
5. When I actually want to visually render the BufferedImage object, I will use a drawImage method on another graphics context which is the chess board. Since we are drawing images to the board and not GeneralPaths, it seems to me there is no need to make the board Graphics2D, plain old Graphics will do.

OK the whole point of going to the extra work of drawing a GeneralPath to a BufferedImage rather than directly to the board is that this will make it easier to switch between using GeneralPath and externally created image files such as jpg for my pieces.

make sense? or am I missing something?

regards.

p.s. OK one question, does it matter what file type I use when my pieces are externallly created images? I suppose jpg is as good as any.


p.s.s. I suppose I can say that if I was only dealing with externally created images, I wouldn't need to use Graphics2D at all.
24  Game Development / Newbie & Debugging Questions / Re: Run an applet from the desktop on: 2009-09-21 13:35:50
One other consideration. I don't know how you write your applets, but I try to put a much as possible of my GUI onto a JPanel, then add the JPanel to the applet. If you do that, then you should just as easily be able to add the JPanel to a JFrame (desktop version).

I'm no expert, and I'm not aware of any situations where this wouldn't be a good idea, if anyone does, I am all ears.
25  Games Center / Archived Projects / Re: FlipIt - Othello/Reversi online play between Android and Applet on: 2009-09-18 16:08:20
OK, I'm a big fan of Reversi, so I registered as fguy. I can help out with testing if you want, or just play a game. I don't have Android. I just use the web browser version.
26  Discussions / Miscellaneous Topics / Re: Worst OS ever? on: 2009-09-18 00:59:43
I effectively hate all Linux distros, they are my worst OS, but this is purely as a desktop OS. ...<rant snipped>

Windows Vista FTW!

That's brutal. It happens that way sometimes, can't say I blame you. I have a linux desktop PC and an XP laptop. Mostly I use the Linux to learn about Webservers and stuff, but I do use it as desktop sometimes. It's been pretty smooth, had to mess around a bit to get printing working, play with the wireless a bit, but I don't mind. So far it's been rock solid for what I use it for.
27  Game Development / Newbie & Debugging Questions / Re: Programming for Multi-core CPUs on: 2009-09-18 00:47:09
OK thanks. This is more or less a personal hobby and a learning project, so I can see myself trying to do it both ways, just for the experience.


28  Games Center / Archived Projects / Re: FlipIt - Othello/Reversi online play between Android and Applet on: 2009-09-17 23:49:18
I played the applet. For starters, your program does not conform to the rules. In Reversi, black moves first. By forcing White to move first, this changes the standard opening sequence altogether. If that was your intention, then fine.

I played the game and won quite easily. I'd say you have some work to do in order to be competitive with other Reversi Applets on the net. If you want to the computer play to be competitive that is. But I liked the look and feel.

The GoogleAppEngine concept interests me, I'll have to find out more about that. Perhaps I can take advantage of that with my chess applet.

regards.

29  Game Development / Newbie & Debugging Questions / Programming for Multi-core CPUs on: 2009-09-17 23:34:16
My java skills are ok, but I'm kind of weak with thread programming. When my chess program, which is pretty much a single threaded app, crunches away on a move, I see the CPU sits at 50%. I assume without doing the research that this is because it's a dual-core CPU. I guess I would have to divide the computer analysis into two threads to take advantage?
30  Discussions / Miscellaneous Topics / Re: Worst OS ever? on: 2009-09-17 23:24:09
I read a  couple pages of this thread. Lot of people say Vista is crap, some defend it with some good arguments. I'm not too impressed with Vista. Personally I don't think I will bother with it or 7. I can't justify doubling or tripling my hardware power just to run the next operating system. XP suits me fine. Am thinking of switching to Linux.

Anyways, sticking with the Microsoft line...

The worst has to be Millenium Edition. I had a copy, it went straight to the slag heap.

The best? Hard to say. I saw some posts slagging the win9x line, but I say Windows 98 Second Edition, for it's time, was a damn good system for the home user.
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.

Pippogeek (36 views)
2014-09-24 16:13:29

Pippogeek (29 views)
2014-09-24 16:12:22

Pippogeek (18 views)
2014-09-24 16:12:06

Grunnt (41 views)
2014-09-23 14:38:19

radar3301 (24 views)
2014-09-21 23:33:17

BurntPizza (60 views)
2014-09-21 02:42:18

BurntPizza (30 views)
2014-09-21 01:30:30

moogie (35 views)
2014-09-21 00:26:15

UprightPath (48 views)
2014-09-20 20:14:06

BurntPizza (52 views)
2014-09-19 03:14:18
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

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!