HellBlazer
Member
Is this a turn-based beat-em-up RPG?
I do believe the word I am looking for is Rad
Rad.
Is this a turn-based beat-em-up RPG?
I love those character portraits, and that breakdancing move looked beast.
Anyone got tricks for one-way colliders in Unity? I came across one idea to use a mesh collider and control the direction using the mesh normals. Seems like a decent way to go, but I'm curious to see if others have tackled it a different way.
Anyone got tricks for one-way colliders in Unity? I came across one idea to use a mesh collider and control the direction using the mesh normals. Seems like a decent way to go, but I'm curious to see if others have tackled it a different way.
I learned about something non-obvious in C/C++ yesterday. As far as I'm aware, it's standard behavior and works in C/C++ compilers.
char x = 2["Test"];
The result is that x is equal to 's'.
This is apparently because array indexing like this is treated as follows:
pointer[2] == *(pointer + 2) == *(2 + pointer) == 2[pointer]
Using string literals makes it even more confusing-looking, so:
"Test"[2] == 2["Test"]
I like it because some people like myself might internalize the idea of array indexing as "This thing is an offset into this other thing", when the reality is presumably just pointer math to produce a result address, which is then dereferenced.
Quick look reveals a child trigger box approach. Platform collision is toggled by enter & exit of child trigger box: http://answers.unity3d.com/questions/362021/eficient-one-way-collider.html
Seems pretty good! Might have to be careful with jump speeds and trigger box sizes, but should work okay.
Thanks for the input guys! I think I'll give the trigger box approach a shot.I tried this approach for a while before abandoning it, the problem is it sort of works but can result in the collision suddenly resolving and popping all the way through. Since it was so close to working I tooled around with it for a while before abandoning it and checking for the characters position and switching colliders on and off based on where they were.
Using trigger volumes is also a strong way to do it, but in my case I was making a platformer with platforms you could jump through from underneath, so knowing the character was above or below the platform was all I needed. (in the end I ended up having to retrofit co-op gameplay, and toggled layers a lot - when one player was above the platform but the other wasn't, I had to switch the platforms layer to one that collided with the first player but not the second. Had a fun little matrix going. Good thing no one was asking for four player...)
I've been making progress on my game! Added the last of the unique basic enemy types! It's a skeleton guy who can teleport around and fires lasers at your current position.
he ended up working pretty well since he'll just jump around and try to snipe you whenever he gets the chance. I also want to do a variant who still teleports but will spam bullets instead. They should be a fun pair.
No need for extra colliders. Just check to see where the player is in relation to the platform collider and switch it on/off as you need. If other objects are needing to use the platform to stand on just exclude the player from collision until the player is above the object. Ideally, you want to have it on at all times until the player gets close enough from underneath, switch it off, then when the player gets Y distance above the object, switch it on. No extra collider's needed.Quick look reveals a child trigger box approach. Platform collision is toggled by enter & exit of child trigger box: http://answers.unity3d.com/questions/362021/eficient-one-way-collider.html
Seems pretty good! Might have to be careful with jump speeds and trigger box sizes, but should work okay.
I tried this approach for a while before abandoning it, the problem is it sort of works but can result in the collision suddenly resolving and popping all the way through. Since it was so close to working I tooled around with it for a while before abandoning it and checking for the characters position and switching colliders on and off based on where they were.
Using trigger volumes is also a strong way to do it, but in my case I was making a platformer with platforms you could jump through from underneath, so knowing the character was above or below the platform was all I needed. (in the end I ended up having to retrofit co-op gameplay, and toggled layers a lot - when one player was above the platform but the other wasn't, I had to switch the platforms layer to one that collided with the first player but not the second. Had a fun little matrix going. Good thing no one was asking for four player...)
I've been making progress on my game! Added the last of the unique basic enemy types! It's a skeleton guy who can teleport around and fires lasers at your current position.
he ended up working pretty well since he'll just jump around and try to snipe you whenever he gets the chance. I also want to do a variant who still teleports but will spam bullets instead. They should be a fun pair.
I'm also intrigued by one-way platforms, since computing which objects can go through it on a case-by-case basis is way too resource-intensive, but using layers would become a nightmare as things would go out of hand quickly with each added actor that interacts with them.
I've been thinking about giving the platform a trigger collider that begins just below the platform's surface (so objects that are standing on it don't touch the trigger), and using the OnTriggerEnter and OnTriggerExit events to, somehow, add the colliding object to a list of objects that can be allowed through, and remove it from the list when it's no longer touching the trigger. Taking a look at the Physics system just now, I see a Physics.IgnoreCollision method which'd probably work, but there doesn't appear to be an UnignoreCollision one to make the player hit the platform again...
Amazing! I had a blast playing AAC with my cousin a while ago, since I'd rather not play it alone as it's infinitely more fun in multiplayer. It's the first game I've ever bought Early Access on, and it's great to see it coming along so nicely. Can't wait for the full game!
Does player raycats above the player intersect with collider tag ?
If yes, allow object with player tag to pass thru.
Does the player raycast below the player intersect with collider tag?
If yes, allow object with player tag to collide.
No extra anything. Just use tags and raycasts and include/exclude collision by tag "player" or whatever you call him
Hey guys, I just released the first public alpha for Another Castle, including a free web version. You can check it out at http://www.AnotherCastleTheGame.com and let me know what you think!
Also, here's a baby fire dragon
You dont need to do anything wacky for collisions with walls. If you are raycasting from the player in multiple directions then the only thing you can allow is movement along vertical raycasts and intersections with walls stop the player as they should. Its just what's under the player's feet we are looking for.Oh, that'd certainly work, but since the player would be doing the collision checks, you'd have to do some wacky stuff if you ever wated to make one-sided platforms that can't be passed through from below, or from either side. Moving the checks to the platforms themselves to make sure each object controls itself only would increase the order of complexity from <number of objects that can go through one-way platforms> to <number of one-way platforms>, and mere raycasts wouldn't be enough since a platform's dimensions would require checking against a cube instead.
I'm just trying to think of an implementation that's as versatile as possible here, but I'd say your algorithm works perfectly fine for most cases.
Talking about platforms, does anyone know what's the best algorithm to use for making an object move alongside one? Unity's default FPSController appears to do it on its own, even keeping the platform's momentum when the player jumps off of it, but I haven't checked it out much since it's written in JS.
You dont need to do anything wacky for collisions with walls. If you are raycasting from the player in multiple directions then the only thing you can allow is movement along vertical raycasts and intersections with walls stop the player as they should. Its just what's under the player's feet we are looking for.
Its probably more difficult to implement with Unity's controller and collision but we write our own controller, physics and collision to offset these issues in the event we need to add or change functionality we have the ability to do so late in development without breaking the rest of the game. So if you are using built in controller and such it will be a bit more of a workaround to add functionality. Rolling your own methods is preferred, IMO.
Its not messy. This is what tags are for. If you raycast to check for collisions in various directions you can simply tell the player and physics to behave a certain way based on what it collides with and distance to/from collision. There's nothing to implement on individual gameobjects other than a TAG and far easier to control from a single object that just does checks for specific tags then switches a bool or performs a method depending on the check.I mean, each implementation for one-sided platforms would have to be different, since the ones we've talked about so far only use collisions when the player is above them, but perhaps you might want to make platforms that the player can't move through from below or the sides. What I was getting at was that having the player object handle those colissions could lead to sloppier and less modular code, as opposed to letting the platforms themselves tell each actor whether they're solid for them or not.
Still, I'm asking this more for research's sake than anything else, because I'm still trying to wrap my head around implementing these kind of physics systems I've let Unity handle for me so far.
Its not messy. This is what tags are for. If you raycast to check for collisions in various directions you can simply tell the player and physics to behave a certain way based on what it collides with and distance to/from collision. There's nothing to implement on individual gameobjects other than a TAG and far easier to control from a single object that just does checks for specific tags then switches a bool or performs a method depending on the check.
Tag FromBelow - one way UP
Tag FromTop - one way down
Etc.
The player is the only place you need to do checks. You dont have to create multiple platforms. I can take the same prefab platform and place it 20 times in my level and just change the tag and poof, the character's behavior acts accordingly to whatever I have him do depending on raycast intersection with Tag A, B, C, D, etc. This is what I mean about having flexibility to add or remove gameplay elements at will without breaking your game. At most when removing or adding a feature you just Click, change tag from the drop down since all methods are bound to the player and not individual objects. Tags are powerful as hell. No extra colliders, no custom code for every object you need to perform a certain way, just tags and the player script that looks for specific tags to do specific things. All your important code is in one place and you can edit to effect any way you like. I love me some tags, yo.
It's just IgnoreCollision itself. The third parameter is the bool to set ignore/unignore.Taking a look at the Physics system just now, I see a Physics.IgnoreCollision method which'd probably work, but there doesn't appear to be an UnignoreCollision one to make the player hit the platform again...
It's just IgnoreCollision itself. The third parameter is the bool to set ignore/unignore.
looks nice!
plus looks like someone is paying attention to GAF:
http://indiegames.com/2014/02/another_castle_is_still_coming.html
As a tidbit, this function was forgotten about in Physics2D In Physics2D you can only ignore by layer :/
Can I set custom names for Unity's editor variables? In my script I have a var fHealth and Unity displays it as FHealth in the editor ._.
I think it's more of a factor of "our totally different physics engine for 2D doesn't have that option"
Good luck with thatI'm going to get every damn Unity user to stop using Unity's built in physics, collision and player controller if it's the last thing I do!
What do you guys think of this? (Ignoring the fact that it's playing at 16 fps).
I was contemplating adding some dust, rain, or other weather effects. Too much? Not enough? It's likely to be the first "cinematic" shot after starting a new game, so if take a bit longer making it look better, that's okay.
Your game looks cool. Enjoy the venue!So our game, Ephemerid, has been nominated for the SXSW Gamer's Voice Award.
Which means that we get to have a booth at SXSW's "Indie Corner".
Which is cray.
Hm... Looks good, but I'd add something in the grey area. Dust or a forest or things that flesh it out more. It seems a bit... bare at the moment.
Even rain would work to break up the monotony.
Hmm, in my head a forest looks good, or some smaller hills, in typical NES repeating tile fashion, of course.
I think you can do it if you create a custom editor. Of course, making a custom inspector editor for everything is kinda... eh.
What do you guys think of this? (Ignoring the fact that it's playing at 16 fps).
I was contemplating adding some dust, rain, or other weather effects. Too much? Not enough? It's likely to be the first "cinematic" shot after starting a new game, so if I take a bit longer making it look better, that's okay.
Some ref sheet/concept art:
Absolutely beautiful. What kind of game is this going to be for? Action RPG?
Yeah, you would think there was an easier way. Custom Editor is way to cumbersome for something like a simple name change.
Don't know why but this reminds me of an old game called Rush n' Attack (This looks better though).
Damn that would be amazing, but no, these are just for me; they are for some sort of book I think! Probably a graphic novel of some sort
However, working on a ARPG, or CAG would be awesome. I want to!
So.. I made a "flappy bird" game yesterday.
Actually, I guess it's more of a helicopter game (hold mouse button to ascend, release to descend).
Either way, It didn't turn out the way I wanted, I just had to get it out of my system what with all the flappy talk.
Did anyone else make a flappy game?
Flappy flappy flappy.
Wow, this looks and sounds great... but is it me, or do you have to be really lucky not to have an impossible gap at the start?So.. I made a "flappy bird" game yesterday.
The guys I work with, Team Junkfish, did an announcement trailer for our survival horror game Monstrum yesterday.
Have a looky here and let us know what you think .