Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Games Center / 4K Game Competition - 2013 / Re: Galactic Conquest 4K - II on: 2013-02-12 02:43:59
Fun game, I think it is still difficult to tell whether or not a system is selected. I miss-ordered many of my troops to their demise Sad
2  Games Center / 4K Game Competition - 2013 / Re: Wizzy 4K on: 2013-02-12 02:38:45
Cool game! I beat all 5 levels, I wish there were more Smiley
3  Games Center / 4K Game Competition - 2013 / Re: Joe4k on: 2013-02-11 20:05:50
Not sure what you mean about the left/right  movement, could you give more detail?

General Tips

When you start out it takes multiple shots to take down a monster, so try to focus them down. If you let too many monsters spawn at the beginning they will become hard to overcome. I tend to try to jump around an eliminate a few particular guys. Once you have killed ten, you level up and the ground monsters shouldn't be any trouble.

Press Escape at any time to restart the game. Starting fresh sometimes makes the beginning easier to manage since the game begins the moment the applet loads (IE when the site loads.)
4  Games Center / 4K Game Competition - 2013 / Joe4k on: 2013-02-11 19:46:39
I've finished my first entry into Java4K 2013. I've made an action RPG, in which your skills and powers increase along with the danger of the world.  

Slightly weakened Squido and increased the power of Joe Level 7

Full leveling experience in about 5 Minutes! No Tedious Grinding
Cinematic Zoom!
4 Enemy Types!

More details and instructions on the game page

Things start out easy.

But then get a little more difficult ....

Until its too late!
5  Games Center / 4K Game Competition - 2012 / Re: Judging panel results! on: 2012-03-21 20:51:39
Thanks to all the judges! This was great fun and I can't wait till next year Smiley
6  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-25 09:50:30
If people won't move into your residential units either
The land value is too low, (Click on the purple V in the lower Left Hand Corners, if the Squares with power are red or orange they won't develop)
There is no road they can use to get to a job
There is no residential demand
There is no electricity

--- Algorithm changes
I've changed any usage of arraylists to a strict array based approach
The array has to indexes one representing the top and the other representing the bottom. This means I can reuse the structure without any object creation or garbage collection.
For Traffic I use a BFS to find the nearest job with an additional array tracking the optimal path to any given square (Dynamic Programming style.) Then after finding the job we walk back along the path array to get to the start position adjusting traffic along the way.
7  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-25 03:08:05
Good suggestion!
8  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-25 02:20:37
Power was checked based on time because I wasn't thinking straight when I implemented it Smiley

Land Value dictates whether or not a zone tile will be considered for buildup. If the land value is low, like near a power plant, no homes or comm businesses will move in. I wanted to make there be different classes of house but I'll need to find a lot more space for that.

I'm not sure I understand your point about graph algorithms. My implementation of BFS is the iterative approach which is basically identical to a 4way Flood Fill.

while (!searchList.isEmpty()) {
                        Integer currCell = searchList.get(0);
                        power[currCell] = true;
                        for (i = 0; i < 4; i++) {
                            offset = upDownLeftRight[i];
                            if (currCell + offset > 0 && buildType[currCell + offset] > TRANSMITSPOWER) {
                                if (!power[currCell+offset])) { // This used to check a list of visited cells hence the slowdown
                                   searchList.add(currCell + offset);


The traffic path-finding is basically the same as the above code but it instead of appending to the searchList we push. And it has to keep track of nodes visited.
If you can think if a better traffic approach I'd love to hear it. Especially if I can implement it quickly  Grin
9  Games Center / 4K Game Competition - 2012 / Re: Griefer 4k on: 2012-02-24 23:56:05
This game is amazing.
10  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 23:43:46
I'm going to release the source for all of my games once I clean it up so it won't be so embarrassing. We are allowed to display code post contest right?

I'll give you the gist of how the game runs as is:

The game is basically a cellular automata where every cell has a bunch of things that get computed. Since there are way too many cell to iterate over every frame the game tries to do as many rows of the map as it can prior to the nextFrameTime.

Power is handled by doing a BFS every 60 or so frames but I realize this is killing the program because of how I have it built. Long story short, a really long array list is built and I use which is causing the slow down. I built it this way originally so that I could have integer values for the amount of power in the power lines and there wasn't a clear way of knowing if the BFS had visited a node before. This was a mistake.  I'm going to fix this by switching power to being a binary thing that way I can keep the search from backtracking by simply not executing on nodes that are already on.

Traffic is calculated when someone moves in. A DFS is called along the roadway which stops if it hits max traffic at any square. All Squares visited are incremented. There is another array list here but it doesn't seem to be slowing much down. I know this isn't perfect since it can add traffic to non-driven roads but it seems to work pretty well.

Landvalue is calculated by averaging the land-value of all of the neighboring tiles with a certain bonus depending on the built structure. Powerplants give off a huge negative bonus which is why residential units won't move in there.

I wanted to program in move outs and derelict buildings and fire and a whole bunch of other stuff but I hit 4k much faster than I thought I would.

One of my real downfalls in making this was that I didn't really think out how the graphics were going to be done when I started construction. Currently every cell has a representative short in an array which tell the program which sprite to draw for that cell. When a cell needs to be changed the graphic array is sent to gNeedsUpdate which then sorts out which image to draw. This wouldn't be so bad if I had a 1 : 1 correspondence between buildingCode and graphicCodes but I don't because I failed to plan. I'm pretty sure this code could have been condensed had I thought about it a bit more.


Tonight my plans are to remove the MouseUp and Down logic that was noted by Mickelukas. I was trying to get an approximation of a click event by keeping track of when the program recieved both a mouseup and mousedown in the same frame. By changing this to operate only on mousedown I should save some bytes that might let me get the minimap in.

I'm also going to change the BFS for the power-plant so that it doesn't require the vistednode array-list.

@Archibald thanks for the Water Idea, that will be really small to implement compared to me fixing the array bounds checking since it actually happens in lots of places in the code.

Also I'll change the colors Smiley
11  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 18:25:37
I just jury rigged the game to skip traffic, so Now i'm sure its the power calculations. Its all a relic from when I had these grand plans of trying to limit the amount of power one plant could give, but that just ended up taking way too much space. I have to go to real work now but I'll try to fix this tonight.

Thanks everyone for your support!
12  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 18:12:10
Blargh. You found me out, to save some bytes I was a little fast and loose on the edge of map calculations. I'll see if i can put in some failsafes that don't cost to much memory. As for the other slowdown ... Huh I have 4 days left right Smiley 
13  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 17:43:52
Oh I see. That Residential zone is in a poor land value zone due to the proximity to the industrial region and the Power Plant. People won't move in when the land value starts getting orange~red. If you click on the overlay you'll see that the residential zone you placed is almost in pure red. Too move people in that close to industry you have to start by building a little further away and then inch you way closer and closer as the newly built houses will increase nearby land value.
14  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 17:29:16
Are you sure you have a road reaching enough industry tiles? If a road borders an industry tile it only has access to jobs two deep. A road needs to be run on both sides of the zone to allow access to all of the tiles.


Can you detail the problem with a picture?
15  Games Center / 4K Game Competition - 2012 / Re: City4k on: 2012-02-24 17:04:40
Thanks for all the feedback!
I've changed the game around a bit so it should be a bit easier and run a little faster.

Unfortunately i'm pushing up against 4k really hard now so there isn't really room for a Minimap. I also had bulldoze in the game before but again 4k is maybe just a little too small for a full featured Simcity. Imagine that there is a very vocal group of activists in the town who insist on preserving everything.

I think the traffic detection loop may be causing slowdowns, if someone can post a screenshot with a really slow game that would be a big help.

I didn't really want power to flow through unbuilt zones but if that would be useful I can add it.

Thanks again and try V2!
16  Games Center / 4K Game Competition - 2012 / City4k on: 2012-02-24 07:22:59
I love city building games and wanted to see if I could fit one in 4k. So all of you simcity fans have at it. Let me know about any balancing issues you might have and I'll try to make some quick updates.

Roads are cheaper
Time till next payday is displayed as a white bar
3 Icons per row!

Sped up traffic and power algorithms!
Better color coordination!

For an easy start make sure that your first residential units are at least ~7 squares away from the power-plant. My basic start is Check out your land value overlay for more info.
17  Games Center / 4K Game Competition - 2012 / Re: 4Khords on: 2012-02-11 16:29:41
The game does loop upon completion so that you can have fun all over again.
18  Games Center / 4K Game Competition - 2012 / Re: 4Khords on: 2012-02-11 07:46:37
Sorry StephR I had to make it get hard fast since I was running out of space for Levels. There are only 10~ levels total. You can beat them all if you believe in yourself! I actually thought of flattening my arrays that hold the level data and grabbing some more bytes ... but I have another game Idea I want to finish for this competition. I actually made an android version of this game but my day job (bioinformatics grad student) has been keeping me from finishing it up.
19  Games Center / 4K Game Competition - 2012 / 4Khords on: 2012-02-11 06:32:31
4Khords asks you to create beautiful music with the majestic silver power orb. Unfortunately and evil wizard has made it so that only a specific pattern of colors will make beautiful music! Only the pure of heart can see what this pattern may be in the upper left hand corner of the world. Follow the pattern, make the music, BE A CHAMPION.

EDIT: Now with a button to magically advance the levels! (Press A to Skip the Current Level)

It Makes Noise!

Pages: [1]

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 (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
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

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20 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‑
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!