Java-Gaming.org    
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] 2
1  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2013-03-14 06:34:05
Ah, yes, mostly idea. It is difficult to make a game when you do not yet know what it is.  Roll Eyes
2  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2013-03-13 23:29:19
I could not find the time or inspiration to join java4k 2013 unfortunately, but at least I took a few minutes just now to upload the full source code (with Makefile and helper scripts) of this little game from 2012:
https://github.com/lifelike/4kgeneral

Playing with the "scenario designer" might be more fun than actually playing the game, but other than that there is probably not much to see in there (yet?).
3  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-11-16 21:51:44
Source code posted:
http://java4k.com/index.php?action=games&method=view&gid=400#source

It is preprocessed so it looks even weirder than the original file. For one thing all comments are missing. It was my first java4k game and many things are probably very stupid. I think I should have let proguard optimize more things instead of trying to do so much manually.

Looking at my old java4k files and scripts and just created a stub for a new game. Smiley
4  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-05-03 09:14:34
What a funny game, is it possible to see the source? Just curious how the AI is working Wink

Thanks! Yes, I intend to post the source code.

The code is a mess btw. Almost everything is built around the same flood-fill-algorithm that I just set up with different offsets into the map data array and configure for different purposes. The AI use that too, to spread out influence of different units, and from cities, then the results are added/subtracted to get a score for each hex, and find the hex with highest score. A very simple influence mapping algorithm. It can probably be made a bit better by just tweaking some constants.

I run the code through cpp (the c pre-processor) to #include bitmap data. I need to allocate some time to put together a nice(r) pre-processed version that I can post on the java4k site.

The game can also be compiled in debug-mode, which adds some debug-graphics (and printing), and also adds keyboard shortcuts to edit maps and various cheat-codes (and it runs as a stand-alone Java application, not applet). Can post that version to github if anyone is interested.
5  Games Center / 4K Game Competition - 2012 / Re: Judging panel results! on: 2012-03-26 10:45:01
Yes, documentation for my game was too sparse. I was told earlier, and then again by the judges. Will think more about that if I get something done for 2013.

It wasn't a programmer thing in this case, only that I am too familiar with the genre (also didn't think it would be a problem to figure out which unit was the engineer, thinking that the symbol would be interpreted as a bridge anyway). There wasn't really any research involved, so I can't take credit for coming up with something "clever" either.

This was a problem I had when playing some of the other games too. It's a difficult balance to make documentation that includes everything but is not so overwhelming as to scare the player away.
6  Games Center / 4K Game Competition - 2012 / Re: Judging panel results! on: 2012-03-25 22:12:42
Thanks everyone. Especially appel that rated my game so high (not that it seems to have had much effect on my average rating). Smiley  Cool

(EDIT: Of course the less positive reviews contained great feedback too.  BTW the 'm' for Engineer is the standard NATO symbol (but I also thought it looked enough like a bridge to give a hint what the unit is for) http://en.wikipedia.org/wiki/NATO_Military_Symbols_for_Land_Based_Systems#Unit_icons)
7  Games Center / 4K Game Competition - 2012 / Re: Closed! :) on: 2012-03-05 13:53:19
It goes back to each person's inner. Someone who has high taste of justice, love nature and animal (like me Tongue) will start in fair.

The rules should probably be edited to mention this fair start date if there is supposed to be one.

EDIT: Oh, Apple already confirmed there is no rule, even though I do not agree that the reason given is a good one. I think a better reason would be that we want more awesome games and that the competition is about coding small, not coding fast. Smiley

EDIT2: On the other hand I might need 10 months to recover from this before I can look at 4k code again.
8  Games Center / 4K Game Competition - 2012 / Re: Closed! :) on: 2012-03-05 13:41:50
My question wasn't if anyone would know or blame me, but if it is something we are supposed to do. Smiley Obviously I understand that it can not be enforced, but many (even most?) programming competitions still have some kind of start date, and you are supposed to not start any actual coding before that date.

Do people start WIP threads around here long before the deadline too?
9  Games Center / 4K Game Competition - 2012 / Re: Closed! :) on: 2012-03-04 23:30:29
Speaking of closing... Do I understand correctly that there is no rule given for when you can start work on an entry?
10  Games Center / 4K Game Competition - 2012 / Re: Abstract Glowy Vector Wars on: 2012-02-29 23:08:01
Wow. Impressive. Too difficult for me, but I was never good at this kind of game.
11  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-29 21:12:35
And finally I managed to win the last scenario too. Phew. Smiley
12  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-29 20:32:34
Thanks guys! Not sure what I was thinking trying to get away without making the hexes hexes, but I thought it would require a lot more code than it did. It was very simple to add too.  Roll Eyes

Showing eliminated units is a great idea, but I have only 2 free bytes and no obvious ways to free more without doing some big changes, and the deadline is a bit too close for that.
13  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-28 23:26:43
Updated! Final version (or I hope so, but please let me know if there is some really bad bug that needs last minute fixing...).

- Hexes look like hexes now.
- Re-added that engineers are twice as good as other units to attack cities.
- Removed the bonus-scenario thing.
- Added a 12th scenario. (I have almost managed to win it once. I'm sure it can be done.)
- Lots of size optimizations (including the status bar now saying "MAP" instead of "LEVEL" to save a few  bytes).
- Some minor graphics tweaks to make terrain look a bit more like it follow the hex shapes.
14  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-28 22:36:34
There was one thing that bothered me a lot beyond the gameplay... But it has been taken care of  (not uploaded yet though).  Cool



(Some anti-alias would have been nice.)
15  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-28 21:30:13
You just have to assume that the tank units are of the approximate size and quality to be about as strong as infantry units of a certain size and quality. If SU-85b vs RPGs work for you, that's fine. Smiley
16  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-28 07:20:19
I will probably remove the bonus-thing, just keep scenario 11 as it is, and then add a few more (and more difficult) scenarios at the end.
17  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-28 00:01:56
Managed to reach the bonus scenario. Several almost losses on the way.

I won bonus scenario on third attempt only to notice a bug that makes the scenario counter just update rather than saying that campaign was won. Sad Fixing tomorrow. Not likely that too many will notice it before that anyway.
18  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-27 23:24:11
OK. I will leave it as it is for now, and probably do some final changes tomorrow.
19  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-27 23:05:00
Ooops. Silly bug prevented units from crossing rivers. Fixed and new version uploaded. But not it's up to 4084 bytes. One optimization turned out to be a bit too optimistic.
20  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-27 22:54:51
OK. New version uploaded. Thanks for all the comments and support. Smiley

If it has a blue button it is the updated version. Also:

- Fixed so that a level is WON immediately when moving into the last city.

- Made units that have moved grey.

- More units on both sides on most maps. This is because with both sides attacking a lot more units are eliminated. Slightly less enemy artillery though, because they are so dangerous now.

- Bonus scenario 11 reached by winning all 10 scenarios with no loss. A bit lame perhaps? Maybe I should just add a few normal scenarios? I wanted some kind of bonus to fight for. Not that the bonus map is very special.

- Fixed old bug I had forgotten about that a unit in top left corner of map was auto-selected at beginning of each new turn.

- Scenario setup changes. Mostly just unit positions and types, not so much terrain.

- Lots of size optimizations. I have 33 bytes to spare!

Hope it is somewhat fun and not still way too easy now.
21  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-27 22:24:12
Thanks!

There will be a new version very soon. I found several ways to free up more bytes, so despite having fixed several problems and added some new features I'm down to only 4064 bytes.
22  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-27 17:39:28
The game is easy. However there're some those wrong a bit. My tank is always killed in one to one fight with foot soldier. Plus my tank never could attack in range, make it like a foot soldier.

That is some unlucky tank.

The tanks are not really stronger, but 50 % faster. Use them to rush enemy cities or go around the flanks to take out enemy artillery. It is more like reality than many computer games really in that way. Smiley

The scale is supposed to be operational, representing large areas, so multiple-hex ranges is for artillery only, not tanks.
23  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-27 17:35:39
4. Grey border means a unit has moved (or been attack... reusing the same code paths).

Now when I knew what to look for it was possible (not easy) to see. Maybe make it even more apparent (i.e. color the whole blue area grey)?


Uhm. True. Grey might work.

Another great idea. Thanks again! It is all very much appreciated! Smiley
24  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 23:42:29
Also made the move targets much easier to see. Hopefully that fixes the problem with the engineer next to the river not seeing it can move there.

Markers are not pretty, but I think being easy to see is more important.
25  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 23:41:14
Mickelukas was correct. There was a bug resulting in enemy attacks having no effect. Now they have. Not sure if it makes the game easier or more difficult. At least enemy artillery should be somewhat dangerous, so there is a good reason to try to overrun them.

Slightly tweaked the combat system so that units can only fire back once. So in addition to being easier to kill when attacked multiple times, there is no risk at all to the attacker when attacking a unit that has already been attacked.

Uploaded new version to the competition site. It's getting late here and no time for the double buffer test. Just hoping that it works for everyone. Good thing there are many days remaining before deadline.
26  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 23:20:28
I have not uploaded any new version yet, so you should still have as much flickering as there used to be.

Have no Windows 7 to test with, so I'm just adding the doublebuffering and hoping it will work for everyone. Will try to add artificial flickering by adding a delay in my paint method just to confirm that buffering removes it (ie that I implemented it correctly...) before uploading.

Got rid of some bytes by simplifying some mechanics that are not easily visible to players anyway. It is below 4096 now even with buffering, but I want to test to make sure I didn't mess up something that used to work (hm, maybe I should have written some unit tests for this game after all...).
27  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 21:50:42
Weird. I figured there is no need to keep the doublebuffer around as an instance variable, so I moved it into the paint method, but that only saved 1 lousy byte.
28  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 21:45:26
It doublebuffers. Now it looks right in Safari. Ironically though, NOW I can see flickering now and then. But not often. First time I click in the applet it flickers, and then I can get it to flicker by clicking randomly along the edges of the applet. I guess it is the browser that decides to do a redraw of the plugin area for some reason or something. But overall I guess it should remove flickering.

Problem is the jar is now 4171 bytes. Have some thinking to do.
29  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 21:37:22
Trying to free some bytes and add doublebuffring, to fix the Safari problem.
30  Games Center / 4K Game Competition - 2012 / Re: 4k General on: 2012-02-26 21:20:24
Trying to fix the flickering. I wasn't overriding update, since I wasn't seeing any flickering anyway.

Annoyingly when I override update (the standard trick calling paint(g)), and make sure to only clean the screen at the start of a new level (all other painting is being done inside of hexes or the status bar, so no need to redraw everything) it works well in my test Application, and in an applet running in Opera, and in Firefox, but when the applet runs in Safari it for somereason insists on filling the background with default gray and it looks horrible (and probably flickers too on some machines).

I don't want to doublebuffer, since that adds too much code (I have 16 free bytes now). What I might be able to do is to add dirty bits and only redraw hexes that actually changed, but I think by removing the clearing of the screen it will be very difficult to see any flickering anyway. Of course every individual hex/square is cleared to be redrawn, but they are so small I doubt too much flickering will be seen even on a very slow computer?
Pages: [1] 2
 

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