|
CH Science posted:I have a kind of broad maybe dumb question that all my googling hasn’t really landed me a decent answer on. Cheapest way is peer hosting. Nice way is auto scaling groups. Auto scaling groups can get very expensive very quickly. Keep some open capacity, match people into an available game slot. As capacity falls below some threshold, spin up new capacity. If open capacity grows too large, scale down.
|
# ? Jul 25, 2022 03:59 |
|
|
# ? May 25, 2024 13:57 |
|
The answer is definitely "use a cloud service of some kind", and if you don't want to take on a whole separate project of writing a backend matchmaker, server controller, etc etc, then yeah, something like GameLift or Azure PlayFab is probably your best bet.
|
# ? Jul 25, 2022 04:00 |
|
I'm more of a vhost type, tinkering with my own daemonizing in systemd and whatnot. That's an open-ended question that depends a lot on startup time and whether a server has to completely destroy itself or not to handle a new game. The best suggestion in most cases, to answer both or either or neither of those complications but still not be too GAASy to DIY, is to manage a pool of servers based on how many games are running, how many players are connected but not in a game, etc. This decouples spinning up extra capacity from actually starting a game to keep the latter responsive. This is also flexible enough to support the pool spanning multiple hosts as long as you have some RPC arrangement to manage it. It should be rather robust if your game servers specifically talk to the matchmaking server to make themselves available, so it's hard to send players to a server that crashed hours ago or something. This way, also, the matchmaking server doesn't have to keep endless track of what's on what ip:port or anything, it just knows which ones it has heard are ready for a new game recently and can call for a fresh one (without having to provide any of the same specifics) on demand.
|
# ? Jul 25, 2022 04:07 |
|
CH Science posted:I have a kind of broad maybe dumb question that all my googling hasn’t really landed me a decent answer on. What kind of server are you running? That will mostly dictate the options available to you. Is it something you wrote? Does it run on Linux?
|
# ? Jul 25, 2022 07:50 |
|
Ranzear posted:This decouples spinning up extra capacity from actually starting a game to keep the latter responsive. Something I had not considered at all. Good stuff thanks Mr Shiny Pants posted:What kind of server are you running? That will mostly dictate the options available to you. Is it something you wrote? Does it run on Linux? The fledgling matchmaking server is a pure rust app , the game/session server and client are Godot/GDNative+Rust, so should spin up on pretty much anything
|
# ? Jul 25, 2022 08:32 |
|
CH Science posted:Something I had not considered at all. Good stuff thanks I would do some load testing, just to see what kind of hardware might be needed. Any idea how many people would be playing?
|
# ? Jul 28, 2022 14:07 |
|
Friends- I am futzing about porting an ancient 'paper board and chits' game to a version which can be played on these newfangled computers. I think I will going with boardgame.io for the game logic, as it seems to have basically everything I need. My question is this: How do I handle the map? it looks like this: So I have separated off the Turn / Build tracks from the top. I'm concerned with the board itself. The different areas to be hoverable and clickable. Wondering what the best way to handle it is? PaperJS? an image map? close in the outside edges and use some sort of floodfill? My initial idea was just a plain image map. That may be the right choice, I dunno. The one downside I can see is that it's tough to make responsive (but does it NEED to be?). So I'm looking for suggestions on how to handle the map part. Whatcha got? TIA.
|
# ? Jul 28, 2022 14:56 |
|
HaB posted:Friends- Look into Voronoi diagrams
|
# ? Jul 28, 2022 15:07 |
|
Ben Nerevarine posted:Look into Voronoi diagrams I am familiar with the concept. Not sure how it applies here, tho. Wouldn't that be used for generating similar maps to the one I provided? Or is there some way to "map" one onto an existing diagram?
|
# ? Jul 28, 2022 15:25 |
|
HaB posted:I am familiar with the concept. Not sure how it applies here, tho. Wouldn't that be used for generating similar maps to the one I provided? Or is there some way to "map" one onto an existing diagram? Do you want to use the same static map for your game every time it’s played? If so you probably want to chop it up into some coordinate space. I’m not familiar with boardgame.io so it would depend on what their api lets you do. Your pic reminded me of a Voronoi diagram so if you wanted to generate a new map every game that seems like it would be the way to go, with the benefit of having information on the cell boundaries and whatnot at your disposal by virtue of having generated it from some initial random distribution of points There is probably a way to map from your existing map to a Voronoi diagram but that’s probably more work than it’s worth
|
# ? Jul 28, 2022 16:46 |
|
HaB posted:So I'm looking for suggestions on how to handle the map part. Whatcha got? Make a different image and color-code all the different regions like I've started to do (badly) here: Then you display the original uncolored map to the user. As the user hovers over the map, you check against the colored map instead. With the colored one you just sample the color of the pixel that corresponds to where the user's mouse is, and cross-reference that to a table of color values and areas. You can do that by simply hiding the colored map below the graphical map or by converting the positions or however. From there you can do whatever it is you want to do with the areas. EDIT: VVV Oh yeah, I forgot OP was going for web based, this might not be the right choice for that sort of thing as making clickable areas has been common on the web for ages. Phigs fucked around with this message at 17:41 on Jul 28, 2022 |
# ? Jul 28, 2022 17:23 |
|
if boardgame.io is html/js you could just use transparent html polygons no need to sample anything or generate any sort of diagram. websites are really good at letting you click on stuff e: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon
|
# ? Jul 28, 2022 17:32 |
|
Phigs posted:Make a different image and color-code all the different regions like I've started to do (badly) here: lol, this is literally how you make a canvas rendering interactive. I thought you were describing web graphics for a second
|
# ? Jul 28, 2022 19:27 |
|
Ben Nerevarine posted:Do you want to use the same static map for your game every time it’s played? If so you probably want to chop it up into some coordinate space. I’m not familiar with boardgame.io so it would depend on what their api lets you do. Your pic reminded me of a Voronoi diagram so if you wanted to generate a new map every game that seems like it would be the way to go, with the benefit of having information on the cell boundaries and whatnot at your disposal by virtue of having generated it from some initial random distribution of points Oh yes. That’s my bad for not explaining. There is just the one map. It’s a board game like Monopoly, etc. but, I did ponder eventually making new maps, so that all good food for thought. Phigs posted:about coloring in sections. The coloring different areas idea is an interesting one. That may point me in the correct direction, as I eventually may port this whole thing over to UE5. 12 rats tied together posted:if boardgame.io is html/js you could just use transparent html polygons Won’t this have the same issue an image map does? In that it won’t be responsive. I’m just hating the idea of fixed browser widths for the game. I wanna keep all the elements relative and let the players size it how they want.
|
# ? Jul 28, 2022 21:20 |
|
I dunno how deep you can get with adding html DOM elements but SVG is easily scalable, if you had a container element which was responsive you can have the SVGS scale inside that container real easily. Running the code snippet on the top answer here shows a good example https://stackoverflow.com/questions/25940741/making-svg-responsive E: even better, heres an example that uses svg, scaling the SVG box resizes the hexagons inside proportionately if you open the browser devtools and paste this into console code:
A LOVELY LAD fucked around with this message at 21:52 on Jul 28, 2022 |
# ? Jul 28, 2022 21:37 |
|
A LOVELY LAD posted:I dunno how deep you can get with adding html DOM elements but SVG is easily scalable, if you had a container element which was responsive you can have the SVGS scale inside that container real easily. Ah. Interesting. That might be the one. Thanks.
|
# ? Jul 28, 2022 23:36 |
|
A LOVELY LAD posted:about SVG Forgive the double post - it's the next day. So SVG looks like hte way to go but, uh...how do I get the coordinates? is there's some sort of tool that will let me load and image and trace over it? I found tools like that for image maps, but don't see anything similar for SVG
|
# ? Jul 29, 2022 14:56 |
|
Inkscape maybe?
|
# ? Jul 29, 2022 15:53 |
|
HaB posted:Forgive the double post - it's the next day. I know there's a couple of scripts available for photoshop, that will convert a path into points; probably not in the exact format you want but enough that you could extract the coordinates. Also here's a jsfiddle i made a few tweaks to, if you're happy enough to make a mental note of which bit you are clicking on (it might be easier to refresh/clear console after you've done each segment) the map, this will output the coordinate of your click in the textarea below https://jsfiddle.net/v0q38cfh/
|
# ? Jul 30, 2022 21:50 |
|
A LOVELY LAD posted:I know there's a couple of scripts available for photoshop, that will convert a path into points; probably not in the exact format you want but enough that you could extract the coordinates. Ha. This is where I was already headed, because I started thinking about - what if more maps?, then that lead to what if map editor?, which is what I am now messing with.
|
# ? Jul 31, 2022 02:49 |
|
So writing a map editor for this thing has been entertaining. I have the basics kinda working. It loads a map, and you can Add an area: and Edit it: But riddle me this, friends - my "map" is just a js object right now. How to store? it currently looks like this: code:
|
# ? Aug 3, 2022 12:22 |
|
HaB posted:so like....a quick sqllite db? How would I store these in a friendlier format? In what way would it be friendlier to make it so you need a bunch of extra libraries to read and write it?
|
# ? Aug 3, 2022 12:55 |
|
roomforthetuna posted:Store for what purpose? Why not just a json file, since it's already json-compatible data? (Or, with "export default" on it, why not just a js module file, since it's already javascript?) I guess I'm thinking if users are going to be able to edit maps, it feels weird to just be happy-rear end writing js files on the server.
|
# ? Aug 3, 2022 13:20 |
|
HaB posted:I guess I'm thinking if users are going to be able to edit maps, it feels weird to just be happy-rear end writing js files on the server. But if you already have a SQL database lying around, there'd be no harm in using that either. I'd still suggest just cramming a json object in it, because trying to convert your level data into something structured would be an unnecessary pain in the rear end. If you want it to be sql-searchable by some properties (like "levels supporting 2 players" or whatever) you could extract some of those fields from the json just for searchability, but still just leave them in the json *as well* so you don't have to do conversions everywhere.
|
# ? Aug 3, 2022 13:31 |
|
Fellow map nerd: check out geojson & topojson if you want web d3.js/mapbox stuff. If you're a real scholar then study GIS too for comparison and awareness of in-the-field non-nerd data collection from exploring nature hike bros. I avoided GIS completely in my defunct "Professional Dataviz career" but my more successful applied mathematician friend (our OG DM) actually finished his math PhD after doing a masters in GIS. I literally know nothing about it, but it's something that he uses all the time as a forestry/wildlife scientist in the public sphere And if (god forbid) you want to really learn d3.js, I'm super decent while my old boss Elijah Meeks is top of the JS dataviz field. I'm extremely disillusioned with this stuff after my recent layoff but it's knowledge that needs to go to actually productive people like you or something, hopefully Edit: to qualify, I'm the Jung to his Freud in "optimized data visualization engineering", but he is more rich & powerful & connected so I'd put you in touch before attempting a goon project Analytic Engine fucked around with this message at 13:46 on Aug 3, 2022 |
# ? Aug 3, 2022 13:39 |
|
Analytic Engine posted:Fellow map nerd: check out geojson & topojson if you want web d3.js/mapbox stuff. If you're a real scholar then study GIS too for comparison and awareness of in-the-field non-nerd data collection from exploring nature hike bros. I avoided GIS completely in my defunct "Professional Dataviz career" but my more successful applied mathematician friend (our OG DM) actually finished his math PhD after doing a masters in GIS. I literally know nothing about it, but it's something that he uses all the time as a forestry/wildlife scientist in the public sphere I fiddled with D3 long ago. Will take a look at some of the other stuff. Thanks.
|
# ? Aug 3, 2022 13:47 |
|
I would go JSON to store the data. If you really want to use a database to organize them, document databases that support JSON exist. Otherwise, just stick them in a "shared maps" folder if you want them to be shared between users or store them on the users' local browser cache if you don't.
|
# ? Aug 3, 2022 16:06 |
|
SQLite is a good and popular choice for storing structured data that is or may become complex, especially if it involves any kind of internal referential integrity.
|
# ? Aug 3, 2022 18:17 |
|
Bongo Bill posted:SQLite is a good and popular choice for storing structured data that is or may become complex, especially if it involves any kind of internal referential integrity. Destiny publishes their item database for people to play around with.. it's a sqlite db with blobs of json data.
|
# ? Aug 3, 2022 18:51 |
|
SQLite can be a bit fiddly (single thread, requires you to be really careful about closing connections and stuff, etc) but the journaling system results in a really reliably safe way to save without much (any?) risk of corruption because of an interrupted save or something. I can open a transaction, insert and update a bunch of stuff, and then commit the transaction and either everything will be updated successfully or no permanent changes will be made.
|
# ? Aug 3, 2022 22:21 |
|
If I want to make a 2D game in Unity (think similar complexity to Flappy Bird), are there any specific tools I should use? I remember a long time ago, it was recommended to use Futile but then Unity appears to have created a whole 2D workflow since then. I'm also looking at this Brackys video about 2D games and it looks like they're using the provided tools in the default editor.
|
# ? Aug 4, 2022 00:11 |
|
Cory Parsnipson posted:If I want to make a 2D game in Unity (think similar complexity to Flappy Bird), are there any specific tools I should use? I remember a long time ago, it was recommended to use Futile but then Unity appears to have created a whole 2D workflow since then. I'm also looking at this Brackys video about 2D games and it looks like they're using the provided tools in the default editor. If going 2d why not use Godot?
|
# ? Aug 4, 2022 00:19 |
|
Harminoff posted:If going 2d why not use Godot? I could do that too. I picked Unity for this for 2 reasons: 1. I'm actually doing this for someone else and concerned that when I hand off the code, it would be better to implement in Unity. It seems more widely used so maybe it'll be easier to bring on other people? 2. The person doesn't know exactly what the build targets are. For now it's looking to be web, Android, and iOS. I'm pretty sure Unity has very good support for these, but I'm not sure what it's like for Godot. I do really like Godot, however. So if these two reasons aren't very strong reasons to use Unity, I'd be open to switching.
|
# ? Aug 4, 2022 00:26 |
|
"I really like Godot, but I'm not going to use it" is turning into some weird universal constant that I can't disagree with.
|
# ? Aug 4, 2022 00:55 |
|
Ok. You gonna explain then? I thought Godot's export system was pretty crap and I don't think having to convince other people to learn Godot for this project would be easy.
|
# ? Aug 4, 2022 01:14 |
|
No, sorry, that's exactly what I mean. Not a dismissal. Godot looks technically amazing at a glance but actually jumping into it seems to many others, just as myself, to be very from two different directions. The floor to make anything functional in it is certainly higher than unity's while not offering more (though not much less) at the high end. It feels like it lies in this weird spot of too technical to attract casual unity users but too simplified and ecosystemed to appeal to nerds like me. I just couldn't get into or around the node system in any way that worked with rolling my own netcode without just straight up duplicating code in two languages. That may have been way back in 2.x however. Ranzear fucked around with this message at 07:47 on Aug 4, 2022 |
# ? Aug 4, 2022 07:31 |
|
Oh, interesting. I like the Godot editor because it doesn't feel bloated but it's still got some of that open source jank to it. I can't really fault them for that since they don't have as many people or resources as the bigger companies. They're gaining steam though so maybe they'll be much more polished in a few years. To answer my own question, I watched a couple more tutorials. Looks like unity 2d is the standard. vv oh I meant standard way of making 2d stuff in unity. Yeah that's right, they had that malware thing recently and are starting to feel like Autodesk in terms of user hostile business practices. I'd be pretty happy with Godot as the indie standard if they smoothed out the rough edges. Cory Parsnipson fucked around with this message at 09:17 on Aug 4, 2022 |
# ? Aug 4, 2022 08:07 |
|
Cory Parsnipson posted:To answer my own question, I watched a couple more tutorials. Looks like unity 2d is the standard. Unity is the standard that is losing favor, and Godot is the underdog that is gaining ground. Unity will be easier to learn (more tutorials etc) but there is some fear that it will get run into the ground on a long enough timeline. They're both fine options at the end of the day. There is also MonoGame/FNA if you want something that just lets you write code without the editors and stuff.
|
# ? Aug 4, 2022 09:04 |
FWIW I found the Godot built-in export function to work fine for simple games; I don’t know if it runs into problems at scale or with increased complexity though.
|
|
# ? Aug 4, 2022 09:28 |
|
|
# ? May 25, 2024 13:57 |
|
Lucid Dream posted:SQLite can be a bit fiddly (single thread, requires you to be really careful about closing connections and stuff, etc) but the journaling system results in a really reliably safe way to save without much (any?) risk of corruption because of an interrupted save or something. I can open a transaction, insert and update a bunch of stuff, and then commit the transaction and either everything will be updated successfully or no permanent changes will be made. Yeah for the super light duty I am doing, I went with sqlite. I do have a postgres instance running on AWS I may eventually move it to, but for now, this works fine. Hacked up a little Hapi/Knex api in about an hour.
|
# ? Aug 4, 2022 12:06 |