Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 6 ... 14
  ignore  |  Print  
  State of Profit  (Read 47829 times)
0 Members and 1 Guest are viewing this topic.
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #90 - Posted 2011-08-04 17:41:39 »

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.
What version of the applet loader are you using anyway? but yeh there are a tons of fixes and new stuff in the current nightly build.

You're aware the the applet has been hanging at "Determining packages to load..." for about an hour?
Not sure why its hanging at the point since that part only requests the sizes of the jars from the server, so could be that the server just isn't responding back.

Easy way to clear the lwjgl cache (usually a pain to find directory manually on windows) is just enter "%temp%\lwjglcache" (without quotes) in the run box and delete the domain folder.
Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #91 - Posted 2011-08-04 17:47:05 »

Riven - Thanks for telling me, I wasn't aware of it (was at dinner). Fixed it (an infinte loop, added a way for it to get out of it). I gave you a star for it (I'll not give it to everyone posting as I don't want people to post for that reason Wink).

Kappa - Crashing at that point can also mean that the server isn't accepting the login as the connection with the server is put up before my own loading screen appears. On the other hand, clearing the cache shouldn't make the server start accepting it... Tongue

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: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #92 - Posted 2011-08-04 17:51:43 »

Let's say there are >1000 passengers waiting at a station, and there are >10 buses in that station, it seems like the 'currently loading' buses aren't handled 'concurrently', as in, it will fill the first bus, wait a minute, fill the second bus, wait a minute, etc. Maybe my observations are wrong, but at the moment it seems busy stations are clogging up. (Hence I'm building lots of stations in each city)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #93 - Posted 2011-08-04 18:02:21 »

They're loading at the same time (minimum loading time is 20 seconds) but only one bus per 3 seconds can leave a station (the vehicles are updated once every 3 seconds on the server and the one who came first leaves first). If you have a ton of vehicles then it'll indeed clog up, any ideas around it?
I could lower the 3 seconds but as the server is a single core and it takes about 50ms right now to update the 1000 or so vehicles I don't want to make it much more frequent or the server won't be doing anything but moving vehicles.

Another way is to allow several busses to leave each 3 second tick, but if bus 1 comes first, then bus 2 and then bus 3, while the server first handles bus 2 (not first in line), then bus 1 (first in line, can leave) and then bus 3 (not first in line now as bus 2 is) it'll not be predictable how the vehicles are going to be loaded and leaving.

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: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #94 - Posted 2011-08-04 18:14:42 »

50ms to move 1000 vehicles around seems very long. Maybe the problem is in pathfinding?


Two ideas you might already have implemented:

Cache routes between A and B, until there are new/removed roads in the 'region' of the route.
Handle the parts between road intersections as 1 node with a bigger weight.


If not already implemented, that should make it at least 100 times faster.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Apo
« Reply #95 - Posted 2011-08-04 18:58:18 »

At the moment it happens very often that I can't buy another bus. When I buy a bus I lost the money but the bus disappears. =(
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #96 - Posted 2011-08-04 19:10:09 »

They're loading at the same time (minimum loading time is 20 seconds) but only one bus per 3 seconds can leave a station (the vehicles are updated once every 3 seconds on the server and the one who came first leaves first). If you have a ton of vehicles then it'll indeed clog up, any ideas around it?

I think the problem lies somewhere else.

At the moment, in 'Sawyerville Central Bus Station' there are 800 passengers and 10 buses.

It's been like that for about 5 minutes... Sad

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #97 - Posted 2011-08-04 19:13:58 »

Quickly, is there a way to reset my account? I don't want to use another user name Tongue

Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #98 - Posted 2011-08-04 19:24:06 »

Create another account and I'll rename it Tongue

Riven: That sounds weird, It must be something else as well indeed. I'll have a look at the busstation (game might be acting weird if I pause some threads Tongue Humm... did you change the end station on some vehicle? I noticed some bugs around that before and it might be one here as well.

Apo: I'm getting tired of that bug, I'll look into it as the first thing after I'm done with the map.

Mike

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #99 - Posted 2011-08-04 19:34:51 »

Alright I'm ra4king1 this time, I have read the directions and I'm on my way to beat Riven and Apo Tongue

EDIT: Oh my god this world is huge! Do you load world data by chunks from your server? When I would scroll around it would lag and freeze for a second.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #100 - Posted 2011-08-04 19:41:10 »

Alright I'm ra4king1 this time, I have read the directions and I'm on my way to beat Riven and Apo Tongue

EDIT: Oh my god this world is huge! Do you load world data by chunks from your server? When I would scroll around it would lag and freeze for a second.

I indeed load data by chunks from the server. I'll do some double buffering later so it doesn't lag/freeze.

EDIT: You can now log in using ra4king and the password from you latest account. It'll take a server app restart before other people see your buildings as ra4king but the ranking will be correct right away.

Riven: Did you change the end station on some vehicle? I noticed some bugs around that before and it might be one here as well.

Mike

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #101 - Posted 2011-08-04 19:46:36 »

Alright I'm ra4king1 this time, I have read the directions and I'm on my way to beat Riven and Apo Tongue

EDIT: Oh my god this world is huge! Do you load world data by chunks from your server? When I would scroll around it would lag and freeze for a second.

I indeed load data by chunks from the server. I'll do some double buffering later so it doesn't lag/freeze.

EDIT: You can now log in using ra4king and the password from you latest account. It'll take a server app restart before other people see your buildings as ra4king but the ranking will be correct right away.

Mike
Thanks!!

Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #102 - Posted 2011-08-04 20:10:12 »

Hmm I built a bus station, and clicked on "Buy Bus". Then my entire browser locked up, and soon after my entire computer. Somehow I was able to open the task manager. I noticed 2 instances of Java running. I killed both and everything returned to normal. Refreshing the page, it froze again but this time, I couldn't click on anything for over 5 minutes. After ages, the task manager opened again and the only instance of Java running was using 1GB of RAM on my 2GB system!! What a trip for just trying to buy a bus. Are Riven and Apo trying to discourage competition? Tongue

Offline Bonbon-Chan

JGO Coder


Medals: 12



« Reply #103 - Posted 2011-08-04 20:13:57 »

I some town there is a LOT of station. It is not really a priority but I should be nice to have an option to hide/show name of competitor stations.
Offline Apo
« Reply #104 - Posted 2011-08-04 20:19:13 »

I have only one goal: a bus station in every town. Wink
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #105 - Posted 2011-08-04 20:22:22 »

My priority is growing really big towns.

It might result in less money, but it surely will find a lot more bugs in the code persecutioncomplex

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

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #106 - Posted 2011-08-04 20:26:44 »

For the new map, I'd suggest slight changes:

a way bigger world, with towns not more or less randomly placed like on the current map, but a couple of 'hotspots' that will be the main regions to compete for.

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #107 - Posted 2011-08-04 20:28:23 »

So is all you do: create station, buy buses, assign them random station, repeat?

EDIT: Crap I'm not good at this. I built 2 stations and have bought a handful of buses. However, all of them are now at 1 station and that station isn't getting any passengers. So I'm stuck at $0 until any passenger comes T__________________T

Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #108 - Posted 2011-08-04 21:07:16 »

So is all you do: create station, buy buses, assign them random station, repeat?

EDIT: Crap I'm not good at this. I built 2 stations and have bought a handful of buses. However, all of them are now at 1 station and that station isn't getting any passengers. So I'm stuck at $0 until any passenger comes T__________________T

Yup, it's called Alpha 1.0 for a reason Tongue I've got big plans but it's going to take me some time to get it all in seeing as I've still got a full time job (and family!). The only reason I can get lots done now is thanks to being on vacation. Soon the missus will start complaining that vacation is vacation and not game programming time...

Oh, and build stations in cities Tongue

I some town there is a LOT of station. It is not really a priority but I should be nice to have an option to hide/show name of competitor stations.

I'm planning to only show the competitors station labels when zoomed in a lot, that will help with that.

For the new map, I'd suggest slight changes:

a way bigger world, with towns not more or less randomly placed like on the current map, but a couple of 'hotspots' that will be the main regions to compete for.

The cities can grow 20 squares in each direction and the closest city is now 41 squares apart, dunno if I should make so cities can grow together or make the max size smaller, I'll have to do one of them to create hotspots.

Regarding bigger maps. Currently the server takes about 500mb memory and the machine has like 2gb ram, I could double the size but that's about it (java has a max size of 1.2gb at the moment to leave some for mysql, apache and windows.


50ms to move 1000 vehicles around seems very long. Maybe the problem is in pathfinding?

Two ideas you might already have implemented:

Cache routes between A and B, until there are new/removed roads in the 'region' of the route.
Handle the parts between road intersections as 1 node with a bigger weight.

If not already implemented, that should make it at least 100 times faster.

Sometimes it takes 10ms and sometimes 80, 50 seemed like a good number Tongue

The routes aren't cached for the reason that then I'd have to check all the cached routes every time a road is built (eventually, when there are roads everywhere).

The path finding system already handles intersections and stations as nodes (instead of every single road piece). That was a pain to set up but it seems to work Smiley

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: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #109 - Posted 2011-08-04 21:12:49 »

Regarding bigger maps. Currently the server takes about 500mb memory and the machine has like 2gb ram, I could double the size but that's about it (java has a max size of 1.2gb at the moment to leave some for mysql, apache and windows.
For the heightmap (if that's the RAM eater) you can use mapped files. The OS will swap data out for you automatically.

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

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #110 - Posted 2011-08-04 21:14:07 »

Regarding bigger maps. Currently the server takes about 500mb memory and the machine has like 2gb ram, I could double the size but that's about it (java has a max size of 1.2gb at the moment to leave some for mysql, apache and windows.
For the heightmap (if that's the RAM eater) you can use mapped files. The OS will swap data out for you automatically.

It's indeed the heightmap (with two or so things on, content and owner). Mapped files? sounds interesting, I'll look at it Smiley

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #111 - Posted 2011-08-04 21:17:42 »

Well you have impressed me very much sir. However, I shall now make a new account because I have broken my current one......again T_T

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #112 - Posted 2011-08-04 21:23:31 »

1  
2  
3  
File file = new File("height.map");
FileChannel fc = new RandomAccessFile(file,"rw").getChannel();
MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_WRITE, 0, file.length());


Please note that you MUST use 'fc.force()' to sync the data to disk, 'bb.force()' is NOT enough on Windows.

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #113 - Posted 2011-08-04 21:25:41 »

Do buses go back and forth between the stations you chose automatically? Or do I need to reset a new destination once it arrives?

Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #114 - Posted 2011-08-04 21:48:12 »

They go back and fourth automatically.

How did you break it? Built a station in the middle of nowhere and ran out of money? Tongue

Riven: You're my hero, when you started talking about memory I profiled the server with a ton of land in it, and noticed that it's not my land tiles that take up the memory, but the mysql jdbc connection not streaming the data and instead storing it all in memory. I changed it to streaming and made the land 4 times as big as the live server (10 million squares). The memory footprint is now 500mb instead of 600mb like it was with a quarter the size Smiley To increase it more I need to move over to the files (sounds really neat), but I'm thinking this will be enough for now Smiley

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Apo
« Reply #115 - Posted 2011-08-04 21:58:47 »

Ok the last 5 minutes I can't find a town without an "apo"-station.

Do you think it is necessary to write "bus station" behind every bus station you have? Do you plan other stations? Subway? Tram?
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #116 - Posted 2011-08-04 22:18:45 »

They go back and fourth automatically.

How did you break it? Built a station in the middle of nowhere and ran out of money? Tongue
Yeah, I'm now using ra4king2 Tongue

Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #117 - Posted 2011-08-04 22:26:01 »

Ok the last 5 minutes I can't find a town without an "apo"-station.

Do you think it is necessary to write "bus station" behind every bus station you have? Do you plan other stations? Subway? Tram?

Working hard on the map, then you can see where you're missing stations Smiley

I'm planning boats, airplanes and trains at least (trucks too, but they'll have some built in loading docks in the place you drop off/pick things up.

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: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #118 - Posted 2011-08-04 22:30:40 »

Can I suggest scaling down the up-axis for the terrain by factor 2 or 3 ?

45 degree slopes with roads are not really that common Smiley

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

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #119 - Posted 2011-08-04 23:37:56 »

Ok the last 5 minutes I can't find a town without an "apo"-station.

Do you think it is necessary to write "bus station" behind every bus station you have? Do you plan other stations? Subway? Tram?

Working hard on the map, then you can see where you're missing stations Smiley

I'm planning boats, airplanes and trains at least (trucks too, but they'll have some built in loading docks in the place you drop off/pick things up.

Mike
Wow you're getting me very excited! I finally succeeded in making successful stations and I'm making a lot of money. This is quite a fun game! Great job and keep up the good work!!

EDIT: Noooooo the server is down T_T

Pages: 1 2 3 [4] 5 6 ... 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.

BurntPizza (21 views)
2014-09-19 03:14:18

Dwinin (35 views)
2014-09-12 09:08:26

Norakomi (62 views)
2014-09-10 13:57:51

TehJavaDev (87 views)
2014-09-10 06:39:09

Tekkerue (42 views)
2014-09-09 02:24:56

mitcheeb (65 views)
2014-09-08 06:06:29

BurntPizza (47 views)
2014-09-07 01:13:42

Longarmx (35 views)
2014-09-07 01:12:14

Longarmx (40 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19
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!