Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (426)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
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 / Networking & Multiplayer / Re: Hosting for JSP game on: 2007-07-26 23:46:41
eApps has the best customer service and their tech guys are quick. Hosting runs about $30 a month for VPS, but it's the best I've tried.
2  Game Development / Newbie & Debugging Questions / Scripting inside of Java on: 2007-07-26 23:40:33
I'm looking for some examples on how this done i.e Python or Jython.  It can be as simple as a Hello World example that has a greeting module to enhance Hello World to say Glad To See Ya.

Many thanks!
3  Game Development / Game Play & Game Design / Re: Feedback on simulation approach. on: 2006-12-05 20:42:00
So, I learned that TimerTasks are run on the same thread as the Timer that executes it. My test was flawed in that I created a timer for each TimerTask rather than using the 'one' timer.

Dave Brackeen was kind enough to point this out to me. Many thanks.
4  Game Development / Newbie & Debugging Questions / Re: StringTokenizer converted my escape characters on: 2006-12-05 20:37:43
This works just fine for me

public static void main(String... args){
      String str = "Welcome to this game\nThis is the second line of the message.\nThis is the third line";
   
      StringTokenizer tokenizer = new StringTokenizer(str, "\n");
      while(tokenizer.hasMoreTokens()){
         System.out.println(tokenizer.nextToken());
      }
      
   }

Output:
Welcome to this game
This is the second line of the message.
This is the third line
5  Game Development / Game Play & Game Design / Re: Feedback on simulation approach. on: 2006-11-30 17:54:55
The need is to do this 'real time'. Take OGame, which everyone has played  Wink. You ship some resources from one planet to the next and that action takes two hours to complete (hour there and back). You also have the option to cancel that action within the first hour.

What I'm getting at is that the action doesn't complete until some predetermined time in the future and the outcome of that action may be dependent upon another action issued by another player. I'm looking for a way to implement this without issuing a bunch of threads or timers, simply for the sake of saving resources and the ability to recover should my box lose power.

If this still doesn't make sense, maybe someone can describe how OGame might be implementing what I described. This is actually where my daughter got the idea and wanted me to build her an 'OGame'. I don't have the time for that and I compromised with shipping freight from city to city. Again, I apologize for the lack of RTS and Strategy game programming. I may just do this turn based and give x number of turns a day, but that removes some of the fun and does not solve my curiosity on how to implement this behavior.

Ahh. I just read this thread      How does it work in a MMORPG?  and it is important to note that the player might not be logged on when it's time for the action to complete. Hope that helps.
6  Game Development / Game Play & Game Design / Feedback on simulation approach. on: 2006-11-30 05:27:29
Ladies and Gentlespoons,hobos and tramps,
Cross-eyed mosquitoes,and bow-legged ants,
I stand before you to sit behind you
To tell you something I know nothing about.

Love that poem. Anyhow, I'm a little unsure of how to best solve the following problem and I'm welcoming all feedback from anyone who reads this post.

I have a daughter in 9th grade whose economics project / science fair project is due in February and she has decided to do a little 'tycoon' simulation. I have to code it of course. So, here's what I agreed to do for. Allow her and her classmates to run a simulation for ten to thirty days depending on when I can finish. Each 'player' will own a truck that they can ship freight with to earn an income. The only cost is fuel, but it takes time to travel from one city to the next. The truck is operated by a driver who never sleeps, so it can run for 24hrs straight. That's the bulk of it and is just that simple.

Now for the feedback as I'm still prototyping this in my mind. I've been developing Java since day 1.1 and have learned that just because this is meant for 25 or so people, it won't always be that way. I say that because issuing and tracking a few TimerTasks are fine, but would cause me a few headaches if I wanted to scale this. So, I'm thinking that I should just monitor a timestamp column for various records in the database.

1. Send freight from Jacksonville, FL to Nashville, TN
2. Calculated time is eight hours
3. Add timestamp to player_action table
4. When details related to player are queried, check the timestamp.
    a. If shipping time has passed ... drop freight ... collect pay .... top off fuel
    b. Calculate remaining time for display purposes



I played around with some MUD programming in my youth and wrote a sidescroller or two, and even implemented a few model simulations as course work in college, but  I always used Threads or Timers because nothing was multiplayer centric. Can someone suggest an alternate approach or a better way to implement what I described? Thanks in advance for your suggestions.

One more thing. This is text based or I'll implement something via the web for the players to choose which jobs they want to perform and it's at best a 'piece of a game'.
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.

xsi3rr4x (72 views)
2014-04-15 18:08:23

BurntPizza (68 views)
2014-04-15 03:46:01

UprightPath (79 views)
2014-04-14 17:39:50

UprightPath (65 views)
2014-04-14 17:35:47

Porlus (80 views)
2014-04-14 15:48:38

tom_mai78101 (104 views)
2014-04-10 04:04:31

BurntPizza (164 views)
2014-04-08 23:06:04

tom_mai78101 (260 views)
2014-04-05 13:34:39

trollwarrior1 (210 views)
2014-04-04 12:06:45

CJLetsGame (220 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!