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   
Pages: 1 ... 3 4 [5] 6 7 ... 14
  ignore  |  Print  
  State of Profit  (Read 43702 times)
0 Members and 1 Guest are viewing this topic.
Offline Mike

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #120 - Posted 2011-08-05 02:15:59 »

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

I'll try and see how it looks. Mountains are really visible with the big slopes and the shadows look nice, I doubt that will be as good with lower slopes. Also, if the slopes are low it might be difficult to build bridges as they need to have really steep slopes (or they'll go through buildings once I add sky scrapers Wink)

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

Excitement sounds great Wink I'm hoping I can make enough people excited within a year so I can live on it... but that's just a dream (minecraft put the bar high!) Wink

EDIT: Noooooo the server is down T_T

Yup, somehow Riven and Apo managed to build a station on the same square and the server didn't complain about it (stupid server!) I'll look into that tomorrow.

As an extra bonus for tonight (it's after 2 am here), a map! It's still a work in progress (Doesn't move exactly right when scrolling it, can only scroll with the mouse, only zooms towards the middle and not towards the mouse cursor, it doesn't rotate with the camera, only downloads when starting the applet and it has some funky graphical effects in the corners). Bridges aren't visible but that's working as designed (or bridges might cover something important underneath).

Due to bugs around changing the end station of a vehicle once initially set that option has been removed for now

I see three not connected cities. Apo, I'm disappointed in you! Tongue

Mike

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

JGO Coder


Medals: 5



« Reply #121 - Posted 2011-08-05 02:21:21 »

hey, I love the new map, but could you label each placeon the map? cuase I it took me a few minute to find them all Tongue.

keep up the good work Smiley
Offline Mike

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #122 - Posted 2011-08-05 02:24:52 »

hey, I love the new map, but could you label each placeon the map? cuase I it took me a few minute to find them all Tongue.

keep up the good work Smiley

You read my mind (hey, get out of there!) Smiley Tomorrow your stations will be better visible and cities will be marked (with a dot when zoomed out, with text when zoomed in).

And while I'm all tired and mushy. I really, really (Oh yes, I mean really!) appreciate all the attention I've gotten from you guys. I know that it's been very buggy the first few days (still is, but slowly but surely...) and still I've received more ideas and bug reports than I'd ever hoped for. I'm really appreciative of this great community and how no one has complained about the lack of quality and instead stayed around and tried to see the potential.

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 h3ckboy

JGO Coder


Medals: 5



« Reply #123 - Posted 2011-08-05 02:28:45 »

ahh, but it is so nice in here Tongue.

can't wait. Smiley
Offline Riven
Showcase Moderator

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #124 - Posted 2011-08-05 02:42:31 »

How did you implement the serverside?

I can imagine this game being fully sql-query-driven, hardly any need for java-code for game-logic.

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

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #125 - Posted 2011-08-05 03:11:40 »

hey, I love the new map, but could you label each placeon the map? cuase I it took me a few minute to find them all Tongue.

keep up the good work Smiley

You read my mind (hey, get out of there!) Smiley Tomorrow your stations will be better visible and cities will be marked (with a dot when zoomed out, with text when zoomed in).

And while I'm all tired and mushy. I really, really (Oh yes, I mean really!) appreciate all the attention I've gotten from you guys. I know that it's been very buggy the first few days (still is, but slowly but surely...) and still I've received more ideas and bug reports than I'd ever hoped for. I'm really appreciative of this great community and how no one has complained about the lack of quality and instead stayed around and tried to see the potential.

Kind regards,
Mike
Gameplay >>>>>>>>>> Graphics

^^ Proven equation as shown by Minecraft and your game Wink

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #126 - Posted 2011-08-05 03:54:18 »

it wont log in? it gets stuck at determining what needs to be loaded.
Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #127 - Posted 2011-08-05 04:11:10 »

it wont log in? it gets stuck at determining what needs to be loaded.
He brought the server down for now.

Offline counterp

Senior Member


Medals: 11



« Reply #128 - Posted 2011-08-05 10:13:23 »

This game is pretty fun. It's not something you can play consistently for large amounts of time, but I log in every few hours to check my money and buy new buses/stations Smiley
Offline Mike

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #129 - Posted 2011-08-05 11:00:16 »

How did you implement the serverside?

I can imagine this game being fully sql-query-driven, hardly any need for java-code for game-logic.
There is way more than sql's Tongue I only use sql for storing all information when the server gets restarted (or crashes). All of the logic (mostly making sure that what the client says is the truth and handling messages between users) is in java.

it wont log in? it gets stuck at determining what needs to be loaded.
Adding streaming to every query made the database go jo-jo. I moved it around so it only uses streaming on the big loads during start up.

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 counterp

Senior Member


Medals: 11



« Reply #130 - Posted 2011-08-05 11:16:32 »

Aaaah it happend, Apo is taking advantage of all my interlinked towns and roadsystems before I even have enough money to build the first station in each one :'O
Offline Apo
« Reply #131 - Posted 2011-08-05 11:22:10 »

I can give you 5 millions ... but I search the last unconnected city ... after that "I will pimp my hometown". I think its a nice stress test for the server. Cheesy

€dit: At the moment I can't buy buses!(?)! Nothing happens!
Offline Bonbon-Chan

JGO Coder


Medals: 12



« Reply #132 - Posted 2011-08-05 11:44:58 »

Java begin to hang/freeze more and more often  Undecided

It is really great to have the map now (we finally can see how big it is !).
You are working to put our station in a different color, nice !
Map in this kind of game is really important (for me at least). It allow to display lot of statistical information. The first one i would like is the buses trajectory : to know if I have connect all town  Wink

By the way, do you deal with trafic density ? The more buses using a road, the more time it takes to use it (At first it is seems to be difficult to implement).
Offline Mike

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #133 - Posted 2011-08-05 12:30:43 »

I can give you 5 millions ... but I search the last unconnected city ... after that "I will pimp my hometown". I think its a nice stress test for the server. Cheesy

€dit: At the moment I can't buy buses!(?)! Nothing happens!

Your buses got weird names and broke your ability to buy more buses Tongue I'll have a look if there is a quick fix and otherwise I already fixed it for the next server reset. I'll probably reset the server in 2 days or so to give everyone a fighting chance Smiley

Java begin to hang/freeze more and more often  Undecided

I didn't see that before on any computer here. Do you get any kind of stack trace or similar? I'll fix a couple of reasons why that could happen in the next update.

By the way, do you deal with trafic density ? The more buses using a road, the more time it takes to use it (At first it is seems to be difficult to implement).

In the client the buses wait for each other when they stock up at an intersection, but once they can drive again they drive quicker to catch up with their schedule. The server doesn't handle any kind of traffic density at all.

Mike

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

JGO Coder


Medals: 5



« Reply #134 - Posted 2011-08-05 12:56:28 »

Hahaha, apo, I just found your drawing. Nicely done Wink
Offline Apo
« Reply #135 - Posted 2011-08-05 13:09:09 »

It wasn't my idea. It was Bonbonchans idea. But I like it. =)
Offline counterp

Senior Member


Medals: 11



« Reply #136 - Posted 2011-08-05 13:41:23 »

So I bought 2 buses at 1 station and then a 3rd bus at another station. Then when I go back to set location of first buses I notice that they are both number 17. And my 3rd bus (the last one purchased) is some really high number. In console (daww you obfuscated, good luck decoding):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
Loaded image: http://stateofprofit.com/pictures/appletlogo.png
Loaded image: http://stateofprofit.com/appletprogress.gif
High quality: true
OpenGL renderer: GeForce GT 130M/PCI/SSE2
OpenGL vendor: NVIDIA Corporation
OpenGL version: 3.3.0
VBO extension: true
java.lang.NullPointerException
   at com.stateofprofit.client.k.f.y(Unknown Source)
   at com.stateofprofit.client.k.f.processMessages(Unknown Source)
   at com.stateofprofit.client.k.b.run(Unknown Source)
java.lang.NullPointerException
   at com.stateofprofit.client.k.f.y(Unknown Source)
   at com.stateofprofit.client.k.f.processMessages(Unknown Source)
   at com.stateofprofit.client.k.b.run(Unknown Source)




I was only able to set the location of 1 of the Number 17 buses, the other apparently 'has' a location but also says it doesn't have one (look at picture) and just waits in my station.

EDIT: and suddenly everything works again Tongue
Offline Riven
Showcase Moderator

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #137 - Posted 2011-08-05 15:44:21 »

You're creating extremely long numbers, to the point where they don't fit in 64 bits.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
java.lang.NumberFormatException: For input string: "61313125513582191312551764484"
   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Long.parseLong(Unknown Source)
   at java.lang.Long.parseLong(Unknown Source)
   at com.stateofprofit.client.m.d.ah(Unknown Source)
   at com.stateofprofit.client.a.a.a(Unknown Source)
   at com.stateofprofit.client.a.a.a(Unknown Source)
   at com.stateofprofit.client.a.h.af(Unknown Source)
   at com.stateofprofit.client.o.d.a(Unknown Source)
   at com.stateofprofit.client.a.b.a(Unknown Source)
   at com.stateofprofit.client.a.g.a(Unknown Source)
   at com.stateofprofit.client.b.c.a(Unknown Source)
   at com.stateofprofit.client.b.c.run(Unknown Source)

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

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #138 - Posted 2011-08-05 16:14:10 »

Yea, I've fixed that functionality but I need to reset the world to fix the current issues (or adjust them manually in the db). I wasn't planning to reset it until I have reputation in the game but I might be forced to do it earlier. On the other hand I can now make the world 4 times as big and it would give everyone a fighting chance...

Expect a reset tonight (somewhere around 10 pm CET). I'll look at the open issues and try to fix as many as possible before the reset.

Mike

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

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #139 - Posted 2011-08-05 16:19:31 »

Why don't you let the database generate the IDs? In MySQL you can use AUTO_INCREMENT and you'll 'never' run out, especially when using BIGINT (64 bit).

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

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #140 - Posted 2011-08-05 16:23:56 »

How did you implement the serverside?

I can imagine this game being fully sql-query-driven, hardly any need for java-code for game-logic.
There is way more than sql's Tongue I only use sql for storing all information when the server gets restarted (or crashes). All of the logic (mostly making sure that what the client says is the truth and handling messages between users) is in java.
What happens on a power interruption? Would you lose everything since the time the process was started?

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

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #141 - Posted 2011-08-05 16:48:06 »

Why don't you let the database generate the IDs? In MySQL you can use AUTO_INCREMENT and you'll 'never' run out, especially when using BIGINT (64 bit).

I don't do that for the reason that I want everyone's bus to start with 1 and go upwards without having one table per person. The table with all the vehicles in it is using auto increment and the vehicles use the id when talking to the server so the server knows which vehicle is which.

What happens on a power interruption? Would you lose everything since the time the process was started?

Some things are updated constantly (owners of land, content built, vehicles bought). Some things are updated every 30 minutes and at server shutdown (normal shutdown) like money and camera positions.

Also, I'll reset the server tonight (in about 4 hours) instead of tomorrow morning, as tomorrow afternoon I won't be able to use internet very easily in case something goes wrong.

Mike

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

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #142 - Posted 2011-08-05 17:25:54 »

I'm sorry for bumping my own thread (I try to always edit the last post) but this deserved a new post.

I got a message from one of our great forum members and I thought I'd share the question and the answer.

Quote
Hi, I was reading the posts on State of Profit, and I saw something you wrote:

Quote from: Mickelukas
I doubled the rate they generate money to speed things up a bit, I'll apply it once the current people are logged out as I'll need to restart the java app on the server to apply the change. [EDIT: Applied]

Could you please tell me how to make a java app that runs all day on a server? I want to make a game where all clients send messages to a server, but I don't want the server running on my computer. Do I have to buy one? what are they called?

When I developed the game (and nowadays when I'm developing/testing) I do everything on my laptop.

Once I realized that the game idea was worth pursuing and the game was good enough to continue developing I decided to rent a server to test everything from lag to having it run 24x7 without crashing. I started looking for something cheap with quite a bit of RAM (preferably in Europe so I have a quick connection to it). I came to a big US provider that had some bad rumors in the US but the EU servers aren't as full yet, godaddy. I ended up paying something like 20 euro per month for a VPS (shared server, something like an image on a VMWare server) windows 2008r2 server (I didn't want to learn linux as well as I already was busy with learning java...) with 2gb of ram and a very nice broadband connection.

When I had the server I installed xampp to get apache, php, mysql and ftp.

To be able to run the java server constantly I used a wrapper to run the java executable jar as a windows service (starts up with windows): http://wrapper.tanukisoftware.com/. It took a couple of hours to figure out but the documentation is fine and it's not very hard once you RTFM.

As I had (have) some problems with server dead locks I currently run the server in debug mode in eclipse, but hopefully that's only temporary. The service is still on automatic though so if the server would crash/reboot the service would kick in and the game would continue.

I hope it answered the question and if anyone wants to know any more about the game and the technology please ask and I'll try to be an open book Smiley

Kind regards,
Mike

EDIT:
So I bought 2 buses at 1 station and then a 3rd bus at another station. Then when I go back to set location of first buses I notice that they are both number 17. And my 3rd bus (the last one purchased) is some really high number. In console (daww you obfuscated, good luck decoding):

Thanks for the stacktrace, fixed it Smiley

Does anyone know why my stacktrace sending to server sometimes says that the stacktrace is "0" (it mostly works though...):

1  
2  
3  
4  
5  
6  
7  
8  
9  
    public void submitError(final Throwable t) {
        final long currentTime = System.currentTimeMillis();
        if (currentTime - lastSentError > 30000) {
            lastSentError = currentTime;
            final StringWriter writer = new StringWriter(1024);
            t.printStackTrace(new PrintWriter(writer));
            sendAsyncMessage("stackTrace " + writer.toString().trim());
        }
    }

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

JGO Coder


Medals: 5



« Reply #143 - Posted 2011-08-05 18:22:26 »

hey, is there a reason that when I built a road it didnt appear on the map when I zoomed out? does it just take some time to be added?
Offline Riven
Showcase Moderator

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #144 - Posted 2011-08-05 18:38:37 »

Does anyone know why my stacktrace sending to server sometimes says that the stacktrace is "0" (it mostly works though...):

1  
2  
3  
4  
5  
6  
7  
8  
9  
    public void submitError(final Throwable t) {
        final long currentTime = System.currentTimeMillis();
        if (currentTime - lastSentError > 30000) {
            lastSentError = currentTime;
            final StringWriter writer = new StringWriter(1024);
            t.printStackTrace(new PrintWriter(writer));
            sendAsyncMessage("stackTrace " + writer.toString().trim());
        }
    }


I think this is a pretty important issue: it means there is a bug in your network-protocol. (99% sure)

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

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #145 - Posted 2011-08-05 19:02:31 »

hey, is there a reason that when I built a road it didnt appear on the map when I zoomed out? does it just take some time to be added?

The map gets created on the server once every 20 minutes, at the moment the client only gets the newest version when it starts up (It'll be changed to every 20 minutes tonight/tomorrow). Thanks for testing it Smiley

Does anyone know why my stacktrace sending to server sometimes says that the stacktrace is "0" (it mostly works though...):

1  
2  
3  
4  
5  
6  
7  
8  
9  
    public void submitError(final Throwable t) {
        final long currentTime = System.currentTimeMillis();
        if (currentTime - lastSentError > 30000) {
            lastSentError = currentTime;
            final StringWriter writer = new StringWriter(1024);
            t.printStackTrace(new PrintWriter(writer));
            sendAsyncMessage("stackTrace " + writer.toString().trim());
        }
    }


I think this is a pretty important issue: it means there is a bug in your network-protocol. (99% sure)

I dislike your answer as I have no idea how to troubleshoot that Tongue How come it sometimes work and sometimes not? There is no reason why the above function could return a "0" instead of the stacktrace?

Mike

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

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #146 - Posted 2011-08-05 19:10:03 »

I dislike your answer as I have no idea how to troubleshoot that Tongue How come it sometimes work and sometimes not? There is no reason why the above function could return a "0" instead of the stacktrace?
No.

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

JGO Ninja


Medals: 69
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #147 - Posted 2011-08-05 19:58:53 »

Humm... the word "stacktrace" and the space comes through correctly and I never saw this kind of missing information in any other call. Maybe it's the gzipping that somehow distorts it.

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

JGO Coder


Medals: 5



« Reply #148 - Posted 2011-08-05 20:05:35 »

this is just a thought, and probably for hte distant future, butthis should be a facebook app.... cuase it just seems so time-wasting that it belongs on facebook Smiley

Also on a feedback note. wheneve rI buy a new bus it says "cannot find a path' but then after a few seconds, it goes anyways?
Offline Riven
Showcase Moderator

JGO Overlord


Medals: 610
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #149 - Posted 2011-08-05 20:17:01 »

Humm... the word "stacktrace" and the space comes through correctly and I never saw this kind of missing information in any other call. Maybe it's the gzipping that somehow distorts it.
Maybe maybe maybe (maybe?) your obfuscator ruins the stacktrace?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: 1 ... 3 4 [5] 6 7 ... 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.

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!