Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (172)
games submitted by our members
Games in WIP (659)
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 ... 33
1  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-31 10:30:30
The world is divided into a 100x100 grid, with each cell representing 100m x 100m. During an update an entity can only interact with its own cell and the neighboring cells. This means that logic updates can be done in parallel as long as each cell being updated is separate from other cells being updated concurrently by two intervening cells in all directions.

All entities have a list of behaviors. They get their behavior list from their current career. Each career has exit careers (so a warrior could become a champion or a berserker). When a character satisfies the various entry requirements and enters a new career, their set of behaviors changes.

Behaviors have a planning component and and an execution component. The planning component is more expensive but is run less frequently, while the execution component is executed each logic tick. The execution logic depends on whether the behavior is the current highest priority behavior. for example, if a woodcutter is chopping wood and is attacked by a bear, fighting has a higher priority, while crafting has a lower priority. In the implementation of crafting, no work is done if crafting is not the top priority.

Other behaviors get executed even when they are not top priority. For example, HungryBehavior increments its needToEat counter each logic tick regardless of what the character is doing.

Behaviors communicate with each other by setting shared properties on the character. For example, the woodcutter's crafting behavior can only be executed when the character is adjacent to a woodpile, so if the character is not near a woodpile, the behavior sets its priority to -1 (cannot execute) but adds the nearest woodpile to entity.movement.desirables map (the other component of the map entry is the priority of the desirable). The GoToBehavior monitors this collection and if it is not empty tries to move to the desirable with the highest priority. (more accurately, in the planning phase, GoToBehavior selects the highest priority desirable as the target, and sets the behavior priority to the desirable priority).

Likewise if a behavior needs an item from the inventory and the item is absent, the item is added to the inventory.wishlist collection. And this collection is monitored by other activities such as PickUpBehavor.

As I've learned, debugging this stuff is a nightmare and I am just writing mountains of test code at the moment. Smiley

By the way, some behaviors are not from the career. I am thinking about adding personality behaviors, like GreedyBehavior or LazyBehavior to make the characters more unique.
2  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-29 17:08:59
Just a little update, I've been working on the AI code for the past weeks. It's going well but slowly.
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-27 17:47:06
To be fair, a debugger would have caught that one pretty quick... Smiley
4  Discussions / Miscellaneous Topics / Re: Hello, people. on: 2015-08-27 00:19:16
I happen to be up late trying to fix an intermittent ConcurrentModificationException... I am a teetotaller, so no whisky for me :-)

Old threads get locked, so there is no possiblity to necro a really old thread. Not sure i agree with that - this is not really a social forum so topics don't really become stale.
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-25 22:40:32
Finally completed a full economic cycle. Entities search for resources to harvest, move to the resources, harvest the resources, select a manufacturing process (checking available tools, skills and materials), produce sellable product, select a marketplace, transport goods to market, and collect payment, then return to harvesting spot to continue producing their product. And it is all done in generic, pluggable logic.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-23 16:26:25
@theagentd, how many cells and how many entities are being handled?

In Vangard, got logic millis down from 25ms to 16ms (unrelated to the above discussion).
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-21 10:23:08
Got some joined-up thinking from my woodcutters, so GoToBehavior, ConsumeResourceBehavior, CraftBehavior and PickUpBehavior all worked together as expected. Just got to add a DropOffBehavior to drop off the wood-based merchandise at the market.
8  Games Center / WIP games, tools & toy projects / Re: Exiled Kingdoms -Android RPG- Now with video! on: 2015-08-21 05:12:39
It's a shame to fix bugs like these Smiley
9  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-20 10:22:48
I'd like to use JOML for 2D transformations, to get away from the rather naive calculations I do with trig functions... My maths is rather spotty, so is there, or will there be, a JOML For Dummies tutorial?
10  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-20 10:11:01
I'm inching forward... I had to rewrite a bunch of core Behaviors so they could play nice with each other. I also implemented psychic powers into my player sprite so that it can see into the heart and soul of the nearest human. Useful for debugging!

In other news logic millis have crept over 22ms so there is a red light on my project dashboard. Render millis are only at 1-10ms (depending on zoom) so no worries there. I should be able to bring the upper bound of rendering down to sub-5ms when I get round to implementing LOD.
11  Games Center / Contests / Re: [Idea] Would anyone be interested in a Pure Java game jam? on: 2015-08-19 22:21:08
Good point opiop.
12  Games Center / Contests / Re: [Idea] Would anyone be interested in a Pure Java game jam? on: 2015-08-19 10:15:34
Could be fun. As a transferable, useful skill, JavaFX is certainly useful to have on your CV. And low-level graphics hacking should never be the main focus of game development. There are more important things to focus on, like playability, creativity and originality.
13  Games Center / WIP games, tools & toy projects / Re: TinyChess on: 2015-08-18 16:49:10
Yes, I do provide weights based on the relative value of the pieces. I can see I could easily add the rules you suggest. It would be interesting if the new AI would beat the old one reliably.

By the way, unless you mean something else, my algo already considers control - in the form of total number of moves available to each player.

I'm held back by the horrible user interface code and all the other projects I'm commited to. Also I try out each possible move by making a deep copy of the whole board which is really crazy.

Castling will be so simple to add, it wouldn't require any changes to the AI logic...
14  Games Center / WIP games, tools & toy projects / Re: TinyChess on: 2015-08-18 10:30:36
Thanks for the feedback! Castling and en passant are not implemented - adding them would be simple, but I never got round to it. I would need to fix the board display bug first I think.

I like how TinyChess can make seemingly reasonable moves when all it does is count up for each possible move:

+ how many distinct moves you can make
+ how many pieces are defending each of your pieces
+ how many enemies you threaten
+ surviving friendly pieces
- how many moves your enemy can make
- how many pieces are defending the enemy pieces
- how many of your pieces are threatened
- surviving enemy pieces
15  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-17 16:40:31
I did consider going that route, but I decided to aim for the "pure" implementation first, and only add in the approximations needed to achieve reasonable performance. I think the more approximations you add, the more closed-off the game becomes.

I do have shortcuts galore however. The social structure is hard coded, ecosystems respawn as a steady state, economics are a "managed" free market and so on.
16  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-17 10:38:51
Thanks! I'm very proud of my trees, I'm definitely breaking new ground in computer graphics with them Smiley
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-17 10:30:51
Added more behaviors to my library of behaviors. Added the notion of behaviors yielding to other behaviors, and "voting" for other behaviors. Made behaviors "sticky" so entities are more likely to finish what they started.

Added a wishlist concept to the inventory, so if a behavior tries to execute with an item that is absent from the inventory, the missing item is added to the wishlist with the priority of the activity. Then the "acquire" behaviors can read the wishlist and act accordingly.
18  Discussions / General Discussions / Re: Oracle working on an AOT compiler for Java on: 2015-08-15 00:22:04
Stopped listening at "commercial feature".
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-14 21:12:20
@Lunch: got undo-redo working in my vector graphics drawing package. Implemented colors on polygons.
20  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-14 10:22:51
Thanks! I'm going through a rough patch with the code at the moment, with some complex issues that are difficult to debug at midnight (the only time I get to work on the game). I'm working towards a working village economy and then I will put up a tech demo.

The goal is to keep the graphics simple and vector based. At the moment the game includes 0 textures and I plan to keep it that way. In my lunch breaks at work i am building a vector graphics editor to speed up the graphical side of things.
21  Discussions / Jobs and Resumes / Re: Hayden Davenport - Video Game Composer for Hire on: 2015-08-13 10:16:01
The links seem to be fixed now. Smiley
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-12 22:05:58
Waded neck-deep into a swamp of mysterious slowdowns and outright crashes. Simple configuration changes of innocuous timers leads to application death.

On the bright side: fixed one of the slowdowns, and I found a smoking gun I will investigate tonight.

On the other bright side: made good progress on my super-simple 2D vector graphics tool, so the teenagers of my family can contribute models and animations.

Also: I made movement logic better, and built out NPC behaviors.

The slowdown and crash is from a leak in the broad phase collision grid. Objects were being added multiple times to the same cell. Still not certain how my logic goes wrong, so I left a logging statement in to remind to do a proper fix sometime. In the meantime, I added in a HashSet. Duct tape makes the world go round Smiley
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-12 10:22:09
Waded neck-deep into a swamp of mysterious slowdowns and outright crashes. Simple configuration changes of innocuous timers leads to application death.

On the bright side: fixed one of the slowdowns, and I found a smoking gun I will investigate tonight.

On the other bright side: made good progress on my super-simple 2D vector graphics tool, so the teenagers of my family can contribute models and animations.

Also: I made movement logic better, and built out NPC behaviors.
24  Games Center / WIP games, tools & toy projects / Re: Exiled Kingdoms -Android RPG- Now with video! on: 2015-08-11 10:58:48
-Added the option to backup/restore your saved games to an external archive. You can now move your games between different devices.

Games should be stored "in the cloud" or you will get branching/versioning issues with your saved games... Smiley
25  Games Center / Showcase / Re: Little War: Shatter of Serenity on: 2015-08-10 10:14:22
"Little War: Serenity Shattered" would be more grammatically correct.

26  Games Center / WIP games, tools & toy projects / Re: Final Fantasy based game - Angel's Destiny on: 2015-08-10 10:11:12
What I mean is: you need to include an image in your first post. It is required for the image reel of WIP projects shown on the home page of JGO.
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-08 16:40:57
Added the concept of ownership, so that a woodcutter can for example claim a tree for themselves, and a wolf can remember which deer it was chasing. I also implemented sharing, so wolves can team up on deer. And woodcutters know to leave each other's trees alone.

@BurntPizza... vvvv ... Intersection types sound amazing, but I can't think of a single real use Smiley
28  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-07 23:19:23
Thanks! I've got a long way to go...
29  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2015-08-07 10:58:46
I will upload a video tonight hopefully.

I am making nice progress with the village social structure, although it is a bit like boiling the ocean. It all breaks down into small parts though. At the moment I am defining the basic careers/roles people can follow, like beggar, laborer, peasant, woodcutter, hunter, smith, builder, farmer or chieftain (and how they can move between these roles). Then I have to define the behaviors that go with the roles, like Beg, or GatherWood, SellAtMarket... and then, theoretically, everything works!

I'm using my own markup language for the data files, because the parser is just one class and it's a shame to waste my code! If I need to, I can convert it all to YAML easily.
30  Games Center / WIP games, tools & toy projects / Re: Final Fantasy based game - Angel's Destiny on: 2015-08-07 10:24:53
Screen captures?
Pages: [1] 2 3 ... 33
 
afikri (12 views)
2015-08-31 09:30:22

afikri (19 views)
2015-08-31 09:30:07

afikri (9 views)
2015-08-31 09:27:24

afikri (13 views)
2015-08-31 09:26:40

Roquen (16 views)
2015-08-29 11:30:54

GamerC4 (30 views)
2015-08-22 20:38:50

GamerC4 (26 views)
2015-08-22 20:37:18

GamerC4 (30 views)
2015-08-22 20:37:01

Kefwar (39 views)
2015-08-22 18:07:24

GamerC4 (26 views)
2015-08-22 01:00:24
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37: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!