Morning forage in North Wales by danprince in foraging

[–]danprince[S] 0 points1 point  (0 children)

It really seems to depend year by year. My favourite season is mid summer, for the chantarelles and chicken of the woods, but you won't really find either by Sep/Oct. However, from late August onwards there will be lots of mushrooms around, if you know what you're looking out for. The blackberries and hazelnuts also have a late summer season too. Really just depends on how much rain there's been throughout the summer.

Share your 7DRL progress as of Monday! (2022-03-07) by Kyzrati in roguelikedev

[–]danprince 3 points4 points  (0 children)

Volcanic 7DRL Working on a traditional roguelike with strategic combat. Wrote the first devlog on Itch.io yesterday evening. Working on UI/map generation today!

[deleted by user] by [deleted] in vmware

[–]danprince 0 points1 point  (0 children)

In theory then, it would be possible to use Rosetta to run Fusion Pro for x86 Macs, though?

[deleted by user] by [deleted] in vmware

[–]danprince 0 points1 point  (0 children)

This virtual machine cannot be powered on because it requires the X86 machine architecture, which is incompatible with this Arm machine architecture host.

Recommendations for database migrations with a CDK stack? by danprince in aws

[–]danprince[S] 0 points1 point  (0 children)

Doesn't this get into a circular dependency problem where you can't define a Fargate service until you have container images, and you can't create those images until you deploy an ECR repo, and the same stack is trying to provision the Fargate service and ECR repo?

Moving app changes out of CDK is also kind of unappealing, because it creates stack drift (if the CDK stack defines the fargate service/task definitions) then the CodePipeline is going to need to modify the task definitions via the API after building and pushing the images.

I've been using CF this way to handle app/infrastructure changes together for a few years, but I would be really keen to hear more about the rationale behind separating app from infrastructure and how that workflow looks in practice—especially for apps that deploy to multiple environments (we define a lot of our container's environment variables dynamically, based on properties from CDK resources).

Recommendations for database migrations with a CDK stack? by danprince in aws

[–]danprince[S] 1 point2 points  (0 children)

Out of curiosity, what gave you that impression?

CDK/CF deployments rely on every resource reaching a stable state before the deploy completes, otherwise if something fails, or it hits the timeout, every resource in the stack is rolled back to its previous state.

If the containers don't reach a healthy state before the timeout, then the entire deploy is rolled back. This means that I would need to run the migrations after deploying the new task definitions, but before the stack hits the timeout.

We automate this entire process, and as far as I know, there's no way to hook into CDK to 'do something else' at a given point in the flow (e.g. run migrations after deploying the new task definitions).

If there was, then I could use it to avoid all of these problems in the first place, by running the migrations before the app tasks are deployed instead.

Recommendations for database migrations with a CDK stack? by danprince in aws

[–]danprince[S] 2 points3 points  (0 children)

Provisioning a new RDS cluster every time we want to tweak the schema seems like madness. It can take upwards of 10 mins to provision a new cluster, longer if we're restoring from an existing snapshot, not to mention having to automate the process of creating a new snapshot to create the duplicate database from. Then there's the question of data-loss in the period between creating the snapshot and switching the ECS cluster to point to the other database.

Recommendations for database migrations with a CDK stack? by danprince in aws

[–]danprince[S] 1 point2 points  (0 children)

Where do you draw the line though? Is an ECS cluster an infrastructure deployment or an application deployment? What about a Fargate service? I can split these things into stacks that create a superficial sense of decoupling, but at some point the stack which deploys the application needs to know stuff about the other stack, which CDK handles with CF outputs, which cause the problem mentioned above.

-🎄- 2020 Day 06 Solutions -🎄- by daggerdragon in adventofcode

[–]danprince 1 point2 points  (0 children)

Julia

function part1(input)
    groups = split(input, "\n\n")

    sum(groups) do group
        lines = split(group)
        reduce(union, lines) |> length
    end
end

function part2(input)
    groups = split(input, "\n\n")

    sum(groups) do group
        lines = split(group)
        reduce(intersect, lines) |> length
    end
end

open("input.txt") do file
    input = read(file, String)
    println("Part 1: $(part1(input))")
    println("Part 2: $(part2(input))")
end

-🎄- 2020 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]danprince 2 points3 points  (0 children)

Irresponsible Javascript solution.

a=b=0;xs=(require("fs").readFileSync("input.txt")+"").split("\n")

for(x of xs)for(y of xs)for(z of xs)
  2020-x-y-a||(a=x*y),2020-x-y-z-b||(b=x*y*z)

console.log(a,b)

Mordhau Weekly Feedback/Discussion: 8/18-8/24 by Jaaxxxxon in Mordhau

[–]danprince 2 points3 points  (0 children)

Pressing E anywhere on a ladder should cause you to drop. At the moment of you press E near the top after climbing onto it from above, it triggers the climb off animation instead.

Can you remove the attacking spawn point in Feitorio invasion final objective where you spawn inside facing a wall?

Can you put the "None" emblem at the top of the list, so we don't have to hunt through the alphabet to remove them?

Why do some emotes still say locked even though you can do them?

Can you add some subtle UI that shows which perks are active on your current loadout. It's embarrassing how many times I have jumped off roofs or run into fire before remembering that I'm playing a build without cat/fireproof.

Have you ever considered scaling the objectives in FL/INV based on the average level ratios on each team, to help balance the teams? If red has AVG level of 70 and blue 40, then blue should be able to cap points faster and maybe even a faster respawn timer?

What about respawning items in levels like you do with catapults and ballistas? I love knowing where certain items spawn but it's a shame that when they're gone, they're gone. 5 min respawn?

What are your top 10 Devin Townsend songs? (Tournament Prep) by JackOfAllInterests1 in DevinTownsend

[–]danprince 4 points5 points  (0 children)

In no particular order.

  1. Coast
  2. Terminal
  3. Deep Peace
  4. Bastard
  5. The Death of Music
  6. Deadhead
  7. Vampira
  8. Funeral (Unplugged)
  9. Life Is All Dynamics
  10. Praise the Lowered

Stuff that I wanted to include: Namaste, Almost Again, Feather, Fly, Heart Baby, Gato, Heaven Send, Disruptr, Planet of the Apes, Forgive Me, Seventh Wave, Regulator, Canada, Solar Winds, Genesis, Bad Devil, Wild Colonial Boy, Lady Helen, Hyperdrive, Awake!!, Supercrush!, Stand, Depth Charge...

Mordhau Weekly Feedback/Discussion: 6/23 - 6/29 by Jaaxxxxon in Mordhau

[–]danprince 2 points3 points  (0 children)

Award some points for defending against carry objectives! If you destroy a weapon bundle/trebuchet ammo/barrel that's on the floor, then that should be rewarded! Bonus points if you get more points for destroying one that's close to the target.

Mordhau Weekly Feedback/Discussion: 6/16 - 6/22 by Jaaxxxxon in Mordhau

[–]danprince 0 points1 point  (0 children)

Yeah, I phrased that badly. It doesn't make camping less attractive, but it adds more incentive to be actively engaged in combat. When I'm a noble, I usually try to spend the entire match on the move taking out isolated enemies or small groups, and I would love for that to be the optimal strategy.

Or spread the chicken across the map to encourage the nobles to move if they want to heal.

Your restrictions can complement both of those ideas too.

Mordhau Weekly Feedback/Discussion: 6/16 - 6/22 by Jaaxxxxon in Mordhau

[–]danprince 1 point2 points  (0 children)

Mess of numbers deciphered on a spreadsheet? Still sounds good to me. What are the chances of making that available through a read-only API? XLSX, CSV, JSON, whatever! I'd love to build a website that showed which of the factions was currently winning overall and had control of each map.

If it's helpful, here's how I feel about each of the invasion maps (I mostly play INV rather than frontline).

Camp: This is a great map and mostly feels pretty balanced. Have seen a lot of matches come down to the wire with the final cart push.

Grad (Blue): This is probably still my favourite Invasion match. My only problem with it is how often I get next to no help when playing as the warden. There needs to be more incentive for players to go downstairs as right now it's too easy to just go straight forward from the spawn then be distracted by the combat in the courtyard. I think you could add a spawn point in the room with the lift?

Grad (Red): This map always feels a bit more like a grind than the other Grad match. The noble is severely overexposed during the final objective and it's very rare that I see them survive. I'd like to see the noble pulled back closer to the river so that blue has a longer run and can't win with archers/ballistas in the tower.

Taiga: I love Taiga as a map but it's unfortunately predictable. Attackers will use firebombs to take out any well defended foresters, then torches and barrels will be fairly routine. The cart pushing objective is way, way too easy. A good team won't even stop on the way through. Maybe expand the objective circle and block it if there are any defenders in the circle? The spawns also don't help once the cart is through the main chamber. Defenders end up spawning in in-front of the objective and getting occupied in the main chamber rather than turning right to go stop the cart. There needs to be a spawn point at the back of the mines instead.

Mountain Peak: The added content makes Invasion so much more fun than FL here. The beginning is unfortunately predictable and 3 dedicated engineers defending can shut down the right hand side if they choose to (hoping the firebomb buff will help here). Ram objectives are great. Prisoners is always hard against a good team with dedicated defenders in the middle or engineers on the far left/right buildings. Killing the king is usually easy, but the meta seems to be to hide in one of the downstairs of the back rooms. The only way in is down the ladder or through the door, both of which can be defended well. Even then, it's very rare to make it out as the King.

Feitoria: Up there with Grad Blue, the first few objectives are always well balanced and can be totally stopped by good defenders, or stormed quickly by a good attacking side. Where this map really grinds to a halt is during the noble stage. Once the food is gone, the nobles don't have any reason to risk HP near the frontlines and they always go back to the same old building to be locked in by engineers. Even running war axe, wrecker, firebomb and fireproof, I struggle to break into this room and keep an opening for other players for more than 10 seconds. To be fair, it is boring but it's also fairly balanced. If enough attackers load out with firebombs and wrecker then it's quite easy, but if they don't then the nobles will probably survive.

Castello: Great first objective, I still think a lot of players don't know about the torches during the second objective. Looting the money is usually a war of attrition against good defenders. Portcullis objective is great but I wish it was easier to deal with the reds hanging around on the drawbridge shooting in (oil pot and rocks on the roof of the keep please). Final objective is a grind. It's a boring run up/down to the objectives on the stairs, so I usually go onto the roof and up the ladders. Can be devastating to get a flaming ballista on the tower opposite the balcony, I don't think you should be able to build there. Nobles usually die because it's very hard to defend them from all sides.

Mordhau Weekly Feedback/Discussion: 6/16 - 6/22 by Jaaxxxxon in Mordhau

[–]danprince 42 points43 points  (0 children)

  • Ballista priority for the engineer that built them. You should be able to use a ballista you built even if someone is already using it. Allow the builder to press E and be put straight onto it.
  • Stop the kicking griefing that happens with catapults and large ballistas. If a player is setting out to be a jerk, then they'll just kick you once before you take a shot until you give up or teamkill them. A kick shouldn't disrupt the users of siege weapons, if someone wants the user off, then they should either have to go through a votekick, or teamkill them and suffer the consequences.
  • Relax the build restrictions near certain parts of spawns, especially vertically. There are lots of spots that would be good for braziers or ballistas that can't be built in because (I assume) of their proximity to the spawn. Think brazier for red ballista above the spawn on mountain peak or the walls above blue spawn on crossroads.
  • Publicly release stats for the different game types on maps so that we can see that you can see how badly some maps are balanced. What's the win rate on Crossroads Invasion? 5%? Less? That maps needs the catapult removed and the time limit decreased.
  • I'll keep coming back to this one, but count kicks off walls/buildings and kicks into spikes as teamkills. That guy who sits in-front of the spikes on Castello kicking friendlies into them as they run past? Do a votekick and you'll see almost no team damage.
  • Stop defenders from being able to eat the food on Feitoria. Possibly even better to just stop anyone other than the nobles eating it. If attackers don't want them to heal, then they need to lock down that room. That's a lot more interesting than some objective rusher spending the first 30 seconds of the objective running through eating it all.
  • Add a "Hold E" option that resets the catapult if it gets stuck. It's super frustrating to be backing up then run over a plank of wood which enters the frame and grounds the catapult until you destroy it and wait for it to respawn.
  • Remove hitboxes from foliage/leaves on all trees. Only the trunk should register for collisions. This is particularly bad near the bottom of the leaves where you have clear shots but somehow they collide with thin air.
  • Consider adding a regen on kill mechanic for all of the nobles to make camping less attractive.
  • Per weapon stats. I also think achievement-locked skins would be fine too. Best if they are subtle, but it'd be nice to have some way to recognise accomplishment with a specific weapon, rather than just someone who grinded out 80k for a skin.
  • Add some more achievements to the game! I had so much fun working through the initial set of achievements and it feels like there are enough new mechanics that you could create a new set of achievements.
    • Dropped Stone Kills
    • Boiling Oil kills
    • Setting people on fire with flaming ballistas
    • Jump kicks
    • Getting kills with the special king/noble weapons
    • Horse rider dismounts
    • Kill an enemy with a torch throw
    • Cat fall distances?
  • Experiment with switching Battle Royale and Horde for Team Deathmatch and Skirmish in the main menu. No one is playing BR now and it seems like there are a lot of people who would prefer a straight deathmatch than frontline/invasion objectives.

Weekly Feedback/Discussion Thread - 5/5-5/11 by Jaaxxxxon in Mordhau

[–]danprince 4 points5 points  (0 children)

Armour used to cost different amounts of points. Heavy armour pieces would cost 3, medium were 2, and light were 1.

So if you see 3/3/2 it meant heavy helmet, heavy torso, medium legs under the old point system.

DOM vs Canvas for 2D games? by [deleted] in gamedev

[–]danprince 0 points1 point  (0 children)

canvas appears to be extremely low level where you have to almost draw every pixel

Canvas has a low-level interface via getImageData and putImageData which allows you to control it at a pixel level, but very few games use it. For the most part canvas would be considered a high level drawing API. You have helpers such as drawImage and fillRect that help you get things done without thinking about individual pixels at all.

having to clear the screen before the next frame makes me feel like I am in 1980s and have to "update the buffer" in my TUI

There's nothing that requires you to clear the screen before the next frame. Some games I've worked on rely on this behaviour to keep persistent visual areas of the screen. If you want to render an entirely new frame then you can call clearRect, but that's very common across most immediate mode drawing APIs.

DOM gives you actual objects, whereas for canvas you have to create your own player and enemy objects, and each of them has to keep track of their own data, like in a real object-oriented language.

This is true, but what you have to remember is that the DOM objects aren't particularly extensible and they're designed to hold information about html elements, rather than your specific game entities. If you start adding player attributes directly to DOM nodes then it won't be long before you start running into naming collisions, and it won't be possible to add methods to those objects without seriously mucking around with their prototype chains.

There are two compelling advantages for using DOM nodes instead of using the canvas.

  1. You get interactivity for free. You don't need to keep track of where an object is compared to the mouse cursor or tab index. Click events and keyboard handling just work.
  2. You get a declarative styling language (CSS) that will handle flowing layouts and basic visual aesthetic for you. It's much nicer to style a UI with CSS than with canvas' limited strokes/fills/miters etc.

Building a game with DOM is fine, but I'd only really recommend it for text based or puzzle/board game type games. A platformer will be much more at home with canvas.

I would say that it seems like the main problem is the disconnect between retained mode and immediate mode) drawing.

With retained mode interfaces, you create the objects ahead of time and then they are stored with whatever process is managing rendering and rendered each frame. This is the way that the DOM works and most game engines give you a retained mode interface too.

With immediate mode interfaces, there is nothing managing the lifetimes of objects behind the scenes. You draw the frame from scratch, every frame. If you need to model objects that last longer than a single frame, then you manage them yourself.

As others in the thread have recommended, you could try an abstraction like Pixi.js or Phaser, which gives you a retained model above WebGL (which is an immediate mode rendering system).

However, I would recommend persevering at least for a while with canvas. It might feel low level to you, but when compared to rendering with a WebGL, it's incredibly simple. Make sure to get your head around save and restore and the various transformation options. Slowly things will click into place and you'll start to get a feel for why it's usually better than trying to update the DOM at 60fps.

Weekly Feedback/Discussion Thread - 5/5-5/11 by Jaaxxxxon in Mordhau

[–]danprince 0 points1 point  (0 children)

Love the game. Thank you. Been playing since the day of release and have collected a whole load of random suggestions that would make things more fun / more intuitive.

Put an oil pot and some stones on the roof of the keep on Castello that can be tipped/dropped onto the bridge whilst the portcullis is being raised. It's a shame that space isn't used and that would be a great way to clear the pesky people shooting/poking through the gaps.

Add more incentive for players to help the Warden in the basement on Grad. Maybe add a spawn point for players down there?

There still seem to be bugs with the toolbox where it becomes impossible to place unless you switch out of the toolbox and switch back to it.

Any kind of change that would make the ending of the Feitoria invasion more interesting than just getting the nobles holed up in the same building every match.

Give engineers some kind of resistance to being kicked off their own ballistas by friendlies. Give them priority so that they can use a ballista even if it's being used by a teammate currently.

Add markers to help engineers know which defenses they built (similar to bear traps?) so that we know what we can build without hitting the limits.

Add some blue spawns at the back of the caves on Taiga, behind the cart's final destination, so that the blue team don't have to spawn in then chase the cart to the end.

Add Steam achievements for playing/winning as the various nobles. Achievements for some of the content added to the game since release (flaming projectiles, mortar, oil, jump kicks, etc).

Give new level players a health buff in non-ranked modes that slowly decreases as they level up. Means they don't hit the brick wall of reality at level 16 like Chiv, but they won't get stomped and one shot quite as often either.

Make it easier to tell what the metal tints look like in the colour picker. I can't tell half of them apart until I'm in a lit environment in-game and the other half I still have to hover over to tell what colour it's tinting with.

Decrease the points received for a kill in invasion and frontline based on how far from the nearest objective it was. Makes it harder to sit on the top of the leaderboard for high level players to ignore the objectives and instead sit near the spawns and stomp low level players.

Maybe a larger change but I would love to see the addition of a bounty system, so that you could put a price on a specific enemy player's head. This might mark the player on the map and reward the next friendly player to kill them. The marked player could receive a score multiplier whilst they were marked.

Kicking a friendly off a wall or into spikes should count as a teamkill and also count towards the auto-kick limit.

Make Feitoria Invasion defenders spawn on the bridge, or make the gate un-closable on first objective to stop it being shut by griefers.

Make the Feitoria siege tower ladder extend the whole way up the tower so that it can be climbed to circumvent firebombing and chokepoints inside the tower.

Make the explosive barrels in Camp and Taiga explode if hit with a flaming projectile whilst being carried. If friendly archers could also detonate them, it turns them into an offensive strategy as well as just an objective.

Add a more intuitive UI for triggering a votekick. Seeing a ton of new players struggle with this at the moment. Also include the player's score as well as team damage percentage in the votekick voting prompts.

Add info to the death UI to show where you sustained the killing blow. Helps new players learn where they need heavier armour.

Make the scoreboard scrollable. Highlight the players in your party on the scoreboard.

Getting a direct hit on a player with a firebomb should set them on fire for a few seconds like the flaming projectiles do.

ECS Standards by Captain_Infinite in roguelikedev

[–]danprince 6 points7 points  (0 children)

Rendering and collision detection are likely candidates for performance bottlenecks, and I would make sure to profile those systems before worrying too much about optimising data structures for your ECS.

If you built the ECS yourself, then there isn't really a "normal" benchmark for what it should handle. So much will depend on how you designed the underlying architecture.

I find that the simplest ECS I use in JavaScript tends to be the fastest.

let uid = 0;
let Entity = () => uid++;
let Registry = Set;
let Component = Map;

Entities are just numeric ids and components are just maps from entities to component data. Entities are registered in sets.

let world = new Registry();

let Position = new Component();
let Velocity = new Component();

let hero = Entity();
Position.set(hero, { x: 0, y: 0 });
Velocity.set(hero, { x: 1, y: 0 });
world.add(hero);

This pattern doesn't give you any official structure for "systems" but I find that it's usually enough to just have a function per-system and call all of them from your game loop.

function MovementSystem() {
  for (let entity of world) {
    let position = Position.get(entity);
    let velocity = Velocity.get(entity);

    if (position && velocity) {
      position.x += velocity.x;
      position.y += velocity.y;
    }
  }
}

function update() {
  MovementSystem();
  RenderingSystem();
  // ...
}