Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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 ... 10
1  Discussions / Miscellaneous Topics / Abusing the use of letter salutations. on: 2014-08-08 21:38:44
I have been using "To whom it may concern," so frequently to the same recipient, I feel like I'm abusing it.

You know that in business and formal letters and emails, letter salutations are very important when addressing someone you are inquiring to. Upon checking for more info about this, I see there are plenty of other salutations I can use, like "Dear" or "Dear Sir or Madam", or even a simple "Hi".

But for my problems I'd like to inquiry, I want anyone to help solve my issues. In that case, should I continue to use the "To whom it may concern" salutation?
2  Discussions / Miscellaneous Topics / Bought myself a new smartphone! on: 2014-07-10 15:49:33
HTC One (M8).

Ah, the 2.3 GHz quad-core CPU laptop-as-a-phone in the palm of my hand.
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-09 16:42:43
I am currently in the process of applying for insurances. I feel like wanting to take a break completely after going through mundane applications and traveling.

On a good note, I have placed a project up in the Showcase section. I call it the "Marble Run". The game itself is completely finished, and it's not 100% polished.

To be honest, I loved the concept, but I hate developing it. It contains many nightmares and bad memories of someone else I don't even want to go over. I'm moving on from it, never to return to it to finish polishing it. It's more like my ex, but it's even more darker than that. So, yeah.



EDIT: I just realized I posted in the wrong subforum.  Cranky
4  Games Center / Android Showcase / [Mostly Completed / Shelved Indefinitely] [Android] Marble Run on: 2014-07-09 16:37:30


Title: Marble Run
Latest Stable Build: Alpha 0.6c (Final)
Minimum Requirements: Android 2.1 and up. Requires accelerometer.



Download:
http://www.thehelper.net/attachments/marble_run0-6c-apk.18066/



Description:

This is an Android game, created for my Computer Science project. It uses the accelerometer sensor inside Android smartphones and devices to interact and play. The accelerometer controls a red ball. Tilting and turning your device will make the ball to move around.



How to play:

To play, hold your device parallel to a table or a floor. Slowly tilt the device towards the direction where you wanted to go to, until you see the ball starts moving. Collect coins on your way to earn points for your score. Try to get the ball to the hole to advance to the next stage.



More information (Known Issues, etc.) here:

https://github.com/tommai78101/Marble-Run



This work is Apache Licensed.
5  Discussions / General Discussions / Re: Untrusted - A Javascript Codable Game on: 2014-07-06 08:30:07
There goes my productivity for this weekend.
6  Game Development / Newbie & Debugging Questions / Re: Keyboard Controlled Menu (Speed is too fast) on: 2014-07-04 15:29:49
You need to detect if a single key input has been pressed, tapped, and check its last key input state. That's 3 things you need to check for.

For example, if I need to detect an "UP" key press, I would do this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
//Mock game loop.
while (true){
     //...60 FPS

     //Somewhere in the beginning, all key inputs have its states cleared.
     UP.setKeyState(false);
     UP.setLastKeyState(UP.getKeyState());

     // --------------------------------------

     //User pressed the UP key...
     UP.setKeyState(true);

     // --------------------------------------

    //Detecting up key....
    if (UP.isPressed() && !UP.getLastKeyState()){
          UP.setLastKeyState(true);
          //Do something here...
    }
}


My own implementation:

InputHandler:
https://github.com/tommai78101/PokemonWalking/blob/master/src/main/InputHandler.java

Keys:
https://github.com/tommai78101/PokemonWalking/blob/master/src/main/Keys.java
7  Game Development / Newbie & Debugging Questions / Re: Tile Placing on: 2014-07-04 15:07:09
1  
2  
3  
//Some code...
ArrayList<Skyscraper> skyscraperList = new ArrayList<Skyscraper>();
//Some code...


1  
2  
3  
temp = new Skyscraper();
temp.placeSkyscraper(cursor.getX(), cursor.getY());
skyscraperList.add(temp);
 

Huh
8  Game Development / Newbie & Debugging Questions / Re: [Swing] Unable to update JList element's name on the fly while editing its name on: 2014-07-04 13:13:13
Fixed my issue with this Stack Overflow solution:
http://stackoverflow.com/questions/9865119/java-updating-jlist-after-changing-an-object

I feel like questions like these need to be rephrased again and again until it clicks.  Stare

9  Game Development / Newbie & Debugging Questions / [Swing] Unable to update JList element's name on the fly while editing its name on: 2014-07-04 12:46:59
The problem right now is the element's name is updated when I finished typing the new name in the text field and then clicking somewhere in the JList.

Current Problem (GIF):

Click to Play


I'm trying to update the element's name in the JList while I'm typing the new name in the text field when the element is being selected. That means, I'm updating the element's name in real-time.

Solution (GIF):

Click to Play


How do I achieve this? Thanks in advance.



Here's an SSCCE code I used for the creation of the GIFs, given below:

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  
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;

public class Test extends JFrame implements DocumentListener, ActionListener {
   
   public static class Something {
      public String name;
   }
   
   public static class CellNameRenderer extends DefaultListCellRenderer {
      private static final long serialVersionUID = 1L;
     
      @Override
      public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
         JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
         Something something = (Something) value;
         label.setText(something.name);
         return label;
      }
   }
   
   private static final long serialVersionUID = 1L;
   JList<Something> list;
   JTextField textField;
   JButton addButton;
   boolean isSelected;
   
   public Test() {
      final Dimension listSize = new Dimension(200, 300);
      final Dimension textFieldSize = new Dimension(80, 10);
     
      list = new JList<Something>(new DefaultListModel<Something>());
      list.setMinimumSize(listSize);
      list.setPreferredSize(listSize);
      list.setCellRenderer(new CellNameRenderer());
     
      textField = new JTextField();
      textField.setMinimumSize(textFieldSize);
      textField.setPreferredSize(textFieldSize);
      textField.getDocument().addDocumentListener(this);
     
      addButton = new JButton("Add");
      addButton.addActionListener(this);
     
      JPanel panel = new JPanel();
      panel.setLayout(new BorderLayout());
     
      panel.add(list, BorderLayout.WEST);
      panel.add(textField, BorderLayout.EAST);
      panel.add(addButton, BorderLayout.CENTER);
     
      this.add(panel);
      this.pack();
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      this.setVisible(true);
   }
   
   public static void main(String[] args) {
      new Test();
   }
   
   @Override
   public void changedUpdate(DocumentEvent event) {
     
      /*
       * PROBLEM: COULD NOT GET THE ELEMENT TO CHANGE NAME ON THE FLY WITHOUT CLICKING.
       */

     
      if (!list.isSelectionEmpty()) {
         Something something = list.getSelectedValue();
         something.name = textField.getText();
         
         DefaultListModel<Something> model = (DefaultListModel<Something>) list.getModel();
         model.get(list.getSelectedIndex()).name = textField.getText();
         
         list.revalidate();
      }
   }
   
   @Override
   public void insertUpdate(DocumentEvent event) {
     
      /*
       * PROBLEM: COULD NOT GET THE ELEMENT TO CHANGE NAME ON THE FLY WITHOUT CLICKING.
       */

     
      if (!list.isSelectionEmpty()) {
         Something something = list.getSelectedValue();
         something.name = textField.getText();
         
         DefaultListModel<Something> model = (DefaultListModel<Something>) list.getModel();
         model.get(list.getSelectedIndex()).name = textField.getText();
         
         list.revalidate();
         
      }
   }
   
   @Override
   public void removeUpdate(DocumentEvent event) {
     
      /*
       * PROBLEM: COULD NOT GET THE ELEMENT TO CHANGE NAME ON THE FLY WITHOUT CLICKING.
       */

     
      if (!list.isSelectionEmpty()) {
         Something something = list.getSelectedValue();
         something.name = textField.getText();
         
         DefaultListModel<Something> model = (DefaultListModel<Something>) list.getModel();
         model.get(list.getSelectedIndex()).name = textField.getText();
         
         list.revalidate();
      }
   }
   
   @Override
   public void actionPerformed(ActionEvent event) {
      DefaultListModel<Something> model = (DefaultListModel<Something>) list.getModel();
      Something something = new Something();
      something.name = textField.getText();
      model.addElement(something);
   }
}


10  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-04 11:03:26
Today I have set an appointment to see a dentist in order to take out an irritating wisdom tooth affecting my right jaw hinge area.

Currently, the swelling around the jaw hinge is causing mucus buildup near my esophagus, my nasal passage, and the right ear canal (creating earwax buildup and slight deafness).

If for some reason, I'm no longer updating my Pokémon Walking project in 1 month (as in, no activities in 1 month in the "testing" branch on Github), it means I may be dead. I probably need a volunteer in the future to notify Github that I'm dead and the project should be marked as "no longer active" or something.

This news article is what's scaring me, Man dies of toothache.
http://abcnews.go.com/Health/insurance-24-year-dies-toothache/story?id=14438171

Most of me being scared of this, Complications after extraction of tooth, such as Bleeding to death.
http://doctorspiller.com/Extractions/Extractions_4.htm

I don't have a death wish list, but I just wanted to see my Pokémon Walking be completed when I die.
11  Discussions / General Discussions / Re: Have you ever debug your programs/games on an emulator? on: 2014-06-25 01:22:07
This is a main caveat.
12  Discussions / General Discussions / Re: Have you ever debug your programs/games on an emulator? on: 2014-06-24 02:17:29
This might be a reasonable test if you don't have access to another machine, but you could also solicit testers with suitable hardware who want to try out the game.

This is the main problem when you're limited to certain devices (No Macbooks nearby, no iPhones). I don't like to solicit testers, since the action done is like commanding something to do something in a grateful, appreciative way.
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-06-23 06:44:53
You're always there.

I just happened to jump into the top 16 in one day. How about that?  Pointing Cheesy
14  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-06-23 02:16:51
I've made it on the JGO top 16's.

Take that trollwarrior1!!




15  Game Development / Newbie & Debugging Questions / Re: [Swing] How do I: Multiple JFrames approach to utilize multiple content editors? on: 2014-06-23 02:07:33
This is the reason why I don't want to use JDialogs over JFrames.

JDialogs can block UI event dispatch threads, which the World Editor in Exhibit A doesn't do. If using JFrames, users can simply switch to any editors can continue to work simultaneously. Also, because JDialogs do not have minimize/maximize buttons, they aren't really intuitive to clients.
16  Game Development / Newbie & Debugging Questions / Re: [Swing] How do I: Multiple JFrames approach to utilize multiple content editors? on: 2014-06-22 15:20:32
I don't know. I haven't thought too far ahead about this.

Currently, I just had "parent closes all, child closes itself" paradigm made, so I'm going to work on this and see.
17  Game Development / Newbie & Debugging Questions / Re: [Swing] How do I: Multiple JFrames approach to utilize multiple content editors? on: 2014-06-22 15:10:44
Just make sure to hold a pointer to the new JFrames.

Wouldn't that make the new JFrames not garbage collectable? From my current testing results, I never had any members holding references to the new child JFrames.

Unless, you mean that these multiple JFrames should be in a
parent <--> parent
relationship? Interchangeable JFrames seems very close to what Blizzard had done with their World Editors. Hm...
18  Game Development / Newbie & Debugging Questions / How should I put the Generic type in this BasicComboBoxRenderer subclass? on: 2014-06-22 14:56:03
I followed this tip on implementing a custom combo box renderer that allows me to pass in Objects and display specific data fields while also enabling the use of JComboBox key search features.

http://tips4java.wordpress.com/2013/11/17/combo-box-with-custom-renderer/

The code that was used in the article is given below:

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  
package editor;

import java.awt.Component;

import javax.swing.ComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JList;
import javax.swing.UIManager;
import javax.swing.plaf.basic.BasicComboBoxRenderer;

//PROBLEM HERE<-------------------------------------------------------------------------
@SuppressWarnings("unchecked")
public abstract class KeySelectionRenderer extends BasicComboBoxRenderer implements JComboBox.KeySelectionManager {
   private static final long serialVersionUID = 2334229124492928364L;
   private long currentTime;
   private long lastTime;
   private final long timeFactor;
   private String prefix = "";
   
   /**
    * This class can be used as the renderer and KeySelectionManager for an Object added to the ComboBoxModel.
    *
    * <p>
    * The class must be extended and the getDisplayValue() method must be implemented. This method will return a String to be rendered in the JComboBox. The same String will be used to do key selection of an item in the ComboBoxModel.
    *
    * @param box
    *            A JComboBox object that is to use this KeySelectionRenderer.
    */

   public KeySelectionRenderer(JComboBox box) {
      box.setRenderer(this);
      box.setKeySelectionManager(this);
     
      Long value = (Long) UIManager.get("ComboBox.timeFactor");
      timeFactor = (value == null ? 250L : value.longValue());
   }
   
   public KeySelectionRenderer(JList list) {
      list.setCellRenderer(this);
     
      Long value = (Long) UIManager.get("ComboBox.timeFactor");
      timeFactor = (value == null ? 250L : value.longValue());
   }
   
   /**
    * Implements the renderer.
    */

   @Override
   public Component getListCellRendererComponent(JList list, Object item, int index, boolean isSelected, boolean hasFocus) {
      super.getListCellRendererComponent(list, item, index, isSelected, hasFocus);
      if (item != null) {
         this.setText(getDisplayValue(item));
      }
      return this;
   }
   
   /**
    * Implements the KeySelectionManager.
    * */

   @Override
   public int selectionForKey(char aKey, ComboBoxModel model) {
      this.currentTime = System.currentTimeMillis();
     
      // Get the index of the currently selected item
      int size = model.getSize();
      int startIndex = -1;
      Object selectedItem = model.getSelectedItem();
      if (selectedItem != null) {
         for (int i = 0; i < size; i++) {
            if (selectedItem == model.getElementAt(i)) {
               startIndex = i;
               break;
            }
         }
      }
     
      // Determine the "prefix" to be used when searching the model. The
      // prefix can be a single letter or multiple letters depending on how
      // fast the user has been typing and on which letter has been typed.
      if (currentTime - lastTime < timeFactor) {
         if ((prefix.length() == 1) && (aKey == prefix.charAt(0)))
            // Subsequent same key presses move the keyboard focus to the next
            // object that starts with the same letter.
            startIndex++;
         else
            prefix += aKey;
      }
      else {
         startIndex++;
         prefix = "" + aKey;
      }
     
      lastTime = currentTime;
     
      // Search from the current selection and wrap when no match is found
      if (startIndex < 0 || startIndex >= size)
         startIndex = 0;
      int index = getNextMatch(prefix, startIndex, size, model);
      if (index < 0)
         // Wrap
         index = getNextMatch(prefix, 0, startIndex, model);
      return index;
   }
   
   /**
    * Finds the index of the item in the model that starts with the prefix.
    */

   private int getNextMatch(String prefix, int start, int end, ComboBoxModel model) {
      for (int i = start; i < end; i++) {
         Object item = model.getElementAt(i);
         if (item != null) {
            String displayValue = getDisplayValue(item).toLowerCase();
            if (displayValue.startsWith(prefix))
               return i;
         }
      }
      return -1;
   }
   
   /**
    * This method must be implemented in the extended class.
    *
    * @param item
    *            an item from the ComboBoxModel
    * @returns a String containing the text to be rendered for this item.
    */

   public abstract String getDisplayValue(Object item);
}


Near the top of the code, I marked the problem out for you. You can see that I suppressed a warning, which is marking the issue where
KeySelectionListener
is in general form, instead of having a Generic type. The problem is, I don't know what to put the Generic type at. The suggested solutions by Eclipse is confusing me even more, so I kept the code like this when I releasing my update to my project.

Since the article didn't explain how to put the Generic type in, I was wondering if anyone here can help me how to "remove" this warning. I just don't like having my codes littered with yellow warnings, especially in this abstract class given above.

Thanks in advance.
19  Game Development / Newbie & Debugging Questions / Re: [Swing] How do I: Multiple JFrames approach to utilize multiple content editors? on: 2014-06-22 14:47:55
This post is justified (in my opinion) enough to be separated from my post above.

The solution to this problem is:

1. In the parent JFrame, use
setDefaultCloseOperation(JFrame.DISPOSE_ON_EXIT);
.
2. In the child JFrame(s), make sure they call
addWindowListener();
. In the parameters, pass in a
WindowAdapter
class that overrides
windowClosing(WindowEvent event);
. In that method, just call on
this.dispose();
for the child JFrame(s).

That way, the parent JFrame will close every single child JFrames, but the child JFrame(s) will not close the parent JFrame.
20  Game Development / Newbie & Debugging Questions / Re: [Swing] How do I: Multiple JFrames approach to utilize multiple content editors? on: 2014-06-22 13:26:33
That would make my editor more of 1 window encompassing all functionalities. I would want it to be 1 JFrame parent encompassing multiple independent JFrames for each different functionalities.

In World Editor, there's this main parent window called the Terrain Editor. When you clicked on the top-most button, where the letter "a" is at, a child window called the Trigger Editor pops out. Closing the Trigger Editor does not close the Terrain Editor. Closing the Terrain Editor, however, closes both the Trigger Editor and the Terrain Editor itself.

When both of the editors are opened, they can be moved around, meaning that they are independent of each other in terms of window components. If 1 JFrame were to have multiple JPanels, it would mean that there's just 1 window that can be moved around, and not 2 or more windows moving around independently. Hence the multiple JFrames approach. Or maybe it should be multiple JWindows approach?

Don't worry about it, the more I try to describe it, the more I get confused about it. I'll continue to search for "multiple JFrames" or "multiple JWindows" on Stack Overflow, to see what answers might be available.
21  Discussions / General Discussions / Re: New feature: topic labels [solved] on: 2014-06-22 09:12:11
Knowing the level some members operate on, we'd be flooded by ill conceived, offensive labels.

We can add a threshold for minimum amount of medals earned in order to add labels. Like 20 medals. This may also be used to encourage more users to engage in topics and provide helpful or appreciated posts for relevant threads. Plus, it would give me an incentive to get another 10 medals.
22  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles >>MAP EDITOR TECH DEMO RELEASED!!<< on: 2014-06-22 06:42:32
Aww. I recalled that someone is working on embedding HTML5 videos here, so your threads won't be bogged down by GIFs.

Am I mistaken?
23  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles >>MAP EDITOR TECH DEMO RELEASED!!<< on: 2014-06-22 06:39:52
Could there be a GIF image to showcase a demo of your editor, please?

There's a few gifs on the front page already, but a full blown gif would be way too large. Since my game has a ton of contrasting and moving colors it doesn't compress well at all. :/

We have GFYCAT that hosts GIANT GIFs for Reddit.
24  Discussions / Miscellaneous Topics / An old classic that nobody knew before: 2D FrontLine on: 2014-06-22 06:36:00
Gameplay video:

<a href="http://www.youtube.com/v/xGRHms-_r7I?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/xGRHms-_r7I?version=3&amp;hl=en_US&amp;start=</a>



This is a game I have played from a long long time ago, back when I was an elementary student. Many people played this game in our computer class, so it was fun to try and compete for the highest score.

I'd like to share this with you, just as I have found it online on Reddit. The original link is long gone, but many people still have them unzipped on their USB drives, so it was vastly popular at the time.

I would say this can help inspire new ideas for newcomers to this game, so hopefully we get to see some variants of this.



Before playing:

You need to set the compatibility mode to Windows XP SP3 or less. Since this game is from the pre-XP era, it doesn't run very well on Windows Vista and/or above.

Just unzip and enjoy.

Controls:

Z: Move backwards.
X: Shield. Use mouse to change directions.
C: Move forwards.
Left Mouse Button: Fire Selected Weapon. Choose weapons at the bottom of the GUI.
Right Mouse Button: Reload Selected Weapon. Buy ammo at the bottom of the GUI.

Goal:

Try to get as far as possible. Many surprises up ahead.

Download:

http://www.thehelper.net/attachments/2d-frontline-zip.18696/
25  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles >>MAP EDITOR TECH DEMO RELEASED!!<< on: 2014-06-22 06:26:12
Could there be a GIF image to showcase a demo of your editor, please?


Texture bleeding is something that occurs when the background canvas is not cleared, leaving behind trails of residues.
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-06-22 06:21:27
Use this to make it readable:

[img width=800][/img]

800, 700, whatever it is.

Thanks.
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-06-22 05:21:38
So yeah, I moderate Tsundere Spiders.

Today I did this:







28  Discussions / General Discussions / Re: New feature: topic labels [solved] on: 2014-06-22 05:14:51
Dear Lord Riven,

My lord, can be have another tag for Swing? I think a [Swing] tag is viable as an option for labeling a thread, since it also touches upon Java cross-platform components. Some of the games also used a bit of Swing to depict their creations, if broken down into finer details.

Sincerely,
tom_mai78101
29  Game Development / Newbie & Debugging Questions / [Swing] How do I: Multiple JFrames approach to utilize multiple content editors? on: 2014-06-22 05:10:28
I'm looking at this Stack Overflow question and answer here:
http://stackoverflow.com/a/17961122/1016891

My main goal is to use multiple JFrames for the end users to easily use my level editor to create contents. I know that there exists a common flow saying that multiple JFrames is a bad practice, but I feel as if that's not entirely the case.



Exhibit A: Warcraft III World Editor (Main Editor + Triggers Editor)

Main Editor:


Triggers Editor:




From these two screenshots (both of which are crappy, by the way...), you can see that they consist of two different windows, which can be run side-by-side. Each window expresses functionality in two different aspects of a custom map, one of which focuses on the terrain and units, while the other is focused on triggers and scripts.

This is something I wanted to do with my level editor, one maintains the tilesets, while the other focuses on the triggers/events/scripting aspects of my game.

I wanted to know how to approach the multiple JFrames system, and what best practices go with this. There are some suggestions such as offering a static method
open()
that opens up a new JFrame along with the reference to the parent JFrame, or call it when a button is activated (similar veins to Exhibit A's approach).

Can anyone provide other alternative suggestions? This is so I can consider multiple perspectives as well as different approaches to implement this system. That'll be appreciated.
30  Discussions / General Discussions / Have you ever debug your programs/games on an emulator? on: 2014-06-21 08:26:57
Since there exists a Windows emulator for Linux, I thought about installing an emulator that runs Max OSX on Windows 7.

http://lifehacker.com/5938332/how-to-run-mac-os-x-on-any-windows-pc-using-virtualbox

All for the sake of debugging a completely portable Java game.

Have you ever debug your programs/games on an emulator before? It doesn't matter if it's Java, or C++, or assembly.
Pages: [1] 2 3 ... 10
 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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