Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (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]
1  Game Development / Game Play & Game Design / Re: How to update the files of my game on: 2009-09-10 21:45:28
ok so it seams that i will use the jnlp thing.
But i got some problems:

1. How does a jnpl work? I've seen it in games but still i don't know how to use it.
2. Can you unpack a jnpl file?
3. Are there only class files

Or let me put the question simpler: Where can I find a good explanation to how i create this jnpl file and how i use it and a description will also be very useful.

Thank you,
error777
2  Game Development / Game Play & Game Design / How to update the files of my game on: 2009-09-08 13:32:03
Hello folks,

i have a question about How could I update the files of my game or any other software if the version changes?
That is to general that is why i'm going to explain what i have thaught of:

My Software/Game downloads a file called versionNew.txt If the content of the VersionNew.txt is not the same as the content of VersionOld.txt then:

1. the content of VersionOld.txt should be the same as the content of VersionNew.txt
2. VersionNew.txt should be deleted.
3. The UpdatePrograme should download a Folder e.g. "NewFiles"
4. Old Files&Folders should be deleted
5. New Files&Folders should be copied into the root directory of the software.

Now I have 2 Problems.

1. How should I do this?
2. Is there another way to do it easier?

P.S.: It is for Updating Events or changes for my RPG that I am currently working on.

Realy need your help.
Thanks,
error777
3  Game Development / Artificial Intelligence / Re: Character EXP Formula on: 2009-09-07 10:01:50
ok i'll give it a try
thanks
4  Game Development / Artificial Intelligence / Re: Character EXP Formula on: 2009-09-05 11:40:53
In my opinion, a formula is not really the way to do it. Create a simple text file (or whatever, maybe just an array in-game) that contains all the XP values required for each level. A lot of the time you're going to want to get the first few levels very very quickly, then have a round of very tough to get levels, then make it a bit easier again, etc. Because the level up speed is directly related to the mobs in the area and how well the player can kill them, you'll need to be tweaking both their XP award and the player's required XP amount. Because of this, having to make a catch-all algorithm is quite tough, and won't suit your needs just right.

That is how I will do it, but first i needed a Formula for creating the EXP List, so I don't have to calculate every level myself Cheesy.
I fully agree with you.

Thanks
5  Game Development / Artificial Intelligence / Re: Character EXP Formula on: 2009-09-04 15:22:38
I don't really get what you mean by MIN EXP and MAX EXP.

What ever, let's thing about the problem. Let's say that you are level N.

1) First thing to do, is to define how mush xp you get by killing a mob of your level.
For exemple :
-  a level 1 mob give 10xp
-  a level (N+1) mob give x1.15 the xp of a N level mob

So a level N mob give to a level N player, XP_MOB(N) = XP_BASE*(XP_PROG^(N-1)) with XP_BASE = 10 and XP_PROG = 1.15

2) Second, you have to define how mush time a player will have to pass to get a level.
For example, 10 mobs at level 1 and 500 mobs at level 100. A linear progression is not a bad idea, I think.
So for a level N, you have to kill MOB_LEVEL(N) = (MAX_MOB-MIN_MOB)*(N-1)/99 + MIN_MOB mob of level N to level.

So at this end, you have to get for the level N :
XP_LEVEL(N) = MOB_LEVEL(N) * XP_MOB(N)
XP_LEVEL(N) = [ (MAX_MOB-MIN_MOB)*(N-1)/99 + MIN_MOB ] * XP_BASE*(XP_PROG^(N-1))

You can try to play with this formula to get what you want. You can change either the XP_MOB and the MOB_LEVEL formula.

Of course, you will have to add bonus for killing higher level mob than you / boss etc... and malus for killing lower level mob than you.

I didn't think about it that mush, you can find something better.

Thank you for this. My next step is now also resolved.
Thanks both of you Cheesy
6  Game Development / Artificial Intelligence / Re: Character EXP Formula on: 2009-09-04 14:19:51
Hi,

And thank you for the fast response.

@Bonbon - Chan - What you had written is not exactly what I need yet. I will probably use that later whan I have mobs.
But for now I just need a Formula from which I can Make a Character Experience List.
So how much EXP the Character needs to achive the next level.

@Nate - Very useful link and post. I already thaught of the Formula x^3 but it is sortof to simple and also to common. I rather have something of my own. So an own Formula for the game.
The for loop was also useful. Thanks.
I think you deserve a very BIG thanks Cheesy

EDIT: ( x * 0.8 ) ^ 3 OR ( x ^ 3 ) * 0.5 Seems like what I am looking for. Thanks again Nate for your link

Thanks to all




7  Game Development / Artificial Intelligence / Character EXP Formula on: 2009-09-03 13:01:15
Hi,

I am currently on a RPG and I still need some things like the EXP for the Character and when at what EXP he should level UP.
I tried myself some Formulas but none of them worked how I wanted to.
Then after hours of searching I gave Up and put my question in here.

I would like something like this:



It's a Graph.
So my maximum level would be 100 and my minimum level 1.

The RED curve is the EXPerience needed for the level under it.
So the levels are on the X-Axis and the EXP are on the Y-Axis.

I don't have a Maximum EXP and a Minimum EXP but the Formula should be so that It wouldn't need a MAX EXP only a MIN EXP.
So you can take anything for the MIN EXP.

Thanks and sorry for my bad english...

King regards,
Joseph

8  Game Development / Game Play & Game Design / Re: ImageMap - OnMouseOver and OnMouseClicked on: 2009-03-09 17:10:50
Thank you for the response.

Your methods brought me on one idea and combined with mine I almost finished what I wanted.

Panel.java

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  
import ...;

@SuppressWarnings("serial")
public class Panel extends JPanel implements MouseListener,MouseMotionListener {
   
   private BufferedImage foreground, background;
   
   public Panel() {
      try {
         foreground = ImageIO.read(new File("foreground.png"));
         background = ImageIO.read(new File("background.png"));
      } catch (IOException e) {
         System.out.println("Couldn't read images!");
      }
   }
   
   public void paintComponent(Graphics g) {
      g.drawImage(foreground, 0, 0, null);
   }

   public void mouseClicked(MouseEvent e) {
      System.out.println("Mouse Clicked");
     
      Point p = e.getPoint();
     
      int i = background.getRGB((int)p.getX(),(int)p.getY());
      Color c = new Color(i);
     
      System.out.println("R: "+c.getRed()+" B: "+c.getBlue()+" G: "+c.getGreen());
     
   }

   public void mouseMoved(MouseEvent e) {
     
   }
   
   public void mouseEntered(MouseEvent e)    {}
   public void mouseExited(MouseEvent e)     {}
   public void mousePressed(MouseEvent e)    {}
   public void mouseReleased(MouseEvent e)   {}
   public void mouseDragged(MouseEvent arg0) {}
}


Main.java

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
import ...;

public class Main {

   private static JFrame mainFrame = new JFrame("Test Image Map");
   
   public static void main(String[] args) {
      Panel p = new Panel();
      p.addMouseListener(p);
      p.addMouseMotionListener(p);
     
      mainFrame.getContentPane().add(p);
      //mainFrame.setPreferredSize(new Dimension(570,570));
     mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      mainFrame.setVisible(true);
      mainFrame.pack();
   }
}


As you see in my code I have two Images.
The foreground I paint it into my Panel extended by JPanel.
So if the user Clicks somewhere in the image it checks witch Color the Background image has.
From there I can do anything.
The same thing I must use on the highlighter thing but with more images.

Images that I used are in the attchment.

Thank you.


9  Game Development / Game Play & Game Design / ImageMap - OnMouseOver and OnMouseClicked on: 2009-03-08 20:42:36
Hello,

I'm quite new here and this is my first post i think.
I've looked at lots of topics in this forum and I must say that is the best one that could probably answer my question and help me.

I must make a sort of ImageMap like in HTML or JavaScript.

Some Examples:

http://en.wikipedia.org/wiki/File:Map_of_USA_with_state_names.svg

and

http://www.elated.com/articles/creating-image-maps/

but I can't find out how do do this.
I searched a lot but unsuccessfuly.

What I need?

Well I'm in a small game development where you have to klick around quite a lot.
And for the map i already have the images but I have to put them together give on each of those an MouseListener and see when the mouse is over an image is should highlight (probably a second image will take this role) and if the image is klicked it should perform the next action (e.g. System.out.println("Image klicked!"); or something)

my biggest problem is that i have to give all these images together so that is looks like a map seen from above (2D).
And then the second problem is my MouseListener. how to put it on a image.

I hope you can give me some advice and/or code.
Thank you,

Joe
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

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

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

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

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

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

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!