Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4 5 ... 14
  ignore  |  Print  
  State of Profit  (Read 48281 times)
0 Members and 1 Guest are viewing this topic.
Offline counterp

Senior Member


Medals: 11



« Reply #60 - Posted 2011-08-03 11:24:41 »

Yup, either the read operations or when a message needs to be sent to 500 people it might take quite long until the 500th person gets the message if it all needs to happen consecutively instead of at the same time.

Mike

What's wrong with something like:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
InputStream in...;
OutputStream out...;
Buffer buffer...;

public void run() {
    while (true) {
        try {
            // sleep for X ms
       } catch (InterruptedException e) {
        }
        if (in.available() > 0) {
            // read operations
       }
        synchronized (this) {
            out.write(buffer.toArray());
            buffer.clear();
        }
    }
}


You read/write on same thread, but instead of writing directly to the outputstream each time, you write to a buffer, which is in turn written to an outputstream, and the only blocking you get is synchronizing with the player to access the buffer.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #61 - Posted 2011-08-03 11:25:39 »

I think a neat solution to the problem of others taking advantage of the road you constructed, (which isn't really an issue IRL due to the roads not being built by the bus-company) would be this:


Make distance a significant factor:

To build a road, you need equipment, like trucks (and materials?)
This equipment needs to be moved (potentially using the very roads they construct)
The same equipment is required to build structures (bus stations)

Once you bring these systems in place, the game suddenly gained a lot of realism and solved the balance at the same time.

My $0.02 Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline counterp

Senior Member


Medals: 11



« Reply #62 - Posted 2011-08-03 11:29:32 »

I think you should be able to plant bombs on roads to thwart competition Sad
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #63 - Posted 2011-08-03 11:40:02 »

You read/write on same thread, but instead of writing directly to the outputstream each time, you write to a buffer, which is in turn written to an outputstream, and the only blocking you get is synchronizing with the player to access the buffer.

I didn't know of the available method, that makes sense indeed and would halve the number of threads available... sounds like a nice addition after I'm done with Riven's Smiley

I think a neat solution to the problem of others taking advantage of the road you constructed, (which isn't really an issue IRL due to the roads not being built by the bus-company) would be this:

Make distance a significant factor:

To build a road, you need equipment, like trucks (and materials?)
This equipment needs to be moved (potentially using the very roads they construct)
The same equipment is required to build structures (bus stations)

Once you bring these systems in place, the game suddenly gained a lot of realism and solved the balance at the same time.

My $0.02 Smiley

Sounds realistic but wouldn't that slow down the building of things? If I need to move the trucks/materials around every time I want to build something I'll need to wait for them to arrive, which in turn will prohibit me from quickly throwing up a couple of stations and building a road. I'll indeed need to fix the "tactic" of reusing roads, but I think that'll be easier solved by reputation based upon city loyalty to the first company that invest in them.

I think you should be able to plant bombs on roads to thwart competition Sad

Well... uhmm... no? Tongue

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline counterp

Senior Member


Medals: 11



« Reply #64 - Posted 2011-08-03 11:41:50 »

Well I can confirm there is a bug in purchasing buses. Sad

I bought 1 for my first station, and I got the bus.

The second bus, for my second station, just disappeared. The money is gone, the bus is gone >:O

And thanks for at least acknowledging my suggestion. Cry

EDIT: Also it appears my bus doesn't want to leave the station "Currently cannot find a path". I rotated the entrance to be facing the road, but it still can't find a path.
Offline pitbuller
« Reply #65 - Posted 2011-08-03 11:48:54 »

Give road a owner and then add some small payment for using it. That payment would come from citizens, other players or both.
That would add more variation and economics. Combine this with Riven ideas and there is two different game play strategy. Transporters and builders.

Ps. not yet even tested the game.
Offline counterp

Senior Member


Medals: 11



« Reply #66 - Posted 2011-08-03 12:22:48 »

Looks like my bus will never leave the station.  Emo
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #67 - Posted 2011-08-03 12:40:59 »

Well I can confirm there is a bug in purchasing buses. Sad

Seems my eclipse debug mode caused some issues instead of helping me solve them... They do leave for me and I can buy new ones... annoying that it isn't consistent Sad

And thanks for at least acknowledging my suggestion. Cry

Seeing as it's supposed to be a game that works for kids as well (my 6 year old is play testing it a lot Wink) I'm not sure blowing things up is very fitting. Adding some competition like bribing his employees to stop all busses leaving from a station for a couple of hours sounds like a sound tactic though Smiley

Give road a owner and then add some small payment for using it. That payment would come from citizens, other players or both.
That would add more variation and economics. Combine this with Riven ideas and there is two different game play strategy. Transporters and builders.

Ps. not yet even tested the game.

Roads are owned and I was considering the small payment for using roads someone else built, but won't that cause everyone to build their own roads in-between the cities? That might make the map very messy (as busses always take the shortest road).

I do really like the idea of different game play strategies though. From the beginning I wanted people to be able to focus on different tasks (building vehicles, building infrastructure or transporting things but as I didn't come up with the way to make it fun to only build roads (you drag a road and it's done) I moved away from that idea. If anyone can come up with a nice way to make it fun (without making it very slow and tedious) I'm all ears.

EDIT: I/O is now split up from logic and all logic happens in one thread, let's see if that helps a bit with narrowing things down Smiley

EDIT 2: Tested it by scrolling around a lot, built 3 stations and 10 vehicles. no disappearing or stuck vehicles, no errors on the client or server,. Let's hope it made it more stable Smiley

EDIT 3: Thanks to debug mode I found the dead lock that sometimes caused people not to get past the downloading packages screen Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline pitbuller
« Reply #68 - Posted 2011-08-03 14:05:07 »

You can balance road building and use cost so it's not good strategy just build own road every time. Example: Not every airline company build their own airport to every country even if they have to pay costs of using other companies airports.
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #69 - Posted 2011-08-03 14:13:40 »

If it's no good strategy to build your own roads, why would someone else specialize in only building roads? Because several people use the road and pay toll for it? Or thanks to research invested in specializing in road maintenance and building costs?

The only technical thing I have against it is that my path finding would be messed up as they always take the closest route (there is no distinguish between own roads (free) and using someone elses roads (paid), and having different weights for different people will be... messy.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Apo
« Reply #70 - Posted 2011-08-03 14:17:33 »

I think sorting the bus/building list after the town name isn't good. I think the build order would be great and the last one would stand on the top. And I miss something to drag the list because I have more than 260 buses ... That means 250 clicks to reach the end. Wink
And I repeat my wish: minimap and a big map (or really zoom out) because at the moment I don't know how much stations I have. =)
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #71 - Posted 2011-08-03 14:24:31 »

I think sorting the bus/building list after the town name isn't good. I think the build order would be great and the last one would stand on the top. And I miss something to drag the list because I have more than 260 buses ... That means 250 clicks to reach the end. Wink

260 busses?!?!? Do you have enough stations for that or do they all stand and wait for passengers all the time? Either way, nice job! Smiley

I was going to make it scrollable with the scrollwheel but I didn't think it was that needed yet as most people have 20-30 busses Tongue

which bus station is mine

Added, uploading shortly - Nice suggestion, I hadn't thought of distinguishing them with colors Smiley

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Apo
« Reply #72 - Posted 2011-08-03 14:36:53 »

260 busses?!?!? Do you have enough stations for that or do they all stand and wait for passengers all the time? Either way, nice job! Smiley

I was going to make it scrollable with the scrollwheel but I didn't think it was that needed yet as most people have 20-30 busses Tongue

~110 bus stations. I think thats good. But I think I lost the "overview". =)
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #73 - Posted 2011-08-03 15:03:34 »

Wow, so you're the one pushing the server to it's limits constantly? Nice job, money must be coming in at crazy speeds Smiley

Adding so you can scroll in the lists and a window with all cities including number of inhabitants. Seems like you start needing a map though with all cities and your own stations, hopefully (knock on wood) most of the critical bugs are gone so I can go on with adding it.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Apo
« Reply #74 - Posted 2011-08-03 15:15:33 »

Another idea ist after the station name in brackets (current buses are in and loading / maximum number of buses which stop here)

So it would be very easy to see which stations need (more) buses. (at the moment my problem Cheesy )
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #75 - Posted 2011-08-03 15:54:50 »

Another idea ist after the station name in brackets (current buses are in and loading / maximum number of buses which stop here)

So it would be very easy to see which stations need (more) buses. (at the moment my problem Cheesy )

I think that'd look bad on the map, but maybe in your list with stations?

Added a list with all cities in the game (with inhabitants). It's sortable by name asc, name desc, inhab asc and inhab desc. Clicking on a city brings you to it.

You can now scroll in lists (hold down page up/page down to scroll really quick).

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #76 - Posted 2011-08-03 18:24:07 »

Grats to Apo and Riven for being number #1 and #2 in the rankings Wink You may need to refresh the browser to see the rankings once you selected a server (caching). The button is temporary, as I'm on vacation I don't have access to my home computer where I made the buttons.

EDIT: Your busses are now red while the busses of the other companies are grey/white. This will help in locating your busses.

EDIT 2:
Another idea ist after the station name in brackets (current buses are in and loading / maximum number of buses which stop here)
In the station list it now says number of passengers waiting and number of buses using the station Smiley Nice suggestion!

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #77 - Posted 2011-08-03 20:48:18 »

great game Smiley. took a few mintues to really figure out.

one thing I want: more zoom-out. I was troubled by having to move around and I got lost :/.

also, whenever I cliked on a city to go there, eveything turned white for a few seconds and kinda looked like clouds.

keep up the great work Smiley
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #78 - Posted 2011-08-03 21:47:47 »

Thanks for the kind words Smiley

I'm trying to keep it simple enough for my 6 year old to play, but some things are indeed a bit too tricky (more graphics in the UI would help but alas I am not the best artist...)

Zooming out to come to a map is on the top of my todo list. I was actually planning to have done it already but requests from some guys here put other things higher on my list Smiley

The clouds are normal (it's actually the water but without land on the bottom). The reason for it is that the server keeps track of everything, and the clients only stream in/out the land close to the viewport (so it's the server that's limiting to the world size and never the applet), and the streaming and build up of the VBO's takes a couple of seconds.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #79 - Posted 2011-08-03 23:35:33 »

Grats to Apo and Riven for being number #1 and #2 in the rankings Wink

There is no way to beat Apo. For two very distinct reasons:
1. that cute little bastard takes advantage of your roads
2. once you are big, there is nothing stopping you: the growth is exponential so there is no way to catch up.

One of the problems is that everything keeps working. You can build two stations and one bus, and it will bring in money forever. If you'd add buses that break down or roads requiring maintenance, that would further balance the game.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #80 - Posted 2011-08-04 08:49:57 »

2. once you are big, there is nothing stopping you: the growth is exponential so there is no way to catch up.
Isn't that how it works in real life? Smiley
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #81 - Posted 2011-08-04 09:44:14 »

There is no way to beat Apo. For two very distinct reasons:
1. that cute little bastard takes advantage of your roads
2. once you are big, there is nothing stopping you: the growth is exponential so there is no way to catch up.

One of the problems is that everything keeps working. You can build two stations and one bus, and it will bring in money forever. If you'd add buses that break down or roads requiring maintenance, that would further balance the game.

Once I put in reputation (reason 1) and maintenance costs for the busses and stations (forcing you to pay attention to your busses so they are effective) I'll probably reset the world so we all get an even chance Smiley

Now off to do a map and then the overview of what you have and where you can build should be complete.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Apo
« Reply #82 - Posted 2011-08-04 14:31:11 »

Grats to Apo and Riven for being number #1 and #2 in the rankings Wink

There is no way to beat Apo. For two very distinct reasons:
1. that cute little bastard takes advantage of your roads
2. once you are big, there is nothing stopping you: the growth is exponential so there is no way to catch up.

One of the problems is that everything keeps working. You can build two stations and one bus, and it will bring in money forever. If you'd add buses that break down or roads requiring maintenance, that would further balance the game.

Hehe cute little bastard? Hehe nice. =) Only the first two day I thought Rivens streets are very nice. Wink Now I have to much money. More money than time to spend. =)

I know I have "some" buses. But not 4601312467735529 Wink I think its a bug. =)

Next idea: A site with stats for your company. How many buses do you have? How many stations? How much money do you get last 24 hours. etc =)
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #83 - Posted 2011-08-04 14:52:51 »

hey can you check to see if I set htings up right, cause Ia m not making money Tongue. thanks Smiley
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #84 - Posted 2011-08-04 15:44:08 »

hey can you check to see if I set htings up right, cause Ia m not making money Tongue. thanks Smiley

You have 5 buses, but if you open a bus station it says "Waiting for destination" on all of them.
If you click on the bus in the list the bus window opens. As you can see on that window the bus has a start station (the current station) but no end station.
If you click on "Click here to set destination" and then click on the station where you want the bus to go to they'll start driving and you'll start making money Smiley

I know I have "some" buses. But not 4601312467735529 Wink I think its a bug. =)

Where do you see that number? You have a net worth (current money/10+busses*10000+stations*20000) of 14 million...

Next idea: A site with stats for your company. How many buses do you have? How many stations? How much money do you get last 24 hours. etc =)

I'll make it so you can click on people in the rankings list and it'll display something like that, nice suggestion Smiley

The map will be quite nice but it's taking some time to implement, I'm hoping for today though!

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Bonbon-Chan

JGO Coder


Medals: 12



« Reply #85 - Posted 2011-08-04 15:49:07 »

After second load, stuck on "Determining packages to load", no errors in console.

It happen to me often. It seems to come from a caching problem (I clean the caches and it work again).
Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #86 - Posted 2011-08-04 15:59:07 »

I'm using the lwjgl applet loader... maybe there is some kind of debug output that can explain why. I can't reproduce it. There has been some improvements so maybe version 2.8 will fix it.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Apo
« Reply #87 - Posted 2011-08-04 16:02:51 »

Here is the bus bug =)

Offline Mike

JGO Wizard


Medals: 84
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #88 - Posted 2011-08-04 16:50:35 »

Ah, right! Smiley The client decides the name of the bus and if the server doesn't agree (already in use) it tries to assign another number. if that didn't work either then the server adds System.currentTimeMillis() afterwards (so it ended up wrong somewhere around 460 I guess) Tongue

I'll look if I can see something in the server log and otherwise always let the server decide the name.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #89 - Posted 2011-08-04 17:01:18 »

You're aware the the applet has been hanging at "Determining packages to load..." for about an hour?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: 1 2 [3] 4 5 ... 14
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (43 views)
2014-09-23 14:38:19

radar3301 (25 views)
2014-09-21 23:33:17

BurntPizza (62 views)
2014-09-21 02:42:18

BurntPizza (32 views)
2014-09-21 01:30:30

moogie (37 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
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

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

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

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!