Game Engines 2021W Lecture 8: Difference between revisions
Created page with "Lecture 8 --------- Idea: Polytopia is fun, but has poor support for co-op multiplayer - no in-game support for teams Can we make a polytopia-like game (simplified civ game..." |
No edit summary |
||
Line 1: | Line 1: | ||
<pre> | |||
Lecture 8 | Lecture 8 | ||
--------- | --------- | ||
Line 138: | Line 139: | ||
- integrated or separate from game engine abstractions | - integrated or separate from game engine abstractions | ||
- mapping between your concepts and game engine concepts | - mapping between your concepts and game engine concepts | ||
</pre> |
Latest revision as of 15:07, 4 February 2021
Lecture 8 --------- Idea: Polytopia is fun, but has poor support for co-op multiplayer - no in-game support for teams Can we make a polytopia-like game (simplified civ game) with co-op multiplayer? Challenges - co-op mechanics - handicapping? In polytopia, on a move, you can do the following: - build units that become available next turn - expand cities using available resources - move units - one move/attack per unit, or move then attack - buy tech When you encounter a new player for the first time, you typically trade tech or get resources (peaceful encounter) These mechanics are so simple, not much room to subdivide - you really want every player doing everything What makes this fun is in part the restrictions - use your units - invest never have enough stars to do too much on any turn, takes multiple turns to really build up For co-op, we really want alliances - work together to defeat enemies - but still be playing individually Because movement and visibility is so limited in the game, hard to cooperate - can't see the whole world - and even if you could, you can't get most places in reasonable amounts of time If you and your teammate are on separate parts of the map, you may never encounter each other before one of you dies - we literally share screencaps to collaborate So, maybe alliances have to be geographically close - you choose allies at start, and world generation ensures you share borders - but then this would limit expansion options Communication is the hard mechanic - fun comes from limited interactions with other players - how to allow co-op without complicating mechanics? Want to add as few mechanics as possible to formula One mechanic they have is "explorers" - does a random walk across territories - meet other players, can get tech from them messengers who can go back and forth between players who have encountered each other - would happen once "diplomatic relations" have been opened up - messengers could be used to share tech that was close to what the other has - one tech tree move So changed mechanics are - messengers, to share tech on an ongoing basis - not really units, just a mechanic - but maybe require a "peaceful path" to get there and back? - otherwise, could be captured - unified visibility as long as there is peaceful path between - game start, can ask for alliances so will be placed close together - not necessarily fun, because then you have to also compete for resources - can't attack allies units without cancelling alliance - clear notice of friend/foe encounter - Maybe expand trade routes to allies - I don't understand that mechanic so well messengers would be sent by one player, received by another on their turn - really, functions more like mail - animated pigeon? In polytopia, all mechanics are deterministic - only randomness is in initial board layout and in bot players How do I go about building this game? Where to start? One approach - start with visuals - make the tiles - make your units - draw the world Don't do that. Instead, start with the mechanics, and how to implement the mechanics in your game engine Godot has (multiple) full-fledged programming languages, so could just build "from scratch" first then integrate with engine later - make data structures for units, tiles, and players - create methods for actions on players and tiles, - implement AI Probably don't do this, unless you already had the code written - because the engine offers so much, and if you use it you get stuff for free Goal: make an extremely minimal version of the game that has core mechanics and is playable - expand mechanics and visuals after Godot does support isometric tiles In the spirit of Godot, we want to make everything we can into a nodes & scenes - player is a node - units are each nodes - every tile is a node Remember, not all nodes need to be visible, they can just exist to do something Will have to manipulate most nodes programmatically - procedural generation of the world - movement is very restricted - select then act So will probably need to create custom nodes of some kind Define your objects/data structures using tools given to you by the game engine - nice that Godot has a very flexible system, so less effort going into fitting square pegs into round holes Key reason to make custom nodes is you can then make custom interfaces Challenging part is we can't just "draw" the world - but we can construct one manually first, and then develop tools to manipulate the construct Maybe rather than custom nodes, you can just do custom scenes that get combined - but I'm thinking it would get unwieldy quickly, lack of encapsulation So, you could treat the nodes as a pure presentation level - have a more traditional internal representation that is used to generate the board Big question: How and where are you managing your game state - integrated or separate from game engine abstractions - mapping between your concepts and game engine concepts