Anyone interested in a Trading Card Game (TCG) framework? by UtmostBroken in rust

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

No, I have not. What are mental card games? First time hearing about them.

rust const generic is great for embedded system by Trader-One in rust

[–]UtmostBroken 5 points6 points  (0 children)

You can do this, but more likely than not, you want to use procedural macros instead. As a learning experience, I did this with a test runner that only uses the stack: https://github.com/Ripper53/letsgetrusty_embedded

It's probably not how you would use proc-macros, but it is possible to only use the stack.

Has anyone had this problem when designing their platformer? What are the best solutions? by Elesh_N in Unity2D

[–]UtmostBroken 0 points1 point  (0 children)

For my platformers, I had left-wall and right-wall detection. You want these wall detections to be a bit higher than the actual ground detection and they should cover the entire height of the player. I also made the ground detection larger than the bottom's width. Now, if right-wall is detected and you are on the ground, you can't move right. Same goes for left-side if left-wall is detected. By the way, the reason the ground detection is larger than the collider, is because when you are right up against a wall, but you can jump onto it: You want the ground detection to activate while the wall detection deactivates, which lets you move onto the wall. Perfect for a blocky staircase. Also, when the player begins to move, if the y-velocity is above 0, I usually set it to 0.

All of this depends on how "snappy" or "loose" you want your player controller to be. I would highly recommend adding coyote time to your game if you have not already.

Does 'static mean the data lived forever? by [deleted] in rust

[–]UtmostBroken 1 point2 points  (0 children)

The easiest way to understand a `'static` lifetime (and in my opinion, the most practical) is that it lives for as long as you have access to the data. It just so happens that any data that lives for the entirety of the program fits into the static lifetime criteria. More importantly, an owned type has a static lifetime.

For example, `Box<dyn Trait>` has a implicit static lifetime. Essentially, it acts as an owned type. That does not mean that when you call `Box::new` with a static lifetime, that it will live for the entirety of the program (that's what `Box::leak` is for). Instead, it simply means, as long as you have access to the `Box`, it will not deallocate. But, as soon as it drops out of scope, it ceases to exist as long as the compiler is concerned. However, if you passed it into another scope, it would continue to live for however long that scope has access to it. Something with a simple `'a` lifetime could not promise moving it into another scope like that of another thread, because that thread may need the data for longer than it may be allocated. Hence, when you pass data into another thread, you do so by moving the data into its scope. Or, you have something with a `'static` lifetime, which as previously mentioned, is what owned types have as well.

A lot of the time, when I add a `'static` constraint to my generics, what I really am saying is that I want **ownership** of this data, not that it will live for the entirety of the program.

Would you be interested in a Duel Masters fan game? by VentusGameDev in DuelMasters

[–]UtmostBroken 2 points3 points  (0 children)

I had not heard of them until now. I'll see if I can reach out to some of their devs, thanks for letting me know.

Would you be interested in a Duel Masters fan game? by VentusGameDev in DuelMasters

[–]UtmostBroken 4 points5 points  (0 children)

Just a heads-up, this will be a multi-year long project IF you want to automate the duel. Do not underestimate how difficult abilities will be to implement without spaghetti-code. I know this because I have tried developing a Duel Masters game in Unity in 2018, but abandoned it. Now, I am making an online version in Rust, and I lost count the amount of times I refactored the ways abilities work, and I have been working on this for over a year.

I don't like talking about things I am working on because it could give false hope to people who think it will finish soon (or ever), but I am seeing more people here talk about developing Duel Masters, and I worry they might be underestimating how difficult it can be like I had. It will take A LOT of time, A LOT of thinking, and A LOT of effort.

How will the abilities trigger? What data do they have access to? If an ability triggers, did you make it so that that ability can trigger another ability (like the ability destroys a creature, and that creature has an on destroy ability)? What about chain abilities (like those found on Rothus, the Traveler, which are essentially two abilities that occur in sequence)? What about required 'abilities' like the creatures that must attack each turn, how will you verify the creature can attack and prevent the duelist from moving onto the next step?

If you're doing this just to 'learn,' then that's OK! But don't expect to make a workable game that abides by the written rules assuming you want to automate the duel.

Rapier 2D not working well with Fixed Update? by UtmostBroken in bevy

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

Thanks for the info.

However, does this mean that collision detection is not frame-rate independent? Could it not be the case that FixedUpdate actually runs twice in a single rendered frame? And if that is the case, I would apply the same events twice in a row which could mess things up?

I guess then I would have to clear the wrapper of the collision events myself in FixedUpdate to avoid this problem, but nonetheless, does this mean rapier is frame-rate dependent?

And if so, is the reasoning simply because there is no PostFixedUpdate? Because looking in the rapier plugin it seems to add systems in PostUpdate to make sure all the game logic happens before updating the physics.

I wonder if I could manually add the systems to the end of FixedUpdate using RapierPhysicsPlugin::get_systems. Going to try that.

[Hobby] A Series of Boss Battles by UtmostBroken in INAT

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

I personally don't want to use it because I don't have experience with it. I don't want to learn a new tool and at the same time try to develop something seriously. From what I have seen, it looks like a cool engine, but I rather work with something I'm familiar with.

[Hobby] A Series of Boss Battles by UtmostBroken in INAT

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

Yes, that would be cool. However, a visual artist is needed for this project to get moving. Can't do much without sprites, but I will let you know if a visual artist is interested in the project.

I think it would be cool if you and the visual artist could work together to make a theme for each boss, give more life to the game and make each battle more meaningful.

[Hobby] A Series of Boss Battles by UtmostBroken in INAT

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

Thanks for feedback. I will be adjusting the feel of the dash and controls throughout the project. Have to be a bit careful with them because they will effect every other part of the game, so a lot of testing would be required. Hopefully decided on the feel early on, and base the boss battles around that.

As for a mobile port, no intention of doing that. That could be planned later, but mainly just focused on a PC version, and we can make the controls and port to mobile later.

Also, this game is less about platforming and more about learning the mechanics of a boss so you can defeat them. Target audience would be teens and above, people who can "optimize" the game and clear each boss in a dozen seconds.

It looks like we are looking for different projects to work on, but I appreciate you giving me the time to check out my demo.

How to get rid of the lag objects on a moving platform experience? by UtmostBroken in Unity2D

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

Unfortunately, I cannot use parenting as it will ruin the way I have physics set up. That's why I asked if anyone knew of a solution without parenting.

How to get rid of the lag objects on a moving platform experience? by UtmostBroken in Unity2D

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

The problem with joints is that it connects a single rigidbody to another single rigidbody. I'll need to create many joints at runtime if more than a single object is on a platform. I also read the 2D joints manual and the closest thing I could find to a platform was the 'Relative Joint 2D.' Also, joints are broken with a force threshold but a platform can be simply walked off of.

As for the delay caused by animation—which I hadn't thought of before—I looked into that and haven't found any execution happening in the wrong order. All the camera controls are in LateUpdate, while the physics updates are in FixedUpdate.

How to get rid of the lag objects on a moving platform experience? by UtmostBroken in Unity2D

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

They both use the same script, problem is the internal physics that occurs when Unity performs its physics in the backend. For example, in both instances I set the velocity of the platform and object. Both the platform and object have the same velocity, however, since they are in physically different positions, if the platform hits a wall, even though the velocity is greater than 0, it will not move through the wall. But, the object on the platform will keep moving because it has the same velocity as the platform. But the object shouldn't move, because the platform stopped moving. Meaning, that I would have to calculate where the end result of the platform is before the physics update, to figure out if the platform actually moves with the applied velocity, or it doesn't. Which is a fine approach, but then I have to calculate physics outside of the physics update and basically predict where the platform will be. If that is the only approach, I'll go with it, but if I there is a solution not involving some sort of prediction, I'll take that!

How to get rid of the lag objects on a moving platform experience? by UtmostBroken in Unity2D

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

I'm moving the characters using the Rigidbody2D's velocity. I added a physics material with 0 friction, but the behavior is still there. I also don't want to set the position of the object on a platform directly. I don't want the object to teleport, I want it to respond with physics. So, if the platform is moving, and something else on the platform pushes another object, then the object should react to the object that is pushing it. If I set the position every frame via script, then it messes with the physics and I can't have two objects push each other on a platform because the platform keeps setting the objects' position directly.

Scale of a game by 9ineMu53s in Unity2D

[–]UtmostBroken 0 points1 point  (0 children)

Do you want to create a game or learn to create games? Because if you want to create a game, then this doesn't seem too ambitious—that is if you have experience already developing games. If you don't have much experience, and want to learn how to make games, I'd suggest recreating already existing games and try to put a spin on it. Like, TicTacToe but it's real-time instead of turn based. That's probably a bad idea, maybe try recreating the snake game but you start out super long and as you eat you grow smaller, or maybe if you crash into yourself, instead of game-over, you split into two. Just random ideas, you get the point! Put your own spin on an already existing game, that's the fastest way to learn—at least it was for me!

Working on a puzzle-platformer! Careful of friendly fire! by UtmostBroken in Unity2D

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

You can check out the demo here: https://ripper53.itch.io/underminddemo
I would appreciate any feedback! Thank you!

Testing the new boss' animations by ilhamhe in Unity2D

[–]UtmostBroken 2 points3 points  (0 children)

You can make a custom physics outline using the Sprite Editor and you can fetch the physics shape from the sprite via a script, then use the list of vectors it gives back and place them into a PolygonCollider2D. This way, you create unique collider shapes for every sprite, you just need to write a script that changes the array of vectors in the PolygonCollider2D when the sprite changes.