Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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 3
1  Discussions / Community & Volunteer Projects / Re: Looking for more Java Dev's on: 2006-12-19 16:21:35
Just so you know, blahblahblahh wrote that article.

Neeto. Learn something new everyday! My props to blahblahblahh! Who game very good feeback I might add.
2  Discussions / Community & Volunteer Projects / Re: Looking for more Java Dev's on: 2006-12-15 23:40:51
I'm afraid theres something unappealing about joing a project where the target is a massively multiplayer online game.

Why Herk didn't get responses, hell knows, maybe the current flying guns demo isn't inspiring people or something?

Kev

Hehe! I understand this one. I first posted somewhere that I wanted to make an MMO and the first thing I got was.

Don't. And then pointed me in this direction: http://www.stratics.com/content/articles/mmoguide.php
Take a read when you get a chance. Good information.

Not to get side tracked in the same thought, the route we've taken to accomplish this has allowed us the low-tech functionality and non complex way of acheiving the same results. Thus the MUD style underlaying. The server/client architechture of these allows for the simplest type of MMO and should only take a week to setup with some good help. I think the big drawback is that people wanna make a super 3d AAA MMO game to be the next WoW or EQ and never set their sites on what they can accomplish. We've grounded ourselves and understand what are limits are in creating such a game and set a hard standard for how the V1 of this was to be done.

I fully expect in the next month for the working V1 of our engine (including the extra Jazz MUD's don't contain) to be done and then its 200% of our effort into creating the game content that will make this fun and worth playing.
3  Discussions / Community & Volunteer Projects / Re: Looking for more Java Dev's on: 2006-12-14 20:21:34
Grin   FlyingGuns has close to 1000 reads and (close to) nothing ....

Smiley I completely understand. Maybe we are missing something here that should help in getting people to respond. Animated gif's perhaps  Huh

But it does seem you have more responses than the average under this forum.
4  Discussions / Community & Volunteer Projects / Re: Looking for more Java Dev's on: 2006-12-13 15:19:20
It's very difficult to just get people work for you for free! The ones that volunteer won't know much/at all about programming -AND- never did any art design! That's just my experience, but let me tell you how I nevertheless got some help.

1. It seems you already have code up and running - so are there any screenshots at all? I believe some pictures will draw much more interest. If you don't have screenshots, how about posting some drawings etc...?

2. Ask your friends (real-life): they usually don't know much about programming/graphics, but I got some people helping me translate my game - I pay them in beer  Grin

3. Get the players to volunteer! That means you need to get the game up and running first ... Players won't do any programming, but they are great in generating stuff such as maps etc. for your game - and they do it for free if they like your game. You could give them special abilities if they decide to contribute.

4. PAY! Get graphics for cheap - if your game looks good, it's easier to advertise and get people to play. A screenshot is a million words. So, to create a cool interface; I bought my graphics for about $60 from http://www.templatemonster.com/. That's cheap! Just change the logo etc (there are buttons, panels) and integrate it.

How about: http://www.templatemonster.com/website-templates/7868.html
I know it's a web template for a travel agency web site - BUT: it could be your game interface if you are willing to spend $58 ... (just change the logo etc...)



Thank you for the guided input. I completely understand the above. 6 months ago I turned from working on this project myself to getting a team together and it has and was hard to find people that would fit what was needed. My current team is experienced in the areas I need them to be so I know that it is possible to find volunteer work for a project.

The hardest part of this is that we dont post anything that we have or have done. The first thing that will happen pending the Jan 1st completion of the framework/engine part of our first project is to write up a description and take some screen shots. Though these shots will be very ugly to most people as at this stage we would not have done any art to 'spruce' the game up.

Please keep the comments and suggestions comming. Additionally, please feel free to contact me if any of you are interested in the project above and maybe the projects lined up afterwards.

Also what I am seeking has changed some. I found another writer to join the team and am no longer needing to fill the posistion. I am still looking for:

Talent needed:
2 x Developers - Really in need of develepers to help spread the load around and complete tasks assigned in a timely manner. Must have working knowledge of Java and work well with others.
1 x Artists - Any good cyber punk artists out there please start sending us your work.
5  Discussions / Community & Volunteer Projects / Re: Looking for more Java Dev's on: 2006-12-13 00:08:09
I do appreciate all of the feedback. This is truely the only way to get better.

Lets see if I can't answer a couple of questions.

In the way of experience, I do not have any experience delivering online games before, but you have to start somewhere. Smiley
Our site does not state this, but it is my every intension to give the proper due to any persons that are part of the StrayDog Studios team. I understand the drawback and loss of interest at the site of the word Volunteer. The thing I would like to accomplish is the ability to pay or compensate each person on the team with $ at the point where we are making enjoyable, playable games that are seen as worthy to charge a price for. Eventually, this will happen. My dedication into this arena will not allow me to back down. I am also not just wanting a 'hired hand'. I need people that feel what we are trying to accomplish and have the heart for the same ideas, with also the free understanding that if something isn't write or they have an idea of how it should be or could be, then throw it out there and lets see what goes on. Our current project is the working of all members of the team and not one individual.

The reason we choose a MUD style for this first project was mostly due to the server/client structure and relationship. It is, in its simplist form a very nice MMO base. When first researching the idea of making games a while ago the first response I got from anyone was to not try a MMO. What I have found is that people shoot to far for their goals and never reach them. We could infact, integrate a 3D engine right now that would allow us to have this 'great' functional feature, but we wouldn't finish the game till 2009. What we are shooting for is to create games that are pleasing without being top of the line. We are Low-Tech.

Additionally on this same subject. We built our own because we only need what we want to use and don't wanna spend the effort correcting or changing someone elses mishaps.

As it stands this very moment, our engine for our first project is set to be finished Jan 1st, with a soft release of March for the first game.

This all being said. I do appreciate the feedback and look forward to much more. Please keep them comming.
6  Discussions / Community & Volunteer Projects / Re: Looking for more Java Dev's on: 2006-12-05 17:11:54
58 Reads and still nothing Sad

Of the people looking at this request, is there anything from the above that needs more clarification? Or any comments you have about the above information. I'm really dedicated to getting things done and have been working on this engine with my current team for a couple of months now.

Again, any feedback would be great.

P.S. I also understand that the public website may not say much about the project and there are no screenshots to date. As soon as the artist provides some stuff I will throw those up on the public website. Smiley
7  Discussions / Community & Volunteer Projects / Looking for more Java Dev's on: 2006-11-29 21:30:30
Team name:
Straydog Studios

Project name:
There currently isn't a name for this.

Brief description:
Not another sword and shield game! We are developing a CyberPunk/System Shock type MMO. The engine is about 40-50% done and is stable running off a MUD style backbone. This is not a MUD game however as we have modern UI components mapped to integration.

Target aim:
Provide a lowtech MMO that captivates the users with a satisfactory level of performance, visuals, musical score, and story line. Aim for a fully functional game 1st Quarter 2007.

Compensation:
This is on a volunteer basis. All $ towards hosting, SVN, website is footed by me.

Technology:
Low-Tech/Java web based deployment of games. Min system should fit minumn needed to run Java Applet games and internet.

Talent needed:
2 x Developers - Really in need of develepers to help spread the load around and complete tasks assigned in a timely manner. Must have working knowledge of Java and work well with others.
1 x Artists - Any good cyber punk artists out there please start sending us your work.
1 x Writers - We are in need of a compeling non FF type futuristic RPG. Must be able to captivate the user with a non-forgettable story.
**The writers and artists are charged with creating the WORLD in which this game will take place.

Team structure:
Team consists of:
Zach (me) - I am the team founder and 1 of 2 project leads. Founded team six months ago with one goal in mind of creating games that leave no part left out and captivates the user on all aspects. I foot the bill for the hosting of site, data, codebase and program.
Mike - Lead Developer and other project lead. Mike has been with me since the beginning of this team and currently is the lead developer of this project.
Martin - Developer. Martin has also been with us since the begining of this and has been a steady contributor to our project/team needs.
Kyle - Writer. Currently working on the frame work for the world that will be used.

Website:
http://www.straydogstudios.com

Contacts:
Zach - Email: zach@straydogstudios.com
Email2: straydoginc@yahoo.com
AIM: straydogincz
Yahoo!: straydoginc
MSN: straydoginc@hotmail.com <-- messenger only, will not check email sent here.

Additional Info:
Really are hoping to get feedback and help concerning the development of this current project as we are overloaded with development at this point and still meeting out milestones. Also wanting to make sure that we can secure a footing for projects to come.

Feedback:
I want any kind of feedback. Please really, any.


EDIT: Altered the Target Aim after reviewing the current information.
8  Discussions / Community & Volunteer Projects / Re: Needed! on: 2006-03-24 18:51:31
LOL.. I do appologize for the response back. Just ached me a bit to see the response when information was there. But hey.. win some you loose some.

I will not hold it against anyone Smiley
9  Discussions / Community & Volunteer Projects / Re: Needed! on: 2006-03-24 06:26:00
Do I have to quote my own site. If you'd read beyond the home page.. or even on the home page you may have found that I am looking for Artists, Music people, and developers. Then you could have considered (hmmmm I can develope.. Let me see whats up.) Click on the development button to find.


Quote
Wanted!

Straydog Studios is looking for a team of dedicated developers to create video games. These games will be made in languages such as Java and C++, ranging in types of Action, 3D First Person Shooters, MMO's, MMORPG's, and regular old RPG's.

Requirements for this position:

    * Must have a working knowledge of either Java or C++
    * Honest and dedicated.
    * Must work well with others.

Everything else is up to you.

This project is on a volunteer basis but may require dedicated time set aside for progress.

Regards,

Zachary Alexander

As far as convincing people to join. Why? If they wanna join and help out then they will. If not then no. Its an opportunity to make some games and have fun doing it.

10  Discussions / Community & Volunteer Projects / Needed! on: 2006-03-23 22:10:58
Need a solid team of programers to create games. This is done on a volunteer basis, but determination and steadyness are needed.

Up front about the business. I understand that no money is involved in this process, but any person working on each project not only gets credit for the work done, but also will have a say in how a game is created.

More information at http://www.straydogstudios.com.

Thanx.

11  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-03-02 20:32:36
For example I have a constants or DB access class. it has Sword, Armor, Ring.

In the database these are lines like. Sword +1atk +1dmg such and so forth.

If i input the "Sword" as a string value given the Item Model, can I in the Item Model convert that or associate that with an image that holds the same placer and characteristics. So instead of selecting the text "Sword" from the JLabel and dragging back and forth to the list I can click, hold, drag a Sword image.
12  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-03-02 01:56:46
Can I import as a string from a DB and then set as an image for the string object for the transfer?
13  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-02-17 00:03:12
Rock on. I went ahead and upgraded to 1.5 instead.

Can you help me understand the model(item) stuff that you are doing throughout your classes. I believe it is simply turning it all to text. But I can't quite figure out where to put that and where to modify a transfer handler to fit my existing classes for equipment and such. Im trying to keep the already made look and feel and implement your drag and drop transfer logic.

Any ideas.
14  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-02-16 17:13:20
Okay im tearing it apart and reading and learning and such and ran into @Override that my eclipse doesn't like. I guess im running java 1.4 sdk and such.

whats the 1.4 equivalent to this command.
15  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-02-14 15:17:07
Cool deal I will take a looksee. Thanx!!!
16  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-02-10 19:27:58
here is Array Transfer Handler

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
215  
216  
/*
 * Created on Dec 16, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.util;

import java.util.*;
import java.io.*;
//import java.awt.*;
//import java.awt.event.*;
import java.awt.datatransfer.*;
//import java.awt.dnd.*;
import javax.swing.*;

/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */



public class ArrayListTransferHandler extends TransferHandler {
   
    public DataFlavor localArrayListFlavor, serialArrayListFlavor;
   
    public String localArrayListType = DataFlavor.javaJVMLocalObjectMimeType + ";class=java.util.ArrayList";
   
    public JList source = null;
    public int[] indices = null;
    public int addIndex = -1; //Location where items were added
   public int addCount = 0;  //Number of items added

    public ArrayListTransferHandler() {
        try {
            localArrayListFlavor = new DataFlavor(localArrayListType);
        } catch (ClassNotFoundException e) {
            System.out.println(
             "ArrayListTransferHandler: unable to create data flavor");
        }
        serialArrayListFlavor = new DataFlavor(ArrayList.class,
                                              "ArrayList");
    }

    public boolean importData(JComponent c, Transferable t) {
        JList target = null;
        ArrayList alist = null;
        if (!canImport(c, t.getTransferDataFlavors())) {
            return false;
        }
        try {
            target = (JList)c;
            if (hasLocalArrayListFlavor(t.getTransferDataFlavors())) {
                alist = (ArrayList)t.getTransferData(localArrayListFlavor);
            } else if (hasSerialArrayListFlavor(t.getTransferDataFlavors())) {
                alist = (ArrayList)t.getTransferData(serialArrayListFlavor);
            } else {
                return false;
            }
        } catch (UnsupportedFlavorException ufe) {
            System.out.println("importData: unsupported data flavor");
            return false;
        } catch (IOException ioe) {
            System.out.println("importData: I/O exception");
            return false;
        }

        //At this point we use the same code to retrieve the data
       //locally or serially.

        //We'll drop at the current selected index.
       int index = target.getSelectedIndex();

        //Prevent the user from dropping data back on itself.
       //For example, if the user is moving items #4,#5,#6 and #7 and
       //attempts to insert the items after item #5, this would
       //be problematic when removing the original items.
       //This is interpreted as dropping the same data on itself
       //and has no effect.
       if (source.equals(target)) {
            if (indices != null && index >= indices[0] - 1 &&
                  index <= indices[indices.length - 1]) {
                indices = null;
                return true;
            }
        }

        DefaultListModel listModel = (DefaultListModel)target.getModel();
        int max = listModel.getSize();
        if (index < 0) {
            index = max;
        } else {
            index++;
            if (index > max) {
                index = max;
            }
        }
        addIndex = index;
        addCount = alist.size();
        for (int i=0; i < alist.size(); i++) {
            listModel.add(index++, alist.get(i));
        }
        return true;
    }

    protected void exportDone(JComponent c, Transferable data, int action) {
        if ((action == MOVE) && (indices != null)) {
            DefaultListModel model = (DefaultListModel)source.getModel();

            //If we are moving items around in the same list, we
           //need to adjust the indices accordingly since those
           //after the insertion point have moved.
           if (addCount > 0) {
                for (int i = 0; i < indices.length; i++) {
                    if (indices[i] > addIndex) {
                        indices[i] += addCount;
                    }
                }
            }
            for (int i = indices.length -1; i >= 0; i--)
                model.remove(indices[i]);
        }
        indices = null;
        addIndex = -1;
        addCount = 0;
    }

    private boolean hasLocalArrayListFlavor(DataFlavor[] flavors) {
        if (localArrayListFlavor == null) {
            return false;
        }

        for (int i = 0; i < flavors.length; i++) {
            if (flavors[i].equals(localArrayListFlavor)) {
                return true;
            }
        }
        return false;
    }

    private boolean hasSerialArrayListFlavor(DataFlavor[] flavors) {
        if (serialArrayListFlavor == null) {
            return false;
        }

        for (int i = 0; i < flavors.length; i++) {
            if (flavors[i].equals(serialArrayListFlavor)) {
                return true;
            }
        }
        return false;
    }

    public boolean canImport(JComponent c, DataFlavor[] flavors) {
        if (hasLocalArrayListFlavor(flavors))  { return true; }
        if (hasSerialArrayListFlavor(flavors)) { return true; }
        return false;
    }

    protected Transferable createTransferable(JComponent c) {
        if (c instanceof JList) {
            source = (JList)c;
            indices = source.getSelectedIndices();
            Object[] values = source.getSelectedValues();
            if (values == null || values.length == 0) {
                return null;
            }
            ArrayList alist = new ArrayList(values.length);
            for (int i = 0; i < values.length; i++) {
                Object o = values[i];
                String str = o.toString();
                if (str == null) str = "";
                alist.add(str);
            }
            return new ArrayListTransferable(alist);
        }
        return null;
    }

    public int getSourceActions(JComponent c) {
        return COPY_OR_MOVE;
    }

    public class ArrayListTransferable implements Transferable {
        ArrayList data;

        public ArrayListTransferable(ArrayList alist) {
            data = alist;
        }

        public Object getTransferData(DataFlavor flavor)
                                 throws UnsupportedFlavorException {
            if (!isDataFlavorSupported(flavor)) {
                throw new UnsupportedFlavorException(flavor);
            }
            return data;
        }

        public DataFlavor[] getTransferDataFlavors() {
            return new DataFlavor[] { localArrayListFlavor,
                                      serialArrayListFlavor };
        }

        public boolean isDataFlavorSupported(DataFlavor flavor) {
            if (localArrayListFlavor.equals(flavor)) {
                return true;
            }
            if (serialArrayListFlavor.equals(flavor)) {
                return true;
            }
            return false;
        }
    }
}


and the Drag Mouse Adapter

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
/*
 * Created on Dec 15, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.util;


import java.awt.event.*;
import javax.swing.*;



/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */


public class DragMouseAdapter extends MouseAdapter {
   
    public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag(c, e, TransferHandler.COPY);
    }
}
17  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-02-06 22:27:38
Individually they work fine. But I can't drag from the list to the labels and vice versa.

18  Game Development / Newbie & Debugging Questions / Re: Help understanding class parts. on: 2006-02-06 22:26:48
Im using the 1.4 and newer I would guess since its the lastest version of eclipse. Its really hard to find examples of DnD and working ones for Labels at that.

Here is what I currently have.

Equipable
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
/*
 * Created on Dec 14, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.inventory;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.border.*;


import com.util.DragMouseAdapter;

/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

public class InvEquipPane extends JPanel{
   
   private JLabel invHelmet = new JLabel();
   private JLabel invArmor = new JLabel();
   private JLabel invMainHand = new JLabel();
   private JLabel invOffHand = new JLabel();
   private JLabel invAcc1 = new JLabel();
   private JLabel invAcc2 = new JLabel();
   
   
   public InvEquipPane() {
         //Set pane equipable slots
        super(new GridLayout(6, 1));
         
         //Define Equipable slots - Helmet, Armor, Main Hand, Off-Hand, Accessory 1, Accessory 2

         invHelmet = new JLabel( "test", SwingConstants.LEADING );
           invHelmet.setTransferHandler(new TransferHandler("text"));
                     
           invArmor = new JLabel( "", SwingConstants.LEADING );
           invArmor.setTransferHandler(new TransferHandler("text"));
           
           
           invMainHand = new JLabel( "", SwingConstants.LEADING );
           invMainHand.setTransferHandler(new TransferHandler("text"));
           
           invOffHand = new JLabel( "", SwingConstants.LEADING );
           invOffHand.setTransferHandler(new TransferHandler("text"));
           
           invAcc1 = new JLabel( "", SwingConstants.LEADING );
           invAcc1.setTransferHandler(new TransferHandler("text"));
           
           invAcc2 = new JLabel( "", SwingConstants.LEADING );
           invAcc2.setTransferHandler(new TransferHandler("text"));

           //Add Mouse Listeners to InvEquip Items
          MouseListener listener = new DragMouseAdapter();
           
           invHelmet.addMouseListener(listener);
           invArmor.addMouseListener(listener);
           invMainHand.addMouseListener(listener);
           invOffHand.addMouseListener(listener);
           invAcc1.addMouseListener(listener);
           invAcc2.addMouseListener(listener);
           
           //Create and Add the individual Equipable Item Drop and Drag boxes
          JPanel invHelmetPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invHelmetPanelBorder = BorderFactory.createTitledBorder("Helmet");
           invHelmetPanel.add(invHelmet);
           invHelmetPanel.setBorder(invHelmetPanelBorder);
           
           JPanel invArmorPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invArmorPanelBorder = BorderFactory.createTitledBorder("Armor");
           invArmorPanel.add(invArmor);
           invArmorPanel.setBorder(invArmorPanelBorder);
           
           JPanel invMainHandPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invMainHandPanelBorder = BorderFactory.createTitledBorder("Main-Hand");
           invMainHandPanel.add(invMainHand);
           invMainHandPanel.setBorder(invMainHandPanelBorder);
           
           JPanel invOffHandPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invOffHandPanelBorder = BorderFactory.createTitledBorder("Off-Hand");
           invOffHandPanel.add(invOffHand);
           invOffHandPanel.setBorder(invOffHandPanelBorder);
           
           JPanel invAcc1Panel = new JPanel(new GridLayout(1,1));
           TitledBorder invAcc1PanelBorder = BorderFactory.createTitledBorder("Accessory-1");
           invAcc1Panel.add(invAcc1);
           invAcc1Panel.setBorder(invAcc1PanelBorder);
           
           JPanel invAcc2Panel = new JPanel(new GridLayout(1,1));
           TitledBorder invAcc2PanelBorder = BorderFactory.createTitledBorder("Accessory-2");
           invAcc2Panel.add(invAcc2);
           invAcc2Panel.setBorder(invAcc2PanelBorder);
           
           //Create the equipable plane to show in applet
          JPanel invEquipPanel = new JPanel();
           invEquipPanel.setLayout(new GridLayout(6,1));
           TitledBorder invEquipPanelTitle = BorderFactory.createTitledBorder("Equipped");
           //Add items to the plane
          invEquipPanel.add(invHelmetPanel);
           invEquipPanel.add(invArmorPanel);
           invEquipPanel.add(invMainHandPanel);
           invEquipPanel.add(invOffHandPanel);
           invEquipPanel.add(invAcc1Panel);
           invEquipPanel.add(invAcc2Panel);
           invEquipPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
           invEquipPanel.setPreferredSize(new Dimension(300, 480));
           invEquipPanel.setBorder(invEquipPanelTitle);
           
           setLayout(new BorderLayout());
           add(invEquipPanel, BorderLayout.CENTER);
           setBorder(BorderFactory.createEmptyBorder(10,10,10,10));

       
           

           
           
   }


}


Items

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
/*
 * Created on Dec 14, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.inventory;


import java.awt.*;

import javax.swing.*;
import javax.swing.border.TitledBorder;


import com.util.ArrayListTransferHandler;

/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

public class InvItemPane extends JPanel{
   
   public ArrayListTransferHandler arrayListHandler;
   
   public InvItemPane(){
      arrayListHandler = new ArrayListTransferHandler();
      JList invList;
     
      DefaultListModel invListModel = new DefaultListModel();
      //Call and add list items from DB
     invListModel.addElement("0 (invList)");
      invListModel.addElement("1 (invList)");
      invListModel.addElement("2 (invList)");
      invListModel.addElement("3 (invList)");
      invListModel.addElement("4 (invList)");
      invListModel.addElement("5 (invList)");
      invListModel.addElement("6 (invList)");
      //End add of items from DB
     
      //Set some status stuff
     invList = new JList(invListModel);
      invList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
      invList.setTransferHandler(arrayListHandler);
      invList.setDragEnabled(true);
     
      //Setup the list
     JScrollPane invListView = new JScrollPane(invList);
        invListView.setPreferredSize(new Dimension(200, 100));
       
        JPanel invListPanel = new JPanel();
        invListPanel.setLayout(new BorderLayout());
        TitledBorder invListPanelTitle = BorderFactory.createTitledBorder("Items");
       
        invListPanel.add(invListView, BorderLayout.CENTER);
        invListPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
        invListPanel.setPreferredSize(new Dimension(200, 480));
        invListPanel.setBorder(invListPanelTitle);
       
        setLayout(new BorderLayout());
        add(invListPanel, BorderLayout.CENTER);
        setBorder(BorderFactory.createEmptyBorder(10,10,10,10));

     
   }


}


And i need to make these two react together in DnD.
19  Game Development / Newbie & Debugging Questions / Help understanding class parts. on: 2006-02-06 16:38:43
Well im still stuck on this dang DnD stuff. Here is a working class that I am trying to implement (take the right peices from) to make my DnD work correctly from label fields (equiped area) to a list (inventory) area. Ive got over the following class for days now and tried a couple of different things but need some help understanding whats exactly going on in it to see what i need and how to do it.

Or if there is a better way to do it please let me know Smiley

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
import java.awt.*;
import java.awt.event.*;
import java.awt.dnd.*;
import java.awt.datatransfer.*;
import javax.swing.*;
import java.io.*;

public class Drag1 extends JFrame
implements DragGestureListener, DragSourceListener, DropTargetListener
{
static String items[] = { "Item 1", "Item No. 2", "The Third Item!" };

Container cpane;
DropTarget mytarget;
DragSource mysource;
DragGestureRecognizer dgr;

JLabel source1;
JList list1;
JTextArea text1;
DefaultListModel lmod;

public Drag1() {
super("Drag1 Test");
cpane = getContentPane();
cpane.setLayout(new BorderLayout());

source1 = new JLabel("Drag Source Label - drag me!");
lmod = new DefaultListModel();
list1 = new JList(lmod);
for(int i = 0; i < items.length; i++)
lmod.addElement(items[i]);
text1 = new JTextArea("Drag from the label to\nthe list, then drop!",
5, 24);

mysource = new DragSource();

mytarget = new DropTarget(list1,
DnDConstants.ACTION_COPY_OR_MOVE, this);

dgr = mysource.createDefaultDragGestureRecognizer(source1,
DnDConstants.ACTION_COPY_OR_MOVE, this);

cpane.add("North", source1);
cpane.add("Center", list1);
cpane.add("South", text1);
text1.setBackground(Color.pink);
setBounds(100, 100, 320, 460);
setVisible(true);
}

public void dragGestureRecognized(DragGestureEvent e) {
String sel = source1.getText();
e.startDrag(DragSource.DefaultCopyDrop,
new StringSelection(sel), this);
}

public void dragEnter(DropTargetDragEvent e) {
System.out.println("dragEnter");
e.acceptDrag(DnDConstants.ACTION_COPY_OR_MOVE);
}
public void drop(DropTargetDropEvent e) {
System.out.println("drop");
try {
if (e.isDataFlavorSupported(DataFlavor.stringFlavor)) {
Transferable tr = e.getTransferable();
e.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
String s = (String)tr.getTransferData(DataFlavor.stringFlavor);
lmod.addElement(s);
e.dropComplete(true);
}
else {
e.rejectDrop();
}
}
catch (Exception ex) {
System.out.println("Data transfer exception: " + ex);
}
}
public void dragExit(DropTargetEvent e) {
System.out.println("dragExit");
}
public void dragOver(DropTargetDragEvent e) {
System.out.println("dragOver (drop)");
}
public void dropActionChanged(DropTargetDragEvent e) {
System.out.println("dropActionChanged");
}

public void dragDropEnd(DragSourceDropEvent e) {
System.out.println("dragDropEnd");
}
public void dragEnter(DragSourceDragEvent e) {
System.out.println("dragEnter");
}
public void dragExit(DragSourceEvent e) {
System.out.println("dragExit");
}
public void dragOver(DragSourceDragEvent e) {
System.out.println("dragOver (drag)");
}
public void dropActionChanged(DragSourceDragEvent e) {
System.out.println("dragActionChanged (drag)");
}


public static void main(String [] args) {
Drag1 d1;
d1 = new Drag1();
d1.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
} } );
}
}
20  Game Development / Newbie & Debugging Questions / Need Drag n Drop Help on: 2006-01-20 22:18:54
Sadly I got it to work but not how I need it to work.

Heres what I got
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
/*
 * Created on Dec 14, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.inventory;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.border.*;


import com.util.DragMouseAdapter;

/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

public class InvEquipPane extends JPanel{
   
   private JLabel invHelmet = new JLabel();
   private JLabel invArmor = new JLabel();
   private JLabel invMainHand = new JLabel();
   private JLabel invOffHand = new JLabel();
   private JLabel invAcc1 = new JLabel();
   private JLabel invAcc2 = new JLabel();
   
   
   public InvEquipPane() {
         //Set pane equipable slots
        super(new GridLayout(6, 1));
         
         //Define Equipable slots - Helmet, Armor, Main Hand, Off-Hand, Accessory 1, Accessory 2

         invHelmet = new JLabel( "test", SwingConstants.LEADING );
           invHelmet.setTransferHandler(new TransferHandler("text"));
                     
           invArmor = new JLabel( "", SwingConstants.LEADING );
           invArmor.setTransferHandler(new TransferHandler("text"));
           
           invMainHand = new JLabel( "", SwingConstants.LEADING );
           invMainHand.setTransferHandler(new TransferHandler("text"));
           
           invOffHand = new JLabel( "", SwingConstants.LEADING );
           invOffHand.setTransferHandler(new TransferHandler("text"));
           
           invAcc1 = new JLabel( "", SwingConstants.LEADING );
           invAcc1.setTransferHandler(new TransferHandler("text"));
           
           invAcc2 = new JLabel( "", SwingConstants.LEADING );
           invAcc2.setTransferHandler(new TransferHandler("text"));

           //Add Mouse Listeners to InvEquip Items
          MouseListener listener = new DragMouseAdapter();
           
           invHelmet.addMouseListener(listener);
           invArmor.addMouseListener(listener);
           invMainHand.addMouseListener(listener);
           invOffHand.addMouseListener(listener);
           invAcc1.addMouseListener(listener);
           invAcc2.addMouseListener(listener);
           
           //Create and Add the individual Equipable Item Drop and Drag boxes
          JPanel invHelmetPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invHelmetPanelBorder = BorderFactory.createTitledBorder("Helmet");
           invHelmetPanel.add(invHelmet);
           invHelmetPanel.setBorder(invHelmetPanelBorder);
           
           JPanel invArmorPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invArmorPanelBorder = BorderFactory.createTitledBorder("Armor");
           invArmorPanel.add(invArmor);
           invArmorPanel.setBorder(invArmorPanelBorder);
           
           JPanel invMainHandPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invMainHandPanelBorder = BorderFactory.createTitledBorder("Main-Hand");
           invMainHandPanel.add(invMainHand);
           invMainHandPanel.setBorder(invMainHandPanelBorder);
           
           JPanel invOffHandPanel = new JPanel(new GridLayout(1,1));
           TitledBorder invOffHandPanelBorder = BorderFactory.createTitledBorder("Off-Hand");
           invOffHandPanel.add(invOffHand);
           invOffHandPanel.setBorder(invOffHandPanelBorder);
           
           JPanel invAcc1Panel = new JPanel(new GridLayout(1,1));
           TitledBorder invAcc1PanelBorder = BorderFactory.createTitledBorder("Accessory-1");
           invAcc1Panel.add(invAcc1);
           invAcc1Panel.setBorder(invAcc1PanelBorder);
           
           JPanel invAcc2Panel = new JPanel(new GridLayout(1,1));
           TitledBorder invAcc2PanelBorder = BorderFactory.createTitledBorder("Accessory-2");
           invAcc2Panel.add(invAcc2);
           invAcc2Panel.setBorder(invAcc2PanelBorder);
           
           //Create the equipable plane to show in applet
          JPanel invEquipPanel = new JPanel();
           invEquipPanel.setLayout(new GridLayout(6,1));
           TitledBorder invEquipPanelTitle = BorderFactory.createTitledBorder("Equipped");
           //Add items to the plane
          invEquipPanel.add(invHelmetPanel);
           invEquipPanel.add(invArmorPanel);
           invEquipPanel.add(invMainHandPanel);
           invEquipPanel.add(invOffHandPanel);
           invEquipPanel.add(invAcc1Panel);
           invEquipPanel.add(invAcc2Panel);
           invEquipPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
           invEquipPanel.setPreferredSize(new Dimension(300, 480));
           invEquipPanel.setBorder(invEquipPanelTitle);
           
           setLayout(new BorderLayout());
           add(invEquipPanel, BorderLayout.CENTER);
           setBorder(BorderFactory.createEmptyBorder(10,10,10,10));

       
           

           
           
   }


}


along with
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
/*
 * Created on Dec 15, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.util;


import java.awt.event.*;
import javax.swing.*;



/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */


public class DragMouseAdapter extends MouseAdapter {
   
    public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag(c, e, TransferHandler.COPY);
    }
}


The problem Im having is that this works with the TransferHandler being a .COPY mode. When I change this to .MOVE I no longer can click the JLabel text and drag the item. Im sure im either missing something or don't have something setup right. But I need to not have the text in the JLabel copy to where I have duplicates.

Any Ideas??
21  Game Development / Newbie & Debugging Questions / Re: Inventory system layout issues on: 2006-01-20 16:45:05
If i use JLabel is my paintComponent Method overiting my JLabel?
22  Game Development / Newbie & Debugging Questions / Inventory system layout issues on: 2006-01-19 16:07:21
Okay, below is the code for the Character information area of my Inventory system for my game.

The problems im having are the following:

1. How in the world do I paint or write my strings to my panel?
2. How do i do it so i get a nice titled border layout like the equipable area and the inventory list?

Code>>>
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
/*
 * Created on Dec 14, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

package com.inventory;

import java.awt.*;
import javax.swing.*;
import javax.swing.border.TitledBorder;

/**
 * @author zalexander
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

public class InvCharPane extends JPanel{
   
   private String textString1 = new String();
   
   
   
   public InvCharPane() {
     
      JLabel invCharText = new JLabel();
      invCharText.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
      invCharText.setText(textString1);
     
     
      JPanel charPanel = new JPanel();
      TitledBorder charPanelTitle = BorderFactory.createTitledBorder("Character Information");
      charPanel.setLayout(new BorderLayout());
      charPanel.setPreferredSize(new Dimension(100, 480));
      charPanel.add(invCharText);
      //charPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     charPanel.setBorder(charPanelTitle);
     
   /**  
      JFrame invCharFrame = new JFrame("Character Information");
      invCharFrame.setSize(100,480);
      Container invCharContent = invCharFrame.getContentPane();
      invCharContent.setBackground(Color.white);
      invCharContent.setLayout(null);
      invCharContent.add(charPanel);
      invCharFrame.setVisible(true);
   */

   }
   
   public void paintComponent(Graphics charPane) {
      super.paintComponent(charPane);
      textString1 = "Character Pane Text";
     
      charPane.drawString(textString1,10,10);
     
     
     
   }

}


here is a screen shot of the first rendered version of the inventory system in full. (minus of course the few bugs im working on above)


thanx for any help given!
23  Game Development / Newbie & Debugging Questions / Re: Applets, frames and interface vs class problems <---notice the changed title on: 2006-01-11 21:32:43
Right now, its because i haven't setup a key listener or other menu or button to get them back up if i set them to false. I guess i should work that out. Smiley
24  Game Development / Newbie & Debugging Questions / Re: Applets, frames and interface vs class problems <---notice the changed title on: 2006-01-08 03:26:29
I think i get the idea now.

Each of my classes are extending JPanel and have multiple JPanels that I can add to a JFrame and set the Container.

With doing this I would like the JFrames to be able to resize and minimize but not ever close the JFrame.

What is the setting to not allow the JFrame to ever close?

P.S. It is Drag and Drop (also hoping that the list to label box will work being in seperate classes) Smiley
25  Game Development / Newbie & Debugging Questions / Applets, frames and interface vs class problems <---notice the changed title on: 2006-01-04 20:45:14
So I am currently working on a DnD system for my inventory. I think I got it straightened out to the point that I can build the applet portion and test it.

Well i built 3 classes (player info, equip, and inventory) the DnD is supposed to go between the inventory and equip. Each class extends JPanel and builds a panel or series of panels to create the interface using a border layout Smiley

Well in my main class that extends applet in my init() method or constructor.. how do i go about adding the different panels from the classes to the applet? Do i need to change all my 3 classes to jwindows that run inside of the applet and restrict resizing and closing for my purposes? Or do i somehow group them and set them as the main componet in each class doing a getComponet().add(blahblah)?

Im kinda lost here with this. The answer to this will also hopefully get me on the road to finishing the layout stuff for my actual game interface as it uses the same theory on things.

Also, can i do multiple Jwindows in an applet?
26  Game Development / Newbie & Debugging Questions / Re: Drag and Drop on: 2005-12-14 16:15:26
Okay i figured out what i want to do using the Picture example and the List example.

Basically I would like the inventory to be a list and there to be a number of slots or boxes you can drag items into (like for head, shoulders, legs, chest, etc.) but the examples on that page or using pictures to make the boxes.

What is another J(something or other) that can be used to make like slots or rectangles that the item can be placed in? Almost like what a form field would look like.. just not a form field. Unless of course i answered myself Smiley

Thanx for the help
27  Game Development / Newbie & Debugging Questions / Re: Drag and Drop on: 2005-12-12 16:59:05
LOL which means that not only will i need graphics for each of my items, but a graphic that has the mouse pointer over the item too to make it look correct. Smiley

How much of a pain is this to implement? The struggle im having is that im wanting to do either a list (Final Fantasy) or a DnD type system for my inventory screen (where you can move items around and equip shizzicknits). For the first run of my game i want to use the KISS (Keep it simple stupid) method and get it done right. But don't want to spend a year on one part of the game which can be delt with in later releases.

So one versus the other... Which is easier to implement and also the easiest for the user to use given the most flexibility?
28  Game Development / Newbie & Debugging Questions / Drag and Drop on: 2005-12-08 22:33:47
Has anyone done a drag and drop system say for inventory where you can click with your mouse, drag the object to the paper doll let go and it equips?
29  Game Development / Newbie & Debugging Questions / Re: Jpanels, panes, containers and other stuff on: 2005-12-07 18:58:50
After reading the site for this.. im not sure how to implement this system? Any pointers. all i see are free downloads which give me examples but not sure if i just use their code and change stuff or is this a language i integrate into eclipse
30  Game Development / Newbie & Debugging Questions / Re: Jpanels, panes, containers and other stuff on: 2005-12-02 21:35:29
Holy cow that looks neat. Imma check it out and see if it'll work for me. Learning more stuff all the time!

Im sure ill have much for questions after reading more into it!
Pages: [1] 2 3
 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (14 views)
2014-08-01 22:53:16

CogWheelz (14 views)
2014-08-01 22:51:43

CopyableCougar4 (15 views)
2014-08-01 19:37:19

CogWheelz (19 views)
2014-07-30 21:08:39

Riven (27 views)
2014-07-29 18:09:19

Riven (16 views)
2014-07-29 18:08:52

Dwinin (14 views)
2014-07-29 10:59:34

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

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

pw (44 views)
2014-07-24 01:59:36
Resources for WIP games
by CogWheelz
2014-08-01 18:20:17

Resources for WIP games
by CogWheelz
2014-08-01 18:19:50

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

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

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

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
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!