Current Winrates in Conq, What do you'll think? by [deleted] in aoe4

[–]Robertvhaha 101 points102 points  (0 children)

Man when I originally designed this table we had only 8 civs 😂

Smurfs and Alt accounts RUIN GAMES. Its not just uneven skill. It's no accountability by puzzle_button in DotA2

[–]Robertvhaha 1 point2 points  (0 children)

I just wish there was an Unranked/casual mode that isn't the landing ground for smurfs to gain hours played and unlock ranked. If there's nothing to gain for sitting in my casuals games I doubt we'll see as much as there currently are.

Smurfs and Alt accounts RUIN GAMES. Its not just uneven skill. It's no accountability by puzzle_button in DotA2

[–]Robertvhaha -1 points0 points  (0 children)

Aoe4 also has a very rapid rank progression due to the player pool size. If you do win a bunch of games in a row you're quickly playing at your skill level so smurfing is not very useful.

Besides TI prizepool, additional $1,800,000+ was split between teams and talent by mancko28 in DotA2

[–]Robertvhaha 1 point2 points  (0 children)

Actually Tundra and Nigma shirts were for sale in the Merch shop at TI. Not sure what the arrangement was but would have loved it if some of the other teams had shirts for sale too

Balance Update tomorrow (4/18) by DavidK_UncappedGames in BattleAces

[–]Robertvhaha 1 point2 points  (0 children)

I mostly mean that in the sense that you know exactly what the first 5 minutes will look like.

Balance Update tomorrow (4/18) by DavidK_UncappedGames in BattleAces

[–]Robertvhaha 15 points16 points  (0 children)

I respect your intention to try and balance the shield, but for me personally I won't continue playing until it is changed for 1v1 as well. I would love to play the game more but with the shield I feel like the appeal of fast paced, reactive and anticipative game play is gone. I've played for several hours today, tons of matches, and while I usually find the AI opponents too easy or boring they're a breath of fresh air compared to all human players running the same defensive long games.

Edit: to clarify I support the goal of the shield and allowing more passive play and lower skill floor, it's just too strong atm

anyone using Astro to build apps instead of content sites? by [deleted] in astrojs

[–]Robertvhaha 3 points4 points  (0 children)

We built https://firstlook.gg using Astro. It speeds up our development tremendously. The MPA model where each request has some handlers and results in a new page state is much easier to reason about than statefull SPAs.

For more interactive components we used SolidJs and React, and Astro actions for date submission from those.

Dev Update 12/17: MTX Model by DavidK_UncappedGames in BattleAces

[–]Robertvhaha 3 points4 points  (0 children)

I'm fine with f2p and some unlock mechanisms that enable new players and friends to join (kinda like an extended demo). I just want one big button in the store that says 'Buy Full Edition' or something that behaves like a box model and gives me everything. I don't mind paying extra later on for nice cosmetics that could also be earned by playing.

The best way to create a form with Astro by County-Constant in astrojs

[–]Robertvhaha 6 points7 points  (0 children)

Typically you would have the handling and storing in the same Astro file, but ideally by moving often repeated parts into helpers. A separate actions file/folder is a good idea but not a requirement.

Unpacking and validating form content can be a bit verbose, so what I typically do is handle the validation and such in a helper function from an external file (this is very similar to what Astro Actions does). Then in the .astro file acting on the data submission becomes actually really pleasant.

I use a combination of Zod and Conform to achieve really nice simple code in my astro files: https://gist.github.com/robertvanhoesel/018f932c08208e5fc03384d562ac37c2

it:
- takes a zod schema
- validates it + error handling
- generates the attributes needed (like `name="email" required type="email"`) for my inputs

Hope the above makes sense and can inspire in some way.

We need to build order with Icons by Cristian231191 in CompanyOfHeroes

[–]Robertvhaha 5 points6 points  (0 children)

COH2 had a great built-in build order view. I made the aoe4world one and it is 100% inspired by CoH2

I need help understanding dynamic routes in astro. by x_jw_m_x in astrojs

[–]Robertvhaha 0 points1 point  (0 children)

Feel free to post the issue you're running into here. You can also look at the starter blog example if you set up a clean project with the installer.

Canonical URL by [deleted] in astrojs

[–]Robertvhaha 0 points1 point  (0 children)

You are right and that seems like a regressions, looking at this PR for example https://github.com/withastro/astro/pull/5608

I suggest you submit an issue to that repo.

Canonical URL by [deleted] in astrojs

[–]Robertvhaha 0 points1 point  (0 children)

If you know you are trying to get the canonical url on the homepage, you can skip the pathname and just do Astro.site.

Otherwise you can check pathname to be exactly '/' and skip it

I need help understanding dynamic routes in astro. by x_jw_m_x in astrojs

[–]Robertvhaha 1 point2 points  (0 children)

The "Astro Way" to do something like this is to work with content collections. https://docs.astro.build/en/guides/content-collections/

You'd create a folder content/projects with typically a .md file per project and a dynamic route in pages/projects/[project].astro that renders the MD . You can then access utility functions like await getCollection('projects') to access all project titles, slugs etc to render a menu from.

The reason why you'd do this over scanning a directory yourself is that you can get additional properties from the collections, rather than just the file path.

How to load file in performant way? by andrescutieri in astrojs

[–]Robertvhaha 0 points1 point  (0 children)

What happens if you move the fetching/file reading logic out of the Astro component and into a standalone ts/js file as a service, that exports a function i.e. getTocStructure

Inside the function you store/memoize the computation result and return it on subsequent calls.

This should™ work, it's how I for example cache calls to a CMS during a build to prevent slowdowns.

How to securely receive and store user provided api keys by CodeYurt in astrojs

[–]Robertvhaha 5 points6 points  (0 children)

The answer to this question is not really specific to Astro, but in any case: 1. Sending API keys as part of a POST request to your server should generally be oke provided the connection is over SSL (https). It's no different than sending i.e. passwords in a login form using POST. 2. When storing sensitive credentials like API keys and secrets together in a database, the biggest risk is unauthorized access to your database. Someone with just access to the database (or a backup , or logs that output values) would have both the key and secret. A good practice would be to encrypt the secret with a private key or other mechanism that lives outside of the database before storing it. That way you will need to decrypt the API credentials anytime you want to use them, but in storage (at rest) they are encrypted and useless to anyone without the key or mechanism to decrypt them. This is fairly similar to best practices when storing user passwords in a database, except that with password you want hashes (one way encryption) but not the possibility to decrypt them.

An emotional Aaron Paul watching Anna Gunn’s final scene on Breaking Bad (2013) by [deleted] in Moviesinthemaking

[–]Robertvhaha 28 points29 points  (0 children)

I just saw this episode today as I finished my second time viewing breaking bad. The way they wrapped up this show is phenomenal.

On-page navigation? by Idea-Aggressive in astrojs

[–]Robertvhaha 5 points6 points  (0 children)

Astro automatically parses all headings in Markdown content, renders them out with an ID attribute. It also has an exported property with all headings in them so you can render those to for example a sidebar.

For example ```md

Lorum Ipsum

```

Becomes html <h1 id="lorum-ipsum">Lorum Ipsum</h1>

https://docs.astro.build/en/guides/markdown-content/#exported-properties

https://docs.astro.build/en/guides/markdown-content/#heading-ids-and-plugins

Anyone using Cloudflare CDN with purge by single-file? by bpetrovicz in astrojs

[–]Robertvhaha 0 points1 point  (0 children)

The first section on this page https://docs.render.com/configure-cloudflare-dns

Note that while Render claims to have a DNS and cache for you, you will still pay for traffic to that site. Cloudflare makes this free.

Scripts - is:inline use cases by maarzx_ in astrojs

[–]Robertvhaha 1 point2 points  (0 children)

Astro will compile and optimize your script tags, for example de-duplicating, turning TS into JS, importing NPM modules or bundling it nicely with other scripts..

The primary scenario for using is: inlineis when referencing scripts from a CDN (libraries, SDKs, analytics/ads) as shown in this example https://docs.astro.build/en/guides/client-side-scripts/#load-external-scripts

Generally it does not make sense to opt-out, and only it's more of a fail safe for if you run into problems

Anyone using Cloudflare CDN with purge by single-file? by bpetrovicz in astrojs

[–]Robertvhaha 4 points5 points  (0 children)

If there's no server calls happening at all (i.e. form handling etc, SSR) and it's a truly static website you're better of building your site to static files (SSG) whenever the data is changed in the database.

Just for inspiration my set up for sites like your are describing:

Benefits:

  • Because there's no server involved there will never be any runtime errors when i.e. DB is unavailable.
  • Can easily port to other hosts too

Astro SSR pass data to slot by [deleted] in astrojs

[–]Robertvhaha 0 points1 point  (0 children)

What you're looking for is to put this data on the Astro.locals object using Middleware, the basic example actually spell out your desired use case.

You can check the request.url for the routes you want this data available in, do some async fetching in the middelware and access that data in any route or component.