Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (756)
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 / Newbie & Debugging Questions / To swing or not to swing?? on: 2006-02-05 06:57:22
Hi all!

I've laid the foundation for my simple Board/strategy game and was going to build some simple frames for the board, dices and news. But then, I read somewhere that one should not use swing for this?
I don't know why - so I have to ask my fellow gamemakers about their opinions?

2  Game Development / Newbie & Debugging Questions / Re: Introduction to Java Flash Tutorials! on: 2005-02-12 04:27:26
Yep, they were nice!

But what the heck are you running? KDesktop on win32? Cygwin?
3  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-11 16:33:32
So, thanx for all the suggestions helping me out with my lousy peg solitaire.

So far, I've come to the conclusion that I should never ever never use Swing components for something like this.
I don't understand them at all. I can't get why a removed non-existent component, for example, could be visible? I have to use setVisible(false) before I remove them (I can't do it afterwards, it's removed remeber) to get the ugly Icon to disappear? Somehow, I thought the Icon belonged to the Label? Anywya, i could do that it's ok.

Now, if someone could give me some rookie help..  Smiley
I load a saved PlayBoard object using my
ObjectInputStream in = new ObjectInputStream(new FileInputStream("savefile"));
return savedBoard;

Now.. to actually update my game and my screen(now I don't recieve any messages, but nothing at all happens, I don't get any old board to continue playing with) ... what am I supposed to do? Will I have to run some code to actually put my objects back and run a validate() on my 81 JPanel squares or how is it all handled?

Best regards
4  Game Development / Newbie & Debugging Questions / Re: how to change applet game  to standalone on: 2005-01-11 15:49:29
You should be able to run the applet in a JFrame as far as I know?
But well, I don't know much..
5  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-07 14:46:19

I will try that, as soon as I've done the Swing verison. It was my courseleader (I spend my evenings after work to dig into Java) that suggested going the Swing way instead of 2D.

Well, now I have it running, as soon as I can get the Jpanel that I Jump to remove it's JLabel. i tried the removeAll() which won't do it. It doesn't update my view at least.  And I can't use the removeComponent() since I don't have that Component in a variable. Fells stupid to try to "catch" that one, and actually I don't know how to do it?
6  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-07 13:32:41
ok.. another silly question.

How do i remove the Jlabel symbolizing the ball i just jumped?
The GamePieces resides in a Vector, but removing them from there does nothing (gamePieces.remove(index)).
I suppose I have to remove the Label itself from the Jpanel where it resides somehow?

Besides I realize I'm stupid. I'm mixing Vectors of Jpanels (representing boardSquares) with vectors of Gamepieces.

Wouldn't it be easier if I only worked with the Panels and then marked them as empty/notEmpty. I suppose there is a way to see wether or not my Panel holds an object?

So this is were UML comes in... Wink

Have a nice weekend you all
7  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-07 05:56:03
Oh don't be sorry, it was too early in the morning.. I think I got a hold of it now Smiley

again, thanks for the help!
8  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-07 04:52:12

valid move = ((oldx = newx) && (Math.abs(oldy-newy) == 2) && middle square occupied)) || ((oldy = newy && (Math.abs(oldx-newx) == 2) && middle square occupied).


To be a real rookie, I can't write that one. My compiler tells me it's not legal to use && operator to find out boolean values ????
I'm I drunk or is it just to early..
9  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-07 04:26:43
Actually, "RISK" like games is exactly what I want to develop, once I get basic knowledge.

Do you have some "real" examples to show? I really like your idea with the .ini file.
10  Game Development / Newbie & Debugging Questions / Re: Peg Solitaire on: 2005-01-06 18:23:15
If it's that easy.. I really need too find my old schoolbooks again..

I'll try that, many thanks for your help!  Smiley
11  Game Development / Newbie & Debugging Questions / Peg Solitaire on: 2005-01-06 17:55:39
So .. there I am, looking at my peg solitaire board. Looks nice..

But how could I possible figure out what would be a legal move or not? I think I've missed a few part in my lousy design.

I have a Vector that contains 9x9 Jpanels that makes upp the Squares of my board-
I have an Array containing all the illegal squares(in the corners, the ones painted black that shouldn't have been in the first place.. GridLayout..)

So, when I press my mouse, I see if I'm grabbing a JLabel (my Gamepiece) and then I get the index of the parent Jpanel. When I release my mousebutton I check if the square is empty and then I can get the index of that Jpanel

But.. then what, I have two indexnumbers..? My Math isn't very good.. is there really a magic formula to control that thing?
Or should I store every objects row and column somehow, then I could see if the difference between the "fromSquare" and "targetSquare" row,column are 0,2 or 2,0. One of them must be 0 and I can only jump one square.

Then.. of course.. I must check wether or not the square I'm jumping contains a Jlabel too .. :/

As said.. my math.. my logic.. my brilliance.. that never were... Wink
12  Game Development / Newbie & Debugging Questions / Re: simple boardgames on: 2005-01-06 02:12:00
It was somewhere on the Sun Forums, do a google on chessboard and jlayeredpane. Got this one for example which looks a little like mine.
13  Game Development / Newbie & Debugging Questions / Re: simple boardgames on: 2005-01-04 08:45:28
Hello all!

This is a very interesting thread indeed.

I'll admit, I've started with Swing components,  I found a thread somewhere with a nice example.  Me too, thought that using existing components would be an easier approach.

Well, I'll see if it will, cause I'm not there yet. I've built my board and I can drag my pieces around but that's it.
I do plan to try both approaches, as soon as I'm there with my Swing version I'll try the painting approach.

14  Game Development / Newbie & Debugging Questions / Re: That Evil MouseListener of mine.. on: 2004-12-30 08:53:08
Stupid me..  of course not. I was talking about my implementing of

An assignment, university. Anyway, I did a ugly one, I created my 9.9 Grid of JPanels and then I hold the "dead corners" in an array, setting there BackGround to Black.
Turns out to look nice but be.. well..

This will not do in the long run though, but it keeps me safe and warm during new year.. Wink
then I'll have to do something about it.. a LOT.. actually

15  Game Development / Newbie & Debugging Questions / Re: That Evil MouseListener of mine.. on: 2004-12-30 07:52:37
Well.. it works.. now I only need to find out a way to draw that ugly board. Why can't they be satisfied with an ordinary chessboard instead of that lousy "cross" design  :-/
16  Game Development / Newbie & Debugging Questions / That Evil MouseListener of mine.. on: 2004-12-30 04:34:57
Well, nope!

To be honest, it's probably this evil morning and the lack of proper amount of coffee.

Anyway, just a thought. in the name of good "OOP" I was creating 3 classes, my GameUI, my GamePiece and my GameBoard. The thought was that the GameUI should implement the GameBoard, which extends a simple Jpanel.

That get's me into trouble since the mouseListener then should be implemeneted at the gameBoard(correct?). And then I really need to move everything called "Logic" to the GameBoard since this one must know about the different pieces and what to do with them.
In the other hand.. isn't that kind of right? To let the GameUI be a simple conatiner with menus and the GameBoard the logic part wich implements GamePieces..

Am I out on a holiday here or what do you think..?
(yep, i really feel like a Clubie)
17  Game Development / Newbie & Debugging Questions / Re: simple boardgames on: 2004-12-29 03:19:28
Well that seems to be a nice start indeed, thank you very much!  Cheesy

I'll try that out, and.. probably get back later. I feel I would need to work some on the UML part, cause there's a lot to think about indeed.

But the only way to get there is .. code, code, code!!

18  Game Development / Newbie & Debugging Questions / simple boardgames on: 2004-12-28 17:44:50
I was thinking about doing some simple boardgames. Unfortunately, most of the tutorials and books out there handle only arcade/applets .. not my type :)
(if anyone know of resources that handle these kind of games I'll be glad to read them).

Anyway.. there's a lot to think about. Should my board be intelligent for example, or should I simply dram some thing and catch the XY coordinates? I was thinking about getting oput there as simple as possible.. so I wrote a board like this:

public ChessBoard()
           super("Schack Arne");
            setLayout(new GridLayout(8,8));

             for (int i=0; i<64; i++)
                 JPanel square = new JPanel();

                 if ((i+i/8)%2 == 0)

and thought about doing the gamepieces like draggable JLabels.. Do you have any thoughts about that, or any good resources for me to read? I'm really not into GUI programming at all, trying to add a simple JLabel with a picture made my Chessboard go whacky (the getcontentpane().add(Label) stuff I suppose..)

Happy New year to all of you
19  Java Game APIs & Engines / Java 2D / Re: Advice for a simple "Risk" game on: 2004-03-14 15:11:02
Sounds interesting, i haven't had the time to try it out yet, any of the solutions. Have to finish my course first.
I've always been thinking about how to do this solutions though, some year ago I started out with the same idea of a game in Python, but never managed to get a good one.
(I was thinking of using SVG graphics but never found a module to render it
Sad  )
20  Java Game APIs & Engines / Java 2D / Re: 2D Gaming Chapters now Online on: 2004-03-10 03:16:33
Not good I suppose, broken link  Cry
21  Java Game APIs & Engines / Java 2D / Re: Advice for a simple "Risk" game on: 2004-03-08 10:55:20
Now that sounds like a great advice! Time to bail out from work and do some more serious stuff Wink
22  Java Game APIs & Engines / Java 2D / Advice for a simple "Risk" game on: 2004-03-08 08:36:51
I'm a rookie in Java, recently finished my first course and are about to start a second one (concentrating in Network, JDBC and Swing).

However, coding is the best way to improve skills, so I was thinking of start coding a simple game, something like "Risk".

However, how would I create that playable Map? Should I use an "ugly" map that I don't show that catches mouseclicks, or is there a more clever solution?

Also, If anyone knows of source somewhere that could be useful to have a look at, please let me know.

Pages: [1]
DesertCoockie (54 views)
2018-05-13 18:23:11

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

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

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

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

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

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

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

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

buddyBro (1088 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!