Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411424 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 08:02:04 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsApanga
Pages: [1]
Print
Author Topic: Apanga  (Read 2229 times)
gaarlicbread
Level 0
**



View Profile WWW
« on: October 08, 2015, 03:51:56 PM »

"Apanga title"

Apanga is an open world that lives, grows, and evolves independently of our own. I’m building a game that will let us visit that world.



Vision and gameplay
The vision is to construct a rich world full of procedurally generated land, interesting characters, and deep history. The non-story mechanics are Minecraft-inspired; I hope players will be able to enjoy building, exploring, and sharing game experiences with friends with these mechanics. The story mechanics will be more RPG-like.

The primary challenge will be generating storylines that are unique to each player, genuinely interesting, and still unpredictable after a lot of gameplay. The world is online and shared, with land ownership used to avoid griefing and to give each player a large safe zone if they enjoy playing solo.



Art style
The current style is intentionally blocky and pixelated. I want to mix something like a 16-bit feel with a surprising depth of world. I have very little experience as an artist. I hope the artwork will improve either as I get more experience, or better yet that I begin working with someone better at it.

Code and progress
I’m currently working alone, building everything basically from scratch in C and Lua. It’s a cross-platform game that runs on windows and mac. The server runs on ubuntu. Basic land editing is working, and two very basic types of enemies exist in the game. The land generation algorithm currently produces three biome types - forest, desert, and mountains. I plan to work for a while on enemy AI and fighting mechanics, and then move on to story generation and simulation.

Links
Logged
gaarlicbread
Level 0
**



View Profile WWW
« Reply #1 on: October 20, 2015, 11:58:59 AM »

Apanga devlog #1

Dynamic navigation meshes in large-voxel worlds

How do you design character behavior that can intelligently move from point A to point B on your map?



This is an old question for games - even pac-man had to solve it in 1980 - but solving it in a player-editable voxel world like Minecraft is relatively new.

There are existing approaches that could probably be applied to the large voxel setting. For example, the paper a navigation mesh for dynamic environments describes a navigation mesh that can be changed on the fly with the environment. But the data structures appear more complicated, and to use more computational effort to update with every change.

For Apanga, however, I want to implement something that involves little work within a single render cycle. I'd also like something that can work well with uneven terrain, different creature sizes, and is conceptually simple.

The approach I came up with works like this:
  • Build a grid based directed graph with nodes representing places a creature can stand and edges representing allowed creature movement. An edge may be left out because of a wall that blocks movement or a cliff that would harm the creature to walk off, as examples.
  • When a creature wants to move from point A to B, start with an A* search on this grid. This gives us a list of adjacent nodes starting at A, ending at B, and of minimal distance in the graph.
  • Modify the path by trying to replace subpaths with shortcuts that leave out some of the intermediate nodes. For example:




  • Whenever a block is added or subtracted, the only needed update is the graph structure locally around that block. It's a quick and easy change.


When a possible shortcut is considered by this algorithm, it checks that the shortcut doesn't hit any obstacles by running a ray marching algorithm in the grid to confirm that all the relevant graph edges exist. Basically, a shortcut is invalid only when some graph edge along the shortcut is missing.

Here's an example of what a grid-based path looks like directly out of A* and after adding shortcuts:



Both paths are actually grid-based in that all the turning points of the path are on the grid - in the image, the grid points are the center points of the squares - but the shortcut version allows for diagonals, so the path looks more natural.

A Löve-based open source interactive demo of this algorithm is available here. And if you're really curious about how that was built, I live streamed the entire process of making it.
Logged
flipswitchx
Level 3
***



View Profile WWW
« Reply #2 on: October 21, 2015, 05:05:43 AM »

The story simulation aspect is very interesting. A friend recently showed me a similar 2d game where the land is randomly generated at start and then there is a period of something like 500 'years' of history of the world that happens before the player takes control. Where titans battled and tribes settled into location, Just something to think about.

There was another project I saw recently with a similar self-creating story-driven goal. It's sort of the holy grail of game design. I imagine NPC's will have a variety of random attributes upon their creation that produce balanced societies, but occasionally creates an NPC with too much courage or curiosity so they become adventurers. The mind lights up with ideas. Good luck I think your goal is an admirable one! Hand Thumbs Up Left
Logged

gaarlicbread
Level 0
**



View Profile WWW
« Reply #3 on: October 22, 2015, 11:23:05 AM »

The story simulation aspect is very interesting. A friend recently showed me a similar 2d game where the land is randomly generated at start and then there is a period of something like 500 'years' of history of the world that happens before the player takes control. Where titans battled and tribes settled into location, Just something to think about.

Maybe you're thinking about Dwarf Fortress? If yes, awesome game, and one of the main inspirations for Apanga. I do hope to have a detailed and interesting past that makes the present conflicts of the player make sense.

There was another project I saw recently with a similar self-creating story-driven goal. It's sort of the holy grail of game design. I imagine NPC's will have a variety of random attributes upon their creation that produce balanced societies, but occasionally creates an NPC with too much courage or curiosity so they become adventurers. The mind lights up with ideas. Good luck I think your goal is an admirable one! Hand Thumbs Up Left

Thanks! I'd be interested in checking out any other generated-story indie games, if you happen to remember the name.

As another point of reference, like many people, I love the Game of Thrones storyline and world. What would it feel like to be a normal person living in that world? What if you started as a normal person, and were slowly able to gain influence until you could change the path of history in your world? Many games already do this, but they do it in a human-scripted way with a small number of roles or outcomes. I'm hoping that by generating the story, I can give the player much more freedom within the story, while still pushing the resulting path toward something interesting. Ideally, the game will be in a single centralized world for all players, so that any influence you have feels more real as all players could see the change you've effected.
Logged
Mixer
Level 1
*


I've never really known what to put here.


View Profile WWW
« Reply #4 on: November 06, 2015, 10:18:11 PM »

This looks cool. I used to play minecraft, and I loved being able to protect land with factions. You could make cannons that shot through walls, and then you could get through their buildings and steal stuff. That was awesome fun.

Have you thought about how this will be different to minecraft? There are a lot of avenues that minecraft didn't really go down, and you could. Things like native support for faction raiding, clans, (supported) modding, etc etc.

Good work, it looks like a solid foundation  Coffee
Logged

My twitter is @5Mixer.
I'm currently making a dungeon game, check it out :D
https://forums.tigsource.com/index.php?topic=59139.0
gaarlicbread
Level 0
**



View Profile WWW
« Reply #5 on: November 06, 2015, 11:10:36 PM »

Have you thought about how this will be different to minecraft? There are a lot of avenues that minecraft didn't really go down, and you could. Things like native support for faction raiding, clans, (supported) modding, etc etc.

Good work, it looks like a solid foundation  Coffee

Thanks!

Versus Minecraft, I hope to make the game world much more full of history and ongoing storylines. Honestly, it's not aimed at faction style gameplay. As far as friends playing together, I want to support that but more about players-versus-world than players-vs-players. So a group of players could work together to build an awesome building, a technically challenging bridge, or to defeat a particularly hard enemy.

The plan is to include land ownership, but I'm trying to design the game mechanics so that you can't be griefed or raided if you don't want to. Basically I don't want random players to feel like threats so that the focus is on in-game challenges / quests.  Wizard
Logged
gaarlicbread
Level 0
**



View Profile WWW
« Reply #6 on: November 07, 2015, 12:36:55 AM »

Apanga devlog #2

Path-finding bunnies

I've been integrating path-finding into Apanga. The smartest enemy is currently a bunny that can now chase you around turns or up/down complicated paths.

The first step was to dynamically create a navigation graph as land is loaded into memory. Here's a debug visualization of a local subgraph of this data around the player:



Check out how the graph climbs those stairs. Nice.

Building this graph was just the first step. So that an enemy can follow you, it needs to know when you're visible and it needs to find a short path through the graph to get to you. The visibility algorithm is essentially ray-marching through block space, and the search algorithm is based on ideas from the Apanga devlog #1.

I also more formally set up enemy behavior as a state machine with triggers to switch between states. The bunny class now switches between the wandering and chasing states based on player visibility. I plan to add an attacking state where the bunny can actually inflict harm on the player.

Here's a demo of the path-finding in action:



The current paths are all strictly grid-based, so the bunny turns at weird 90 degree angles along the way. I plan to smooth that path out in the future.

I also plan to support another graph variant aimed at the navigation of larger creatures - specifically player-sized creatures. The graphs are different since small creatures can move through smaller spaces.

Big-picture thoughts

This is the first significant step toward intelligent non-player creatures. One question that has come up with Apanga is: How is this different from Minecraft? Two thoughts in reply:
  • Minecraft defined a new genre. Copying is boring, but being in-genre is fine.
  • Apanga is a world with its own story, character, and quests.


I honestly think Minecraft is so good - along with some predecessors like Dwarf Fortress that helped inspire it - that they have opened a new arena of game design. To be clear, what defines "the Minecraft genre" to me is being an editable large voxel world. Crafting, modding, and procedural generation are all major components as well, but I see them as less critical.

There will be many games that look like Minecraft. Many will be boring because they're just copies or don't add enough to be fun. Just like any genre of any media, the genre is a setting, and what counts is what you put in it.

What Apanga puts into the game world is a set of characters that you can connect with. I want the characters to have simulated emotions, relationships, goals, desires, and histories. When you help them on a quest, I want the characters to change and feel different. Their emotional levels will adjust, how they feel about you will adjust, what they want will change. Games have been working in this AI direction for a while now, and I hope to contribute some original ideas that exceed players' expectations.
Logged
Mixer
Level 1
*


I've never really known what to put here.


View Profile WWW
« Reply #7 on: November 09, 2015, 02:11:41 AM »

ooh stories.

interesting. good luck.
Logged

My twitter is @5Mixer.
I'm currently making a dungeon game, check it out :D
https://forums.tigsource.com/index.php?topic=59139.0
flipswitchx
Level 3
***



View Profile WWW
« Reply #8 on: November 09, 2015, 12:44:11 PM »

Ah yes I was thinking of dwarf fortress. What you described after that reminds me of EVE online where the players have shaped the history of the universe and the developers try not to interfere. If you haven't read up about that game I would suggest it. The thing with EVE online though, is that the conflicts come from between the players. I don't think EVE actually has enemies. Therefore of course the people would fight.

If you made a game like eve where there are resources to be gained but also terrifying enemies to be survived, the players might choose to cooperate more than fight. I think the key would be to making survival kind of hard by yourself (at least at first, before solid civilization/establishments are built).

But then how do you balance monster spawning/strength? Can the players ever find or destroy their spawn points? Ridding the universe of that which tormented them until you, the creator, have to step in and unleash a new plague upon them? No perhaps the monsters just spawn randomly I kind of went overboard but it's a fantastic idea and fun to think about.

Sorry just gabbin'  Coffee

Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic