fantasy-map-generator | Minimal fantasy map generator | Runtime Evironment library
kandi X-RAY | fantasy-map-generator Summary
kandi X-RAY | fantasy-map-generator Summary
Minimal fantasy map generator
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fantasy-map-generator
fantasy-map-generator Key Features
fantasy-map-generator Examples and Code Snippets
Community Discussions
Trending Discussions on fantasy-map-generator
QUESTION
I'm using a modified version of a map, created by https://azgaar.github.io/Fantasy-Map-Generator/ as an Angular(9) template svg. The file is 12,000 lines long and therefore slows down compilation significantly. I have experienced a further performance reduction when enumerating all 5248 grid-cells (shown on the linked map by pressing the shortcut e) and setting an id to every single cell. This, unfortunately is necessary for my use case.
As this map features 12 different kinds of overlay-groups (p.e. cities, lakes, routes, coastline) and not all are needed at once, I thought I could strip down this .svg to a minimum skeletton, requesting the different Elements via REST once the user chooses to do so.
The following will add the correct lines (exactly as cropped out from the original svg) into the template. Yet, the group would not show up. Do I need to rerender the entire SVG? How can I do this?
...ANSWER
Answered 2020-Dec-05 at 13:59Gonna completely erase and edit this answer as I finally found a solution. The problem had to do with sending a String which couldn't be converted into a json - and I was defining a json header to be used as standard response type.
long story short, I'll show the entire process of adding svg groups dynamically to an existing svg. Technologies: Angular & Spring Boot
angular:
QUESTION
I have a multiplayer cooperative game project in mind and my main concern is the game map.
A bit of context
The players interact with a world map. This map is a first pre generated. This map should be tiled based (each tile representing a part of the world). However, the players should have the capacity to change the map (build something here, destroy another thing here). These modifications of the map should be visible for all other players.
Question
What is an efficient way of doing this ?
- Classic array stored server side and update this array when a user does an action? Wouldn't it be quite CPU consuming on client side when building the map from that array? (image maps?
)
- Use a game "engine" such as gdevelop or babylonjs?
From my point of view, for me to be able to fully customize my map, the array solution seems an easy way to get it done. But I don't have any experience on this topic.
I have recently hade a look on this map generator and tried to build a map on it (), but this does not allow me to customize the map after it has been generated.
ANSWER
Answered 2019-Jun-10 at 15:04I think your best option would be to:
Store the map data in a simple serializable data structure. For example a double array of objects with some integers - a Tile Type enum, a Building Type, state data if you need it, etc. That will allow you to easily serialize and send the data between the server and the clients.
Use a game engine / canvas renderer / webgl renderer to render a view to the client by using the data array. I have experience with PIXI.js (a 2D rendering framework using either WebGL or Canvas) and Phaser (a 2D game engine, build on top of PIXI). So i can recommend you those two if your game is 2D. PIXI is used just for rendering, there is no game logic in it and you will have to implement it. It's good if the game is not that complex or if you want to learn how to do stuff on your own. Phaser on the other hand is a full game engine that has all sorts of game development functionality, but that also means that it's more bloated with things that you might not need.
When a user clicks something send to the server that "user x clicked tile x,y", process the input, edit the main data array and send it back to all clients. You can use Web sockets for that or just plain HTTP requests
Alternatively you can use one of the "big" game engines and just compile it down to js and html from there - Unity, Godot, Cocos creator (in this one you actually write in JS)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fantasy-map-generator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page