Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (775)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 9
  ignore  |  Print  
  Vangard  (Read 165070 times)
0 Members and 1 Guest are viewing this topic.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Posted 2015-07-07 21:08:34 »

I love Icelandic sagas, so I thought I would make a Norse world sim: Vangard. I am trying to avoid getting bogged down with graphics, so everything is very simple vector graphics now.

The idea of the game is that the player entity is a peer of other game entities, so all entities have the same advancement opportunities and so on. The player entity is just a blip in the world. I basically hate those RPGs where the NPCs just stand about waiting for you to interact with them. They should get a life!

The main focus has been getting the game logic fast enough. I am now handling 37,000 entities in 14ms so that is fast enough to move onto adding more content. That is, 14ms on an AMD A10 laptop APU.

Here are some screen captures of some red and black boxes chasing a brown box, and then another showing the view zoomed out to minimum zoom. Vector graphics woo!





EDIT: I started this thread 9 months ago, so it's about time I put up a demo.

https://bitbucket.org/aclarke/headline-distribution/downloads/vangard.jar

In this version:

 - A ton of user interface work, including repository views, minimap, powerbars now have rollover text, I use multiple fonts, market trading, stashing at house, collecting from unowned entities

 - numerous stability fixes and resolution of multithreading issues

 - many new AI behaviors like CombatBehavior, ForagingBehavior, DoRecipeBehavior...

Controls:

 - to change game speed [ and ]

 - to zoom in and out: - and +

 - to switch between stats, combat, inventory, minimap, social and debug UIs, mouseover the runes at top left.

 - put player character on autopilot (AI takes over): Shift-A

 - to switch player control to a neighboring entity (you can only switch to entities that can move): Shift-S

 - to view an accessible inventory (e.g. market, home or apple tree): collide with the entity, this opens a right hand view showing the inventory of the neighboring entity

 - to stash at home: go to hovel, open the player inventory view and click the items to drop in the home, likewise click on the right to pick up the items again

 - to collect apples: walk to apple tree, and click the apples you want to collect.

 - same interaction at the market except you can get money from putting items in the market and pay (more) to get them out.

Offline Jesse

JGO Coder


Medals: 23



« Reply #1 - Posted 2015-07-07 21:18:54 »

Looks interesting! (And that's an impressive number of entities...)
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #2 - Posted 2015-07-07 22:25:05 »

Thanks! To be accurate, not all the entities do a lot yet and I may have a lot of work keeping performance up as I add new content.

The fully zoomed out view is showing about 4% of the world. I may need to make the world somewhat larger.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #3 - Posted 2015-07-13 19:42:50 »

I couldn't resist adding what I will loosely describe as eye-candy: I added some animated vector graphics smoke to my hovel chimneys.

Like all graphics it took me ages to get it acceptable and I promise to stay away from messing with graphics for at least the next two weeks. (When I will be staying on a farm with no computer). Smiley



At least I have a simple animation framework now.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #4 - Posted 2015-07-14 00:14:57 »

I can't stop, I must do graphics! I added the day/night cycle and unsynched the animations, so it doesn't look like the smokestacks in villages are doing synchronized swimming any more.

I tried to download a video recorder to share the awesomeness with youtube, but it crashed on install (BSR Screen Recorder). Any suggestions for a video recorder?

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 486
Exp: 7 years



« Reply #5 - Posted 2015-07-14 00:16:56 »

OBS seems to be the standard these days.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #6 - Posted 2015-07-14 00:24:55 »

Getting errors when trying to intall the DirectX components required for the video recorder Sad

EDIT: OBS installed after installing some DirectX Runtime thingy.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #7 - Posted 2015-07-28 10:16:24 »

Been away from a computer for a while, but I'm back and have made some updates. I added mouse events and a GUI system that at the moment consists of nothing but text boxes. In my screen grabs you can already see a GUI, but that was hardcoded in graphics library-dependent code. As the game is graphics library-independent I had to move all the logic up a level and out of the renderer.

EDIT: A day later and I have clickable buttons and a sort of low-rent radio group thing.

Haven't got round to making that video yet...

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #8 - Posted 2015-07-29 22:49:21 »

I've started roughing out the user interface. I have three tabs set up so far.

1. The stats view (here be the attributes and skills):



2. The combat view, where you select your weapons, general strategy, and special orders... note the unique "Beg for Mercy" option!



3. The inventory view. This hero clearly roams the Viking wastelands collecting randomized octagons... can never have enough!



Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #9 - Posted 2015-07-30 15:18:33 »

In other news I increased the world size to 100 square kilometers, 4 times larger.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline J3698
« Reply #10 - Posted 2015-08-05 20:14:10 »

Anywhere we can download or watch it?? Looks good!
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #11 - Posted 2015-08-05 20:27:00 »

Thanks! It's getting there. I want a simple village social system working then I will put up a demo.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #12 - Posted 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.

Offline bornander
« Reply #13 - Posted 2015-08-07 11:31:58 »

The player entity is just a blip in the world. I basically hate those RPGs where the NPCs just stand about waiting for you to interact with them. They should get a life!
That is an ambitious target but one well worth aiming for. Looking forward to following the updates on this one!

Try my Android games: Grapple | Hovercraft | Lala
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #14 - Posted 2015-08-07 23:19:23 »

Thanks! I've got a long way to go...

Offline meanhugh

Junior Newbie


Exp: 4 years



« Reply #15 - Posted 2015-08-14 09:25:58 »

I too am looking forward to upcoming updates and added features of this game. The graphics are looking good - you should definitely try keeping them simplistic!
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #16 - Posted 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.

Offline ulixava
« Reply #17 - Posted 2015-08-14 17:07:29 »

I'm really liking the whole "entities-get-a-life" thing. Looking forward to seeing progress!
Offline Sheph

Junior Newbie


Medals: 1
Exp: 7 years



« Reply #18 - Posted 2015-08-16 22:33:01 »

I have been throwing that idea around in my head for a while (that of the non-player entities being on equal footing with the player). It's neat to see someone trying to implement that for real. Looking forward to any progress you care to share with us. I dig the trees, by the way. Cheers!
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #19 - Posted 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

Offline DavidBVal
« Reply #20 - Posted 2015-08-17 11:06:24 »

The idea of the game is that the player entity is a peer of other game entities, so all entities have the same advancement opportunities and so on. The player entity is just a blip in the world. I basically hate those RPGs where the NPCs just stand about waiting for you to interact with them. They should get a life!

Yes, that's a very nice perspective. I considered many times how I would implement something like that, because obviously it takes a huge amount of processing to have a whole world running by itself, with AIs loose around doing as they wish.

My solution, and one I will one day implement (Maybe Exiled Kingdoms II Cheesy ) is to run detailed and real advancement in the areas currently around the player, but only applying a statistical/simplified evolution over the whole world.

Example: you divide the world in blocks, similarly to minecfraft. It can look seamless to the player, of course. In the sector where the player is, game entities actually are updated and have their AIs active, and do as they wish. Level up, steal from neighbor, build a castle, etc. but on the other sector, you make them remain inactive, and only when player visit, you apply a "statistical evolution". For instance, depending on conditions or circumstances, you make some die, some level up, some cities conquered... it's like if the world freezes when player leaves, then you can fast-forward when he returns. Instead of polling all gameentities individually, you apply some formulas to see what happened. If you've played dwarf fortress, and see how it builds/makes the world evolve over eras, that's more or less what I mean.

I know it kind of spoils the "purity" of your idea, but when you make things very complex/big, it can be the only way.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #21 - Posted 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.

Offline DavidBVal
« Reply #22 - Posted 2015-08-17 18:47:05 »

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.

That's the right approach, be ambitious! Compromise only when you must Wink

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #23 - Posted 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.

Offline J0
« Reply #24 - Posted 2015-08-20 10:38:33 »

You'll end up needing at least one texture, I guarantee it! Wink
Other than that, your project does seem very interesting, waiting for you to finish a playable demo so we can wander the Viking lands for ourselves Grin

J0

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #25 - Posted 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.

Offline SwampChicken
« Reply #26 - Posted 2015-08-31 09:05:33 »

Woah. This little project interests me greatly. I totally understand if your not intending to release the source (ie: you're making it into a game?), but can you provide some insight as to how you:

a) generate/track/control the entities? (and how they interact with each other?)

b) your behaviour implementation? Are they given out to each entity at random? Or do entities learn/grow them over time?
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #27 - Posted 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.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #28 - Posted 2015-09-03 10:58:29 »

The other thing I am working on is asset creation. I have built a simple editor that lets me create assemblies of polygons, which I can move, rotate, scale and color. I just added code to export the models to file, so now I can start building assets more quickly. Here's an example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
poly : 1
   r : 0.5723464273901672
   g : 0.515528580632166
   b : 0.9967328958884494
   a : 0.2365929697795081
   xPoints : 1.0, 2.921875, 1.234375, -1.96875, -3.375, -1.59375
   yPoints : -3.046875, -0.0625, 2.875, 2.765625, 0.0, -2.890625
   z : 0.0
poly : 2
   r : 0.18566339556255373
   g : 0.3657983597922627
   b : 0.1454039127869604
   a : 0.4126357919159338
   xPoints : -0.140625, 0.90625, 3.90625, 0.953125, 0.125, -0.59375, -3.65625, -0.84375
   yPoints : -3.75, -0.6875, 0.0, 0.40625, 3.546875, 0.953125, 0.609375, -0.65625
   z : 0.0


Just got to add the ability to define animations in the editor and then it is pretty much done Smiley

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #29 - Posted 2015-09-04 10:30:18 »

My brain is a bit fried with debugging the AI logic, so I am focusing on easier parts for now like asset creation (utilities), LOD, Gender, Naming, Frills, and so on. It all needs to get done. This weekend I will have a code blitz and try to add two more career types.

I have a unique problem. Although the simulation runs fine, with the entities selecting what to do and getting on with it, I find it harder to see how to map this back to a human control. The logic has to be something like this:

1. Player right-clicks on an oak tree.
2. Player iterates their behaviors asking which can do something with an oak tree. (e.g. invokes plan with a Vicinity collection only including the right-clicked item).
3. The player has a HarvestResourceBehavior that can chop down trees, so that gets executed.

But what if the player has several behaviors that can process the tree? For example, they might be able to chop it down, or talk to it, or enchant it. Do I pop up a context menu? Obviously I have to hide the context menu at times, like in the middle of a battle: "Do you want to talk to the troll charging you? Or maybe pick its pockets?"

Pages: [1] 2 3 ... 9
  ignore  |  Print  
 
 

 
hadezbladez (45 views)
2018-11-16 13:46:03

hadezbladez (50 views)
2018-11-16 13:41:33

hadezbladez (29 views)
2018-11-16 13:35:35

hadezbladez (20 views)
2018-11-16 13:32:03

EgonOlsen (1900 views)
2018-06-10 19:43:48

EgonOlsen (1936 views)
2018-06-10 19:43:44

EgonOlsen (1286 views)
2018-06-10 19:43:20

DesertCoockie (1718 views)
2018-05-13 18:23:11

nelsongames (1412 views)
2018-04-24 18:15:36

nelsongames (2043 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!