Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (732)
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 3 ... 47
1  Games Center / WIP games, tools & toy projects / Re: TreeML markup language on: 2016-05-26 19:09:11
I always tip my hat to people writing parsers by hand. Smiley

BTW: Here is a working JavaCC grammar for your language, which accepts your example file:

One thing to note: It creates a standard Map that contains the keys and the values are simple Strings or Integers or Maps themselves. In the case of multiple values for the same key, the Map then contains an ArrayList under that key containing the values.

It's an official, for-real markup language when it has two different parsers written by two different people! Smiley
2  Games Center / WIP games, tools & toy projects / Re: TreeML markup language on: 2016-05-26 16:35:49
Tabs are dreadful if they are mixed with spaces for indentation.

I opted for tabs because 1 tab means 1 level of indentation. The mapping of spaces to indentation is arbitrary.

I use spaces for everything else though. Had to set up an exception in IntelliJ for treeml...
3  Games Center / WIP games, tools & toy projects / TreeML markup language on: 2016-05-26 10:48:20
I posted this under shared code a while ago, but I have been using this for real stuff for around a year now, so I decided to make it a real project.

TreeML is a YAML-like, JSON-like structured document language. It parses tab-indented files into trees of nodes. It supports lists, integers, floats, booleans, strings, tokens and explicit nulls.

How does it differ from YAML? It has a LOT less features and and the parser is one class. It also uses tabs and and doesn't support arbitrary indentation levels.

How does it differ from JSON? It uses indentation for nesting, and doesn't force you to use quotes around string tokens. It also allows repeated keys in maps (which, by extension, are not maps).

Some notes about TreeML best practices:

1. Don't use it for operating a nuclear facility.

2. It may or may not work. So far it seems to work for me.

WIP posts need a picture, so here is a picture of the Christmas Tree Nebula:

It's not my picture, credit goes to:

I have decided I need a schema language to keep my huge Vangard asset files sane, so I'm working an adding ultra-lightweight schema support.


The Gist contains a sample file and the parser.
4  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-05-26 10:28:52
I'd be forced to read them.
5  Discussions / General Discussions / Re: Interesting proposals: Java 9 and beyond on: 2016-05-26 10:09:46
I really really really miss operator overloads

I really really really don't.
6  Discussions / General Discussions / Re: RSS feeds for JGO still broken since October 2015 on: 2016-05-25 10:13:58
Broken since October 2015...

Apparently 1 complaint in that time...

Simple fix: remove unused feature.
7  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-05-19 10:54:29
Currently all animals and plants are hard-coded, so I am working on a new loader to import the creature definitions from a file. I do find when I move part of the application out of hard-coding into an asset file, code quality and ags1 productivity both shoot up. I need a limited set of animals:

Predators: Bears, wolves, foxes, snakes
Herbivores: Deer, rabbits, wild boars
Birds: Eagles, owls, crows, doves, ducks
Trees: oaks, apples, pines, yews
Personal animals: Dogs, mules, horses, cats
Livestock: Cows, sheeps, chickens, pigs

I am tempted to add mammoths (they went extinct in Midgard, but perhaps they live on in Vangard)? They would just be a very large antisocial cow with a trample attack Smiley

Also, the villages need children who are just nonfunctional decorations. They could be defined as animals too Smiley

On the subject of minigames, I would also like to add brawling/wrestling which was a popular activity at fairs, and also gambling on the outcome of wrestling matches (a minigame in a minigame?).
8  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-05-15 15:25:13
Thanks for the encouragement! I like minigames too, partly because they are an authentic part of the world, but also it lets me write other kinds of games while working on a project that will take years.

I'm apologizing not for spending time on tafl but because it's widening the scope further on a project with already pretty unrealistic goals.

Herjan, regarding the radial menu I have not implemented all your suggestions yet. For example it is two clicks to open the menu and then select an action, so I need to add in your neat suggestion to either execute the default, or drag to select the desired option. another issue is the entities are pretty small so it can be fiddly clicking them, particularly at high game speed.

J0, the icon is a dagger, not a sword - but a sword would look better and more chunky like the other icons, so i'll make the change. A dagger can point down, but a sword should point up.

I should have a new demo up by the end of the month. I want it to include complete combat (currently only ranged combat is implemented) and domesticated beasts. I want the village beggar to have a dog, and travelling traders need a mule to carry their merchandise. I might go all out and eventually give the peasants sheep, pigs and cows.

To make combat worthwhile, I might add these monsters to the game (otherwise you can only whack civilians):

I had to work on the buying and selling logic and it seems to have added 10% to logic frame times so I need to work on performance. My rough benchmark is that my AMD A10 laptop has to maintain 50 logic frames per second on battery, and I've edged over that now.
9  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-13 10:32:52
I'm currently just naively doing dozens of playouts to victory per position and give a score to each possible move based on the victory (victory in 10 moves gets a high score, victory in a hundred moves gets a low score, anything over 150 moves is a draw, etc etc). The AI does get better in proportion to the number of playouts, but even with a crazy number of playouts I find the AI does not play smart. I'm going to try another AI where I only play out a couple of dozen moves into the future but in cases where the game is still unresolved, I would evaluate the board position based on:

 + number of squares that have a path to a corner
 + number of moves the king has
 + king has path to corner
 + number of defenders
 - number of attackers

Weights for the various factors can be derived genetically.

This will let me radically increase the number of playouts while still identifying the imminent victories.

Fishbreath, is this the AWS server for the competition?
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-13 10:17:26
I increased the number of recipes a smith can execute in Vangard. This bankrupted all the smiths as they made a scatter of different implements but under the default selling rules they would not sell singletons. So a simple addition to my recipe and item lists resulted in a need to do a major rewrite of my buying/selling code!

The same problem was affecting my bakers, so now the long-standing village pie shortages should come to an end Smiley
11  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-05-12 21:43:11
Here is the popup menu in action:

12  Discussions / Miscellaneous Topics / Re: 4D shooter? on: 2016-05-11 20:16:10
Hope you get somewhere interesting with your project.

What? This is a project already? It was a more of a pipedream-class idea.

But I have started writing a simple n-dimensional maze generator. A simple first step to the full madness of nDFPS would be a little maze explorer.
13  Discussions / Miscellaneous Topics / 4D shooter? on: 2016-05-10 21:20:55
I've had a fantasy for a while to write a 4D shooter - it would have the usual WASD controls, but two keys, say ZX, would move you in the fourth dimension. The game would of course only render a 3D slice of the 4D level.

Level design would be a challenge, I think the levels would have to be built procedurally as it would just make a human brain bleed.

You would be able to walk into an empty room and then translate in the fourth dimension to encounter some creatures. Or get shot out of nowhere. You could have a button to flip the axes being rendered...
14  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-05-09 10:52:26
I have been a bit distracted by a side project to build a hnefatafl AI, putatively for a game-in-a-game mode where you can play tafl with other Vangardians for wagers or renown. It doesn't all have to be about fighting... Smiley

But I do continue to work on Vangard itself. I took some steps to simplify the code by removing the concept of quality levels on items (actually, the code is all still there, but everything has a quality of 0 for now). The logic of buying, selling and inventory management was too troublesome for the AIs in cases where they had to take care of quality issues too.

With quality out of the picture a number of tricky bugs have been neutralized (of course, they are still there). I've got plenty of bugs to fix, so suppressing a few for the time being can only help.

I have added move-to-mouse click, eliminating the slow sprite rotation issue, and I also have a pop-up radial context menu working.

The number of item types and recipes in the game has been expanded as well.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-08 11:12:04
Added more items and recipes to Vangard.

PS: Writing a hnefatafl AI is hard!
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-05 18:52:16
Typed up my GM notes for my Dragon Warriors party's journey through the lands of Duke Wann.
17  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-05-04 21:44:05
Well, my dwarves and elves are tinkering away on my hnefatafl automaton, and we have a (1) fast AI that prunes but does not do playouts and (2) an MCTS AI. The MCTS AI uses the fast AI for the playouts. I have been seeing how increasing the number of playouts improves the results for the MCTS AI, and I see a clear progression. Here the MCTS is playing defenders and the fast AI is attacking. In each iteration I double the number of playouts per position.

dwins = number of games won by defender : average turns to win
awins = number of games won by attacker : average turns to win
draws = games that went over 250 turns without a winner

2 playouts for defender: dwins=10:100, awins=6:107, draws=4
4 playouts for defender: dwins=15:66, awins=3:103, draws=2
8 playouts for defender: dwins=19:60, awins=1:87, draws=0
16 playouts for defender: dwins=19:40, awins=1:39, draws=0
32 playouts for defender: dwins=18:31, awins=0:0, draws=2

EDIT: I did the reverse case of playing attackers, which is a harder problem to compute:

2 playouts for attacker: dwins=5:524, awins=12:150, draws=23, time=1192668
4 playouts for attacker: dwins=9:1100, awins=18:125, draws=13, time=1877313
8 playouts for attacker: dwins=0:0, awins=37:111, draws=3, time=2911840
16 playouts for attacker: dwins=0:0, awins=40:80, draws=0, time=4858704
32 playouts for attacker: dwins=0:0, awins=40:67, draws=0, time=8562867
64 playouts for attacker: dwins=0:0, awins=40:62, draws=0, time=17018320

It seems like attackers hit a wall....

18  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-02 16:02:42
I was thinking you could change the move command from:



a3-a1 1000

Where 1000 is the ms to wait for a better move from the AI. If the current overtime would expire, play this move rather than expiring the overtime.

Otherwise millisecond mismatches (quite possible with comms by stdin and stdout) can cause an AI to run out of its overtimes.
19  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-02 11:12:25
I don't see mention of how many seconds I will have per turn. I don't care about overtimes or other fancy rules, I just want to know how many seconds I have per turn.

In this interaction:

Received: hello
Sent: rules dim:11 name:Computer_Fetlar atkf:y tfr:w start:/3ttttt3/5t5/11/t4T4t/t3TTT3t/tt1TTKTT1tt/t3TTT3t/t4T4t/11/5t5/3ttttt3/
Sent: clock 202798 200000 15 4 4
Sent: play attackers

... I'm not sure what the clock command is telling me, probably because I don't understand how competition clocks work.

Also time is not very meaningful for a computer without a benchmark of performance. Do you have any benchmark numbers for the AWS instance you will use?

I'm a bit paranoid about time, so I'm concerned my AI might send a command late. Is there any possibility to send a preliminary move and then send refinements until the clock runs out for that move?

Can I make my AI networked so that it can offload MCTS playouts to a set of client computers? I guess that's not allowed for AI v AI competition, but would it be allowed for the possible exhibition match against a strong player?
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-02 07:15:16
I've flown in one of those.... very nice!
21  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-01 20:45:07
Both my sides got game now! I'm getting defender AI and attacker AI winning randomly.
22  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-04-29 10:52:56
@Fishbreath, can you extend your protocol description with a an ordered list of examples? Starting with the literal hello and rule setup, followed by a couple of moves and a resignation or victory claim? Then I can use your ordered list of examples as a test of my protocol implementation (with the test players mocked to return the responses mentioned in your example). In fact a few "recordings" of games delivered as XML/JSON covering all the edge cases would greatly simplify integration with OpenTafl.

You also mention the need for an ini file. Can you provide a template?

What happens when an AI gives an illegal move? Does OpenTafl validate the moves, and if it does, what happens?
23  Discussions / Miscellaneous Topics / Re: Unsolicited blank CD in post - huhh? on: 2016-04-29 05:06:17
No update, it's just one of those mysteries.
24  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-04-27 20:41:50
I have something resembling intelligence:

  | a b c d e f g h i j k
 1| H - - X X X X X - - #
 2| - - - - - X - - - - X
 3| - - - - - - - - - - -
 4| - - - - - X O - - O -
 5| X O - X - - - - - - -
 6| X X - O O T O O - - X
 7| X - - - O O O - - X -
 8| X - - - - O - - - - X
 9| - - - - - - - - - X -
10| - - - - - X - - - - -
11| # - X - X X X X - - #

King home? true
Last move: c1-a1
Killed pieces: 1
Enter move (eg: e1-c1:
Victory at move: 16

I was playing defenders, and I had to think a little. The computer curently has a strategy of preferring moves that restrict king freedom, but the AI does not look ahead to future moves yet.

Also, I have a minor bug in my move generator, where pieces are unable to cross an empty throne (the throne is in the middle of the board, only the king can "sit" there, but other pieces should be able to move through the square if it is empty).
25  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-04-27 13:07:20
Shall we post alphas of our AIs on this thread?
26  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-26 16:27:05
Fishbreath, how do I integrate with OpenTafl? I don't see instructions on your site. I'd like to see a minimal AI Java implementation to bootstrap my effort.

Also, what resources is OpenTafl providing me - can it give me board state and available moves info, or do I have figure out this in my own AI (so every AI might have different ideas about what a legal move is).

Also, it might be worthwhile to post your competition in the competitions board on JGO, rather than burying mention of it in my thread
27  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-26 10:09:44
I'm at the point at which I can start teaching the AI to play well. As I don't know how best to prune the tree, I think I will use genetic algorithms to discover a pruning function.

I downloaded some Tablut games for Android, and I think I can do better. Anyways, I will definitely enter Fishbreath's competition.
28  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-26 06:58:58
I disagree, "modernized" carries with it the sense that whatever it replaced was outdated and that's simply not possible in an abstract game.
29  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-04-24 14:30:58
Thanks for the feedback!

I have not put any real effort into player-world interctivity (aka playability) as my time has been chewed up by AI. So after you have collected a few apples there is not much to do. I have shifted focus away from AI now to the user interface and adding in hopefully fun elements, so by the end of the year there may be more of a game here.

Regarding finding home, I will add a popup menu item for that.
30  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-23 15:35:02
Re Thud!

Thud! is similar to Hnefatafl but is not actually a member of the tafl family (See because the manner of capture has been modernized and the game involves no king piece.

This statement has been bugging me for a week. Hnefatafl, tablut etc are abstract games. There is no possible meaning to the statement that Thud has "modernized" the manner of capture.
Pages: [1] 2 3 ... 47
Hydroque (10 views)
2016-05-26 14:45:46

Mac70 (36 views)
2016-05-24 21:16:33

theagentd (42 views)
2016-05-14 18:38:35

theagentd (73 views)
2016-05-10 22:37:41

theagentd (79 views)
2016-05-10 22:33:46

IanParcs (110 views)
2016-04-18 14:18:53

KaiHH (104 views)
2016-04-18 08:35:41

KaiHH (130 views)
2016-04-15 12:43:58

theagentd (133 views)
2016-04-14 02:16:17

theagentd (157 views)
2016-04-14 02:15:43
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50 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!