Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
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 ... 14
  ignore  |  Print  
  State of Profit  (Read 49818 times)
0 Members and 1 Guest are viewing this topic.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 835
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #30 - Posted 2011-08-01 21:19:20 »

There are indeed many weird bugs.

Often the terrain is not loaded correctly, leaving rectangular holes in the ground.

I just bought a bus while I had 21k. After I bought it, I had 1k left, and no bus.

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #31 - Posted 2011-08-01 21:27:29 »

That isn't too logical just because it's a low end computer, the only thing that should happen there is the land being downloaded from the server, I'll have a look on the server later if I see something.

Mike

May be it is a communication problem (firewall) ?
Do you use a specific port ?
Even so, the communication should fail, do you report an error there in the consol ?


Nothing to do with the PC. I got the samething on the 2 PC now.

I had a very clear error for it in the server log, fixed it and will apply it shortly, thanks for finding it Smiley

Mike

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #32 - Posted 2011-08-01 21:30:44 »

There are indeed many weird bugs.

Often the terrain is not loaded correctly, leaving rectangular holes in the ground.

I just bought a bus while I had 21k. After I bought it, I had 1k left, and no bus.

The terrain not loading correctly is something I've been busy with for a long time but it's connected with so many things (streaming the original and changing containers from the server, calculating shadows, building up the VBOs containing landscape, infrastructure and buildings) that it's tricky to get it exactly right.

The bus thing was reported before so I'll look at that part of the code. I don't see any error message about it at the server (or client) so I'll just have to go through the code and see what it can be. EDIT: I think I found the error that causes it (the only client error I cannot figure out) so I added some extra logging around there that will clear it all up the next time it happens Smiley

Oh, and don't worry if you make less money now, I decreased the money generated seeing as people were making a million per day, but instead I increased the city growth speed with 5 times so more happens on that front Smiley

Kind regards,
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 Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #33 - Posted 2011-08-02 11:41:06 »

The server is offline for a while, I'm fixing some bugs and troubleshooting some login issues.

EDIT: It seems quite unstable at the moment, will have a look at it tonight.

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 #34 - Posted 2011-08-02 12:16:09 »

Now it works with the PC with Intel card  Grin
Same problem with the water when zoom out.

As a feature to add (I think you plan it at some point), be able to rotate the view : for some tunels, it is hard to say if it land at the right place (hidden by the ground).
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #35 - Posted 2011-08-02 15:34:47 »

Thanks for the info with the older computer, for some reason older integrated cards are moving the water level when zoomed out (it's as if it gets less precise where it puts the coordinates...)

Hold down both mousebuttons to rotate the view (or use home and end), it rotates around the point where the cursor is at Smiley

Mike

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #36 - Posted 2011-08-02 15:56:31 »

Often the terrain is not loaded correctly, leaving rectangular holes in the ground.

I fixed one terrain load issue and reproduced another one on an older laptop of mine so I'll investigate that too soon. At least the server seems to be more stable now after the last patch.

It's a big difference between 3 simultaneous players in a lan and 10 over the Internet Smiley

It's depressing to fix bugs so let's add the list with stations first 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: 835
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #37 - Posted 2011-08-02 16:03:57 »

I don't know whether this is a bug or a feature, but I saw a bus stopped on a road, rendered dark red.

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

JGO Coder


Medals: 12



« Reply #38 - Posted 2011-08-02 16:17:35 »

Hold down both mousebuttons to rotate the view (or use home and end), it rotates around the point where the cursor is at Smiley
It is more common to use middle mouse button.

23 buses... my empire is on the go  Grin
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #39 - Posted 2011-08-02 17:36:43 »

Good idea, I'll add so both works (for people without a middle mouse button).

I don't know whether this is a bug or a feature, but I saw a bus stopped on a road, rendered dark red.

Stopped? It's only supposed to stop if it comes to an intersection and it needs to wait on another bus (or if it enters a station). You still get your money though as the server doesn't actually "drive" with the cars and only checks if it arrived based upon the time it should take to drive.

I'll have a look in the error list Wink

Almost done with the station list! Smiley

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 Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #40 - Posted 2011-08-02 18:58:31 »

There is now a list with all of your stations and you can go to them by clicking on them (no more losing stations!). If you teleport to a station that's far away you might need to wait a few seconds before you can see the land.

As a side effect I found an issue that can cause the containers not to show and fixed it too.

A list with the vehicles is up next, might even come today Smiley

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 #41 - Posted 2011-08-02 19:57:06 »

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  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
High quality: true
OpenGL renderer: GeForce 8800 GT/PCI/SSE2
OpenGL vendor: NVIDIA Corporation
OpenGL version: 3.3.0
VBO extension: true
java.lang.NoClassDefFoundError: org/lwjgl/util/glu/GLU
   at com.stateofprofit.client.f.f.cc(Unknown Source)
   at com.stateofprofit.client.f.f.init(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.util.glu.GLU
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 4 more
java.lang.NoClassDefFoundError: org/lwjgl/util/glu/GLU
   at com.stateofprofit.client.f.a.aq(Unknown Source)
   at com.stateofprofit.client.f.f.loop(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.util.glu.GLU
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 4 more
java.lang.NoClassDefFoundError: org/lwjgl/util/glu/GLU
   at com.stateofprofit.client.d.e.a(Unknown Source)
   at com.stateofprofit.client.f.f.ar(Unknown Source)
   at com.stateofprofit.client.f.f.bY(Unknown Source)
   at com.stateofprofit.client.f.f.loop(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.util.glu.GLU
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 6 more
java.lang.NoClassDefFoundError: org/lwjgl/util/glu/GLU
   at com.stateofprofit.client.f.a.aq(Unknown Source)
   at com.stateofprofit.client.f.f.loop(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
java.lang.NullPointerException
   at com.stateofprofit.client.f.f.bY(Unknown Source)
   at com.stateofprofit.client.f.f.loop(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
java.lang.NoClassDefFoundError: org/lwjgl/util/glu/GLU
   at com.stateofprofit.client.f.a.aq(Unknown Source)
   at com.stateofprofit.client.f.f.loop(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
java.lang.NullPointerException
   at com.stateofprofit.client.f.f.bY(Unknown Source)
   at com.stateofprofit.client.f.f.loop(Unknown Source)
   at com.stateofprofit.client.f.f.execute(Unknown Source)
   at com.stateofprofit.client.a.run(Unknown Source)
...


 Undecided

Seems that there is a problem with the GLU library.
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #42 - Posted 2011-08-02 20:54:51 »

Humm... it works on two computers here... Maybe remove the downloaded files and redownload the client? I doubt you downloaded it exactly when I uploaded the new version, but I don't see another reason why it used to work and doesn't anymore.

If you're on windows it's stored somewhere around C:\Users\[Username]\AppData\Local\Temp\lwjglcache\stateofprofit.com

The last update seems to have reduced the number of passengers to nearly zero. Nearly all buses are stuck at the stations.

Reproduced it (has to do with moving far away from the station and then close again). Will fix it after I'm done with the goto vehicles. [EDIT] Fixed

As a request, the first thing to do Wink :
- a window with the list of building of our company
- a window with the list of buses of our company
- when a building/buses "name" is clicked, the view is centered on it

The mini map is only second on it for me.

Your wish is my command, off to look at the mini map and whatever bugs you guys find (best testers ever! Smiley)

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 #43 - Posted 2011-08-03 06:47:27 »

Fetching landscape stuck at 50% on both PC. No error.
Offline Apo
« Reply #44 - Posted 2011-08-03 08:12:54 »

Fetching landscape stuck at 50% on both PC. No error.

Here too. =(
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #45 - Posted 2011-08-03 09:57:23 »

Fetching landscape stuck at 50% on both PC. No error.

It was a deadlock on the server caused by a person logging out when a message was sent about a vehicle update. Fixed it and made sure it won't happen again, also fixed a bug that would stop a person from logging in when the previous session didn't get closed correctly.

Mike

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

Senior Devvie


Medals: 11



« Reply #46 - Posted 2011-08-03 10:14:20 »

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #47 - Posted 2011-08-03 10:29:49 »

Thanks, I think I'll install eclipse on the server so I can run the server in debug mode, running into way too many server issues that don't log and that I can't reproduce...

Mike

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

Senior Devvie


Medals: 11



« Reply #48 - Posted 2011-08-03 10:34:25 »

And suddenly it works again Tongue
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 835
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #49 - Posted 2011-08-03 10:34:48 »

Did you detach the I/O threads from the logic?

It's way easier to get a stable server if all logic runs in 1 thread.

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #50 - Posted 2011-08-03 10:40:13 »

And suddenly it works again Tongue

I restarted the java server Smiley

Did you detach the I/O threads from the logic?

It's way easier to get a stable server if all logic runs in 1 thread.

I'm running old style IO, when a person logs in two threads get created, one for listening and one for sending. When the listening one gets a message it performs the logic on it and goes back to listening. To be able to support many players I don't have a queue with the incoming messages that pick them all up in a single thread. I've been considering it as it'd save me a lot of synchronize blocks, but I'm not sure what it'll do to timely answers when many people connect. Thoughts?

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

Senior Devvie


Medals: 11



« Reply #51 - Posted 2011-08-03 10:42:23 »

I'm running old style IO, when a person logs in two threads get created, one for listening and one for sending. When the listening one gets a message it performs the logic on it and goes back to listening. To be able to support many players I don't have a queue with the incoming messages that pick them all up in a single thread. I've been considering it as it'd save me a lot of synchronize blocks, but I'm not sure what it'll do to timely answers when many people connect. Thoughts?

If you're going for the thread-per-client approach, you only need 1 thread per client Tongue the thread should both read and write to and from server. Once something is read, you can respond right away.
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #52 - Posted 2011-08-03 10:46:06 »

I had that first but seeing as I also send messages without it being replies (vehicle left station, city growth, someone built something where you're looking and so on) I need two threads or a slow connection from one client might block other people from getting the messages timely.

Mike

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

Senior Devvie


Medals: 11



« Reply #53 - Posted 2011-08-03 10:53:41 »

I had that first but seeing as I also send messages without it being replies (vehicle left station, city growth, someone built something where you're looking and so on) I need two threads or a slow connection from one client might block other people from getting the messages timely.

Mike

How would one slow connection affect other people receiving timely messages, and how would two threads solve this problem? Could you elaborate more?
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 835
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #54 - Posted 2011-08-03 10:55:23 »

Did you detach the I/O threads from the logic?

It's way easier to get a stable server if all logic runs in 1 thread.

I'm running old style IO, when a person logs in two threads get created, one for listening and one for sending. When the listening one gets a message it performs the logic on it and goes back to listening. To be able to support many players I don't have a queue with the incoming messages that pick them all up in a single thread. I've been considering it as it'd save me a lot of synchronize blocks, but I'm not sure what it'll do to timely answers when many people connect. Thoughts?

You should really use queues to detach the I/O from the logic. It will most likely solve a lot of bugs you cannot reproduce locally.

The problem is that is exponentially harder to make a multithreaded solution than it is to make a singlethreaded solution work.

Use basic structures like the ArrayBlockingQueue for extreme performance, but I doubt you need anything better than java.util.Vector.

Even better is that once you moved the logic from the I/O threads, you can get away with tiny thread-stacksizes (like 64K instead of the default 1MB). This allows you to scale the amount of concurrent players with factor 16 (if RAM is your bottleneck).

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #55 - Posted 2011-08-03 11:04:07 »

How would one slow connection affect other people receiving timely messages, and how would two threads solve this problem? Could you elaborate more?

Isn't send (not using NIO) blocking until the recipient has recieved the data?

You should really use queues to detach the I/O from the logic. It will most likely solve a lot of bugs you cannot reproduce locally.

The problem is that is exponentially harder to make a multithreaded solution than it is to make a singlethreaded solution work.

Use basic structures like the ArrayBlockingQueue for extreme performance, but I doubt you need anything better than java.util.Vector.

Even better is that once you moved the logic from the I/O threads, you can get away with tiny thread-stacksizes (like 64K instead of the default 1MB). This allows you to scale the amount of concurrent players with factor 16 (if RAM is your bottleneck).

Thanks for the clarification, I'll switch over to that (shouldn't be too hard).

ArrayBlockingQueue looks amazing, too bad I didn't know about that before I wrote my own using ArrayList!

The server is now running in eclipse debug mode, I warn thee server bugs!

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


Hand over your head.


« Reply #56 - Posted 2011-08-03 11:08:37 »

ArrayBlockingQueue looks amazing, too bad I didn't know about that before I wrote my own using ArrayList!

ArrayList is easily synchronized using:
1  
mySyncList = java.util.Collections.synchronizedList(myArrayList)

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

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #57 - Posted 2011-08-03 11:12:16 »

That looks way neater than my synchronize blocks Wink

This forum is the best btw, it's so nice to not only have people that share the interest in games, but that also can come with (very) constructive ideas and solutions based upon the deepest part of the technologies used!

Mike

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

Senior Devvie


Medals: 11



« Reply #58 - Posted 2011-08-03 11:12:42 »

It blocks until the operation finishes, but since it's all multi-threaded anyways, one blocking thread shouldn't affect another?

EDIT: Oh do you think that write operations block so long that read operations will be delayed greatly?
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #59 - Posted 2011-08-03 11:17:13 »

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

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Pages: 1 [2] 3 4 ... 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.

trollwarrior1 (29 views)
2014-11-22 12:13:56

xFryIx (71 views)
2014-11-13 12:34:49

digdugdiggy (50 views)
2014-11-12 21:11:50

digdugdiggy (44 views)
2014-11-12 21:10:15

digdugdiggy (38 views)
2014-11-12 21:09:33

kovacsa (62 views)
2014-11-07 19:57:14

TehJavaDev (67 views)
2014-11-03 22:04:50

BurntPizza (64 views)
2014-11-03 18:54:52

moogie (80 views)
2014-11-03 06:22:04

CopyableCougar4 (79 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!