LWJGL Forum

Programming => General Java Game Development => Topic started by: Mickelukas on July 31, 2011, 21:58:08

Title: State of Profit
Post by: Mickelukas on July 31, 2011, 21:58:08
Hi all!

Note: I've posted (almost) the same on JGO, I know that most people are on both forums, so this is for the ones hanging out here :)

I've been around here for a few years now but this is the first time I post in this section. The reason for the delay is that I did what we all advice people not to do, create an mmo as my first game. Not only is it my first java game, it's my first java experience, and first game that took more than 60 hours to write (the old record holder was a simple VB6 game).

So, without further delay, I'm proud to present the first alpha version of State of Profit! Yes, it took me 4 years (next to my full time job and family) and it's still only an alpha version...

It's something like Transport Tycoon having a baby with a random MMO, with any FarmVille kind of game as its Godfather (transportation, mmo, simplicity). I have hundreds of things that I still want to put in (ranging from soundeffects to cartels (clans), research, airplanes and much more), but I finally completed it to a stage that is, almost, bug free and that can be classified as a game.

So, please, try it out and let me know if you run into bugs or quirks or anything else.

Registration is required as it's an mmo but just type whatever for password (no email required, in fact, I don't even store it if you fill it in), all passwords are double md5'ed in the db.

Link: http://stateofprofit.com (http://stateofprofit.com)

Screenshots:
(http://stateofprofit.com/pictures/screenshots/1.png)

(http://stateofprofit.com/pictures/screenshots/2.png)

(http://stateofprofit.com/pictures/screenshots/3.png)

Kind regards,
Mike
Title: Re: State of Profit
Post by: Mickelukas on July 31, 2011, 22:01:39
And, seeing as this is the LWJGL forum after all:

Someone with a mac tested it and only got a blank screen, it did however work with input (so the display loop did run as that's where the mouse and keyboard is handled). I'm using the following initiation code, did I miss something:
canvas = new OpenGL(); //My opengl class, extending canvas
canvas.setIgnoreRepaint(true);
canvas.setFocusable(true);
canvas.requestFocus();
setLayout(new BorderLayout(), BorderLayout.CENTER);
canvas.setSize(getSize());
myApplet.add(canvas);

And in the OpenGL class:
Display.setParent(this);
Display.create();

Any help is appreciated as I don't have a Mac to test with, did anyone run into something similar?

Mike
Title: Re: State of Profit
Post by: kappa on August 01, 2011, 08:51:05
Applets are currently problematic on OS X, as of OS X Lion, Apple have moved over to Java plugin2 which breaks all applets that use OpenGL as it uses a new rendering method. The reason this happens is that plugin2 no longer embeds a Window/NSView into the browser, so there is no surface to attach an OpenGL Context to, instead plugin2 applets work by using an Core Animation Layer (essentially drawing to an offscreen image which is then drawn by the browser as part of the web page, as opposed to on top of it, this allows better integration).

LWJGL Applets work fine with Java Plugin1. OS X 10.3, Tiger 10.4 & Leopard 10.5 only run Java Plugin1 so LWJGL Applets work fine there, OS X 10.6 uses Java Plugin1 by default (although Chrome and FF4 use Java Plugin2), while OS X 10.7 Lion uses Java Plugin2 by default.

There is a way to make opengl applets work on mac with plugin2 but it requires adopting a new api provided by Apple which is pretty restrictive and a large task to implement into LWJGL (so may work in future releases of LWJGL). Have a look at the bugs section for a number of posts (including some with Apple Engineers) which explain the problem further.

A workaround which is available atm that allows LWJGL applets to work on plugin2 is to use an external window (i.e. not embedded, Display.setParent(null)), this works as it bypasses the rendering system but isn't ideal as the window floats above the web page.
Title: Re: State of Profit
Post by: Mickelukas on August 01, 2011, 09:45:39
Right, I had heard about the new way Mac was doing things but seeing as he said that he could play LWJGL 2.7.1 games I thought it was my fault ;)

I saw that you logged in, built a station and some roads but didn't spend your money, was it boring, difficult to understand or just plain stupid?  :P

Thanks for the clarification on the mac issue :)

Mike
Title: Re: State of Profit
Post by: kappa on August 01, 2011, 10:03:01
Quote from: Mickelukas on August 01, 2011, 09:45:39
I saw that you logged in, built a station and some roads but didn't spend your money, was it boring, difficult to understand or just plain stupid?  :P

oh, I was just having a quick look, I did like it, just didn't have time to play more. I fear playing these sorts of games as they suck up too much time :) (still remember spending entire nights playing Sim City 2000).
Title: Re: State of Profit
Post by: Mickelukas on August 01, 2011, 10:05:31
There is still too little to do in the game to be sucked up into it, logging in like 10 min per day is still enough :)

Thanks for the kind words.  ;D

Mike
Title: Re: State of Profit
Post by: CodeBunny on August 01, 2011, 11:39:20
This took you 60 hours? Not weeks or days, but hours?

Now I'm jealous...  ;)
Title: Re: State of Profit
Post by: Mickelukas on August 01, 2011, 12:02:51
Read it again :) It was more like 1500 or so hours :P
Title: Re: State of Profit
Post by: CodeBunny on August 01, 2011, 22:50:29
Ah, gotcha.

Nice work! :D
Title: Re: State of Profit
Post by: Mickelukas on August 02, 2011, 15:50:19
Thanks. It's the first time more than 3 people are logged in at the same time though and the first time anyone logs in with a higher ping than 10 so a lot of bugs appeared, I'm trying to squash them down quicker than they appear but sometimes it feels like a losing battle :P

Mike
Title: Re: State of Profit
Post by: Meanz on August 11, 2011, 10:13:28
I must say I am impressed, it was really fun to begin with. But after creating a few bus stations I was lost. But I do understand that it is an alpha, and again I am really impressed. And I look forward to the progress of this game. This is a game I will definately follow, since I am also a fan of transport tycoon. Keep up the good work ;)
Title: Re: State of Profit
Post by: Labrasones on August 11, 2011, 17:37:25
This is pretty cool! Works well too. One thing tho, maybe make the buses able to change end destination? If it doesn't do that already and I just coulent figure it out. Btw, I'm whatever in the game.
Title: Re: State of Profit
Post by: Mickelukas on August 12, 2011, 18:33:28
Thanks for the kind words guys :)

I've been having a big discussion about the game on JGO http://www.java-gaming.org/index.php/topic,24569.0.html (http://www.java-gaming.org/index.php/topic,24569.0.html), where I also keep a change list and so on, you're welcome to join in on the discussion :)

As you said, the game is very limiting at the moment as it's only an alpha, once most bugs are gone and it seems stable enough to play with lots of people online (almost there!) I'll work on more content :)

So you don't have to search about the change of end station: it was giving some bugs so I removed it for now, I'll add it in the near future (next week I think).

Thanks,
Mike
Title: Re: State of Profit
Post by: Mickelukas on September 10, 2011, 22:40:39
Tomorrow (Sunday) at approximately 12.00 CET Alpha version 1.2 will be brought online and the world will reset.

The changes that will be implemented during the restart is:

New:
Farms! You now get to place one free farm with two trucks when you start playing. Farms generate food and by bringing it to cities you will earn money and make the city grow quicker. For a full list of changes refer to this thread (http://stateofprofit.com/forum/index.php/topic,15.0.html#msg111).
The area used when deciding how big a share of the passengers in the city should go to your station is now highlighted when building a station
There is now a clock visible with the current time and date of the in game world. At a later stage the clock will be incorporated into the new menu. For a description about game time vs real life time see this thread (http://stateofprofit.com/forum/index.php/topic,16.0.html)

Modified:
Upgrading the speed of the buses now increase the maintenance cost with half of what it previously was
Removing stations now come under build/remove station on the statistics page
Tweaked the graphics and sizes of all buildings
You can only invest into research if you have money
Slowed the speed of the vehicles a little bit
Bus stations now has a max number of people waiting of 150 (instead of based upon number of houses in the vicinity), with research you can increase the capacity to 900. Passengers added still uses houses close as a factor
When you build a bus station there are already 50 people waiting to get money a bit quicker
Goods waiting on stations is stored in the database every 30 minutes and read back if the server needs to restart
Cities grow both based upon passengers transported to and from the city instead of only from
Cities always grow even if you don't bring anything (but really, really slowly), transport people or bring food to a city to increase the growth significantly
When the server restarts it continues at the hour where it stopped instead of restarting at the beginning of the day, making the daily statistics better
The statistics page now displays until what hour of today that it is displaying

Bugs:
Fixed a bug where old graphics cards could not always see the grass texture
Fixed a bug where vehicles were displayed as being on a station they weren't
Fixed a bug that could cause several java processes to linger around if the connection was lost
Fixed a bug that caused the vehicle to be sent to the wrong station when there were several windows on top of each other
Fixed a bug that would display your vehicles as "loading" and never leave if you stopped them last time you were logged in

For a full list of recent changes, drop in at http://stateofprofit.com/forum (http://stateofprofit.com/forum).

Happy playing! :)

Mike
Title: Re: State of Profit
Post by: Mickelukas on September 21, 2011, 22:30:45
If you had a look at the game but wonder how to play (or want to see how it looks like without having to log in) the missis made a video. The sound is a bit soft but hopefully it works for you.

http://youtube.com/user/stateofprofit (http://youtube.com/user/stateofprofit)

Kind regards,
Mike
Title: Re: State of Profit
Post by: Mickelukas on November 11, 2011, 21:12:34
A moment ago Alpha version 1.3 was brought online and the world was reset. Now is your chance to start on even ground.

The changes that were implemented during the restart was:

New:
The transition between grass and sand is now smooth
The transition between grass and snow is now smooth, with on lower parts a thin layer of snow and higher up a thick layer
Day/night cycle - The sun is going up between 06.00 and 07.00, it goes down between 21.00 and 22.00
Management research - When starting the company you can build a max of 10 buildings (farms or bus stations). Each level you research will allow you to build 10 more buildings up to a max of 100 buildings. The first upgrade is 1 point and the second one 2 points, seeing as you start with 5 points you can still expand aggressively if that's your style. It is not yet possible to see how many buildings you have built as I've no idea where to put it :)
Added a vehicle profit text to the station/farm/warehouse windows so you can see how much the vehicles using the station is making

Modified:
A city can not get more than 10 warehouses. In the future the warehouses can be upgraded to support bigger cities
Cities now needs to be have more people in them to get several of the bigger houses
Reputation takes longer to build up and is easier to loose
Lowered small station maintenance cost
Halved maintenance increase for upgrading vehicles
Halved maintenance increase per field when upgrading farms
Removed the penalty for having upgraded buses drive short distances
Lowered the city growth from food somewhat to balance out that you can have several farms
There is now a minimum price a city pays for food (it could go negative before in some extreme situations)
The max price a city pays for food (except for research) is now 9 instead of 10
The price when the city is well fed drops quicker
Farms are now 5*5 squares big instead of 5*4 to prepare for rotating the farm
The extra fields research now goes to lvl 16 instead of 11
Food filling research now increases filling with 10% instead of 8%

Bugs:
Fixed several bugs regarding shaders on ATI/Intel graphics cards
Fixed an issue where the shaders weren't applied on Intel cards
The cost for altering land did not always cost the same on the client and server
Fixed a bug where water wasn't displayed correctly on some graphics cards
Fixed a bug where city (ware)houses could be placed without a road
Sorting on cost in the station list gave the wrong order if you had some upgraded stations and some not upgraded

For a full list of recent changes, drop in at http://stateofprofit.com/forum (http://stateofprofit.com/forum).

Happy playing! :)

Mike
Title: Re: State of Profit
Post by: cornetto456 on March 24, 2012, 18:51:44
Verry nice game, like it alot!
Title: Re: State of Profit
Post by: Mickelukas on March 25, 2012, 10:50:57
Thank you! I'm currently busy with a huge update but it's taking quite long to program when I know exactly what to do as it gets quite boring without a challenge. I'll post here when the update is live and the game is reset.

Kind regards,
Mike
Title: Re: State of Profit
Post by: Mickelukas on July 23, 2012, 21:08:15
I just updated the game to 1.4 and reset the world if anyone wants to compete on an equal basis. I've made a short youtube movie of how the updates work for whoever is interested:
http://www.youtube.com/watch?v=RDW2FpxPpOw (http://www.youtube.com/watch?v=RDW2FpxPpOw)

It's running a recent nightly of LWJGL if anyone wants to test any recent updates in a "real" environment.

Mike