kappa
|
 |
«
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.
|
|
|
|
Mike
|
 |
«
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  ). 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...  Mike
|
|
|
|
Riven
|
 |
«
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!
|
|
Mike
|
 |
«
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
|
|
|
|
Riven
|
 |
«
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!
|
|
|
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. =(
|
|
|
|
Riven
|
 |
«
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... 
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings!
|
|
|
ra4king
|
 |
«
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 
|
|
|
|
Mike
|
 |
«
Reply #98 - Posted
2011-08-04 19:24:06 » |
|
Create another account and I'll rename it  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  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
|
|
|
|
ra4king
|
 |
«
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  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!
|
|
Mike
|
 |
«
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  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
|
|
|
|
ra4king
|
 |
«
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  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!!
|
|
|
|
ra4king
|
 |
«
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? 
|
|
|
|
Bonbon-Chan
|
 |
«
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.
|
|
|
|
Apo
|
 |
«
Reply #104 - Posted
2011-08-04 20:19:13 » |
|
I have only one goal: a bus station in every town. 
|
|
|
|
Riven
|
 |
«
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 
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings!
|
|
|
Riven
|
 |
«
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!
|
|
|
ra4king
|
 |
«
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
|
|
|
|
Mike
|
 |
«
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  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  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  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  Mike
|
|
|
|
Riven
|
 |
«
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!
|
|
|
Mike
|
 |
«
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 
|
|
|
|
ra4king
|
 |
«
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
|
|
|
|
Riven
|
 |
«
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!
|
|
|
ra4king
|
 |
«
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?
|
|
|
|
Mike
|
 |
«
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?  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  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 
|
|
|
|
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?
|
|
|
|
ra4king
|
 |
«
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?  Yeah, I'm now using ra4king2 
|
|
|
|
Mike
|
 |
«
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  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
|
|
|
|
Riven
|
 |
«
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 
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings!
|
|
|
ra4king
|
 |
«
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  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
|
|
|
|
|