edgecase's People
edgecase's Issues
Remake map mesh for proper lighting
We need 3 times as many vertices to illuminate mesh surfaces correctly. Each face should have its own set of vertices with normals pointing in the same direction, so the lighting can know how to handle it. As you can see on the picture above, Unity cube has 24 vertices instead of usual 8 because each face needs its own 4 vertices with normals pointing perpendicular to the face.
Change hex outline upon selection
Make map symmetry toggleable (perlin height map gen)
Map centrosymmetry should be toggleable.
Should be implemented as a subclass of PerlinHeightMap.
Hexes can utilize shaders instead of 2D textures
Hexes currently use uv-maps with texture-based materials, which leads to blurry edges:
Furthermore, textures are heavy and overload the scene for no good reason.
We can avoid this problem by utilizing a shader:
- Color points which are less than N meters away from any edge with COLOR
- Color all other points black
- Set different N for the upper face and the sides
"Barycentric coordinates" and "wire-mesh techniques" may help.
Perlin noise rounding breaks maps with max height variation
More often than not generating large maps (100x100) produces this error:
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Hex.UpdateColor () (at Assets/Scripts/Hex.cs:131)
MapGenerator.Start () (at Assets/Scripts/MapGenerator.cs:31)
Seems like it can't find a color in the Hex.ColorMap
dictionary. Probably because of some broken perlin noise rounding that produces a value higher than the maximum height, since switching HeightVariation from 7 to 6 fixes the issue.
May want to switch to simplex noise.
Add keys to rotate the camera
Make camera rotatable by 60 degrees in both directions. Make sure the map doesn't clip through the camera planes and is displayed correctly.
Remove triangles between hexes and fix distances between them at zero
Small tweaks
Issue for minor refactoring / typo fixing PRs.
Change materials of hexes and their sides
Map-mesh consists of 2 submeshes, one of them represents tops of the hexes and the other one - their sides. This way we can assign to them 2 different materials. Here we need to change those materials so the map looks pretty and readable.
Add sliding animation to main menu
To swap between main menu and settings.
Implement proper camera controls
Generate the entire map as one mesh
Generalize the HexMap class
We may need different shapes of the playing field.
So there must be a generic interface for hexmaps, or a more generic class for hexmaps.
The current HexMap class can easily be modified to support arbitrary shapes.
And then the specific shape is the responsibility of the object's creator.
Implement the impossible geometry mechanic
Implement hex elevation method
Create a method to change the height of a hex. Possible parameters are: coordinates, height change, animation time.
Camera drag'n'drop mechanic
Divide the map mesh into separate meshes for each hex
Must be done to customize each hex individually.
Top-down camera and state-switching
Broken IsOverlapped method of the HexMapGeometry class
The HexExistsAtPos method cannot be used to check if candidates for overlapping remain. This works for a hexagonal playing field, but will break for non-convex shapes.
Check how global hex shifts affect performance
Add bottom vertices below the map edges
We need to be able to see sides of hexes located near the edge of the map.
Broken map generation through Perlin Noise
Move Kernel namespace out of Scripts
Kernel and Utils don't belong to Unity so they don't have to be in Scripts
Make the camera orthographic and fix its direction
Implement random hex height via perlin noise
Tweak the existing generation algorithm to produce smooth continuous terrain. Make the smoothness adjustable.
Mathf.PerlinNoise may help.
Add lighting
Now after #21 is done, we can add lighting with respect to our normal map. Add a directional light source and set it up so the map looks pretty and readable.
Add glow to the outline shader
Let hexes know about their neighbours
Get rid of HeightMaps
HeightMap
can be replaced with HexMap<Height>
.
PerlinHeightMap
and FlatHeightMap
can be replaced with PerlinHeightMapGenerator
and FlatHeightMapGenerator
.
They should just create and return a heightmap, instead of trying to be a heightmap.
Turn skipping player vs bot prototype
- player clicks on "end turn" button
- end turn event happens (TurnEndEvent, context: player="player1")
- display provider gets notified via subscription
- display provider forms a request and sends it to kernel provider (request: {"player": "player1", "action": "end turn"})
- kernel provider validates the request and produces an event (if the server is remote check if this player name and this IP are associated)
- kernel gets notified via subscription (context: player="player1", action="end turn")
- kernel handles the request, updating the state in its game model (current_player = player2)
- kernel creates an event, notifying kernel provider about the result (TurnEndEvent, context: current_player="player2")
- kernel provider gets notified via subscription
- kernel provider sends appropriate requests to all the connected display providers
- display providers produce an event (TurnEndEvent, context: current_player="player2")
- display gets notified via subscription
- display reacts to the event
Create main menu
Add another LOD for hex meshes
Far away hexes can be rendered as their upper hexagons since sides are black anyway and edge lines are too narrow at these distances. This is also an extremely good optimization for the top-down view since all hexes are counted as far away and sides are completely invisible from this PoV.
This article may help.
Should be done after #1.
Make the game look good
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.