|
So I made this left-right walk cycle and it seemed to glitch all over the place when the character moved, but when I played the sprite animation without moving it it was fine. Turns out the character had a little extra side bobbing to its head and shoulders, and Unity crapped its pants 'cause it had to render two different horizontal movements simultaneously. So my character will have to stricly bob up and down vertically as he's walking just so it doesn't look like the video card is taking its last stuttering breath when he walks around. Unityyy!!!
|
# ? Feb 17, 2015 16:40 |
|
|
# ? Apr 27, 2024 23:37 |
|
KRILLIN IN THE NAME posted:This is the coolest box art. I have to go, my planet needs me. Background died on the way back to his home planet.
|
# ? Feb 17, 2015 16:53 |
|
Oh precious katana posted:We have been doing all kinds of things with Stupid Survivor since last time I posted something. Not bad, it looks pretty good when everything comes together. A suggestion; change up the visual of the UI element on the far right (victims remaining/saved?), it looks a tad squashed. If the victims have distinct faces, maybe just use those? The room still looks a little bare in some places. I think all it really needs though is baseboard/skirting to help contrast the walls and the floor.
|
# ? Feb 17, 2015 17:12 |
|
My artist sent me this as an example of the art style he's going for. I'm smitten.
|
# ? Feb 17, 2015 17:33 |
|
KRILLIN IN THE NAME posted:This is the coolest box art. https://www.youtube.com/watch?v=imamcajBEJs
|
# ? Feb 17, 2015 17:36 |
|
I think that's a really, REALLY good way to change level gfx/progress to the next level, actually
|
# ? Feb 17, 2015 17:44 |
|
KRILLIN IN THE NAME posted:This is the coolest box art. (which would cause a small amount of pointless perf cost / make sure you render it last to take advantage of quick z rejection and not overdraw, assuming you're on mobile - or just toggle it off when not in a transition state)
|
# ? Feb 17, 2015 18:21 |
|
Omi no Kami posted:Speaking of graphics, where the heck do you get started? I've been trying to take games I like and consciously break down what was accomplished with textures versus shading versus lighting and so forth, and 90% of the time I have absolutely no idea what I'm looking at. Is there any kind of generalized guide in the form of "Here is every basic graphics element that modern games use, here's how most people use them to complement each other, here are several dozen books on advanced usage"? You could try loading up some free assets in Unity (something that just uses a regular specular/bump map I'd say), try seeing how it looks when you turn off the diffuse or normal elements, then open up their texture files in a 2D program and have a look, edit them, etc. Then you can re-import the edited stuff into Unity, play around more, and get an intuitive feel for things. Normal maps don't make a lot of sense if you look at them outright, until you isolate the RGB channels. Regardless of that, Normals are usually created by a software program (Wings 3D + XNormal is a good free combo to play with) and are rarely painted on a lot. Then just Wikipedia/Google everything. *edit* Oh, duh, this page is a brilliant resource: http://simonschreibt.de/game-art-tricks/ Locus fucked around with this message at 18:53 on Feb 17, 2015 |
# ? Feb 17, 2015 18:25 |
|
For normal maps I typically used GIMP in conjunction with a normal map plugin someone made for it (located here), that's served me ok for the most part. Speaking of plugins, I've decided to take a crack at taking an older game of mine that I made a couple years back as a prototype (my vertical shooter, Ablation) and turning it into something full-fledged for PC and other platforms (namely Android and Fire TV). I've mostly just been doing rough prototyping of stuff, trying to get a handle on the way Unity does its 2D stuff as well as how that looks on mobile platforms. I've seen in various places some people say that 2D Toolkit is still a good investment for 2D Unity development even with Unity's native 2D integration, because of things like tile maps and such. Before I go and spend money on 2D Toolkit though, I do have a couple questions. One of the inspirations for my game, among other vertical shooters, was the Raiden series. Raiden II had this interesting little touch where ground elements could get damaged by enemies falling to the ground, bombs, boss enemies stepping on things, etc, as seen here (timg, click for big). My question is if it's possible to do something like this in Unity using tile maps (be it 2D Toolkit or another method), perhaps by layering one on top of another, or if I should consider a different way of constructing my levels. My second question is whether or not 2D Toolkit or something like it has methods for scaling things properly with different screen resolutions and possibly aspect ratios. This one isn't as important, since I seem to have an implementation that works, but it feels a bit janky at times.
|
# ? Feb 17, 2015 18:53 |
|
Mr Underhill posted:So I made this left-right walk cycle and it seemed to glitch all over the place when the character moved, but when I played the sprite animation without moving it it was fine. I think you should be able to fix this by unchecking "apply root motion" in the animator on your character. When you have that selected (which I think it does by default), it takes into account changes in position caused by the animation and applies that as movement, so if you've got your own movement happening it'll conflict.
|
# ? Feb 17, 2015 19:14 |
|
Locus posted:*edit* Oh, duh, this page is a brilliant resource: http://simonschreibt.de/game-art-tricks/ This is an extremely good website.
|
# ? Feb 17, 2015 19:21 |
|
Angry_Ed posted:For normal maps I typically used GIMP in conjunction with a normal map plugin someone made for it (located here), that's served me ok for the most part. I'm not very familiar with Unity so I don't know if there's a simpler way but I accomplish stuff like this (i.e. jumping in a Zelda-like) in 2D games by giving everything that interacts in the map a "Z-level" variable. It's like a little cheat that simulates 3D space on a 2D plane. Say you fire a bomb, for example. For this, our player plane's default z-level is 500. The bomb can initialize with a z-level slightly below that, such as 475, and you can code it to decline at an accelerating rate until it intercepts something in its bounding box that is also within its z-level with a margin of +/- 20. If there's a building in your line of fire and you determine its height (and hence z-level) is 50, the bomb will fall until it reaches a z-level of 70 and from there you can initialize an explosive collision and reduce the building's health or outright destroy it. Of course this example relies on the building affected being capable of object-oriented manipulation, and while I don't know 2D toolkit at all it seems unlikely that tiles have that property.
|
# ? Feb 17, 2015 19:44 |
|
The Cheshire Cat posted:I think you should be able to fix this by unchecking "apply root motion" in the animator on your character. When you have that selected (which I think it does by default), it takes into account changes in position caused by the animation and applies that as movement, so if you've got your own movement happening it'll conflict. Thanks for that! Gonna pester our programmer with that first thing in the morning.
|
# ? Feb 17, 2015 19:49 |
|
a medical mystery posted:I'm not very familiar with Unity so I don't know if there's a simpler way but I accomplish stuff like this (i.e. jumping in a Zelda-like) in 2D games by giving everything that interacts in the map a "Z-level" variable. It's like a little cheat that simulates 3D space on a 2D plane. Yeah I wasn't thinking of something quite as complex, mostly just replacing sprites with other sprites (i.e. having a "healthy" building tile and a "destroyed" building tile for each building part). Though yeah if I can't really have tiles be manipulated on an object-oriented basis then I'm going to need a different approach.
|
# ? Feb 17, 2015 20:03 |
|
I'm pounding my head against a wall in Unity. I'm trying to make a bar that oscillates and hitting a button causes the bar to freeze and an object to be launched with power based on how full the bar is. I've got the oscillation and the freezing down, but the object just isn't being launched. Relevant bits: public class BarScript : MonoBehaviour { public GameObject busPrefab; // Public bus prefab public float speed = 20f; //Speed of the bar bool isMoving = true; Vector2 targetPosition; public float barMax = 5f; public float barMin = -5f; float fullForce = 2f; Vector2 barNow; Vector2 targetMax; Vector2 targetMin; void Start () { targetMax = new Vector2 (barMax, transform.position.y); targetMin = new Vector2 (barMin, transform.position.y); targetPosition = targetMax; } void Update () { //The bar moves towards its target. if (isMoving == true) { transform.position = Vector2.MoveTowards (transform.position, targetPosition, speed * Time.deltaTime); } //If it hits the rightmost x position, start moving it left. if (transform.position.x >= targetPosition.x) { targetPosition = new Vector2 (targetMin.x, targetMin.y); } //If it hits the leftmost x position, start moving it right. if (transform.position.x <= targetPosition.x) { targetPosition = new Vector2 (targetMax.x, targetMax.y); } //If it's moving and a button is pushed, stop the bar and apply force to the bus. if (Input.GetButtonDown("Fire1") && isMoving) { // Stop movement isMoving = false; //Create force by multiplying maximum force by the percentage along the bar. Vector3 pushForce = new Vector3 ((fullForce * (barNow.x/(targetMax.x - targetMin.x))), 0, 0); //Apply the final force to the bus. Rigidbody2D busBody = busPrefab.GetComponent<Rigidbody2D>(); busBody.velocity = Vector3.zero; busBody.AddForce (pushForce); } } } The bus just sits there. I have a feeling I'm probably missing something really obvious. The bus Prefab is definitely plugged in.
|
# ? Feb 17, 2015 20:09 |
|
demota posted:The bus just sits there. I have a feeling I'm probably missing something really obvious. I don't see you setting barNow anywhere.
|
# ? Feb 17, 2015 20:12 |
|
You copied a whole ton of code that isn't really needed. Magic happens here:code:
Debug! Work your way through, eliminate possible problems. If pushForce is zero, then the problem is that fullForce or barNow.x or (targetMax.x - targetMin.x) is zero. If pushForce is non-zero, then something is wrong with Vector3.zero or .addForce on busBody. Also, its nitpicky but its bothering me; the two if conditions for moving left and right should probably be an if-elseif Zaphod42 fucked around with this message at 20:18 on Feb 17, 2015 |
# ? Feb 17, 2015 20:16 |
|
Unintentional bugs become features: Implemented banking when my fighter turns, but the return to level flight sometimes goes the long way round, leading to a kind of aileron roll. With the addition of the engine trails, I think it works pretty well.
|
# ? Feb 17, 2015 20:41 |
|
Will do! I am super rusty at this. Set barNow. pushForce is non-zero (though not the numbers I'm expecting, so that'll need some tweaking), so it's gotta be in velocity or addForce. AddForce and velocity work fine as written if I put them directly in the bus script, so something isn't getting passed... demota fucked around with this message at 22:46 on Feb 17, 2015 |
# ? Feb 17, 2015 22:18 |
|
Pi Mu Rho posted:Unintentional bugs become features: That's a barrel roll and you know it.
|
# ? Feb 17, 2015 22:47 |
|
Zaphod42 posted:That's a barrel roll and you know it. It's only a proper barrel roll if it deflects enemy projectiles.
|
# ? Feb 17, 2015 23:17 |
|
I'm going to have to make the player able to do barrel rolls now, aren't I? Actually, my original design doc when it was more space-sim like called for being able to roll to the side with a double-tap, so it's still close.
|
# ? Feb 17, 2015 23:44 |
|
You should look to maybe mimic the effect from Luftrausers where the plane turns on it's side depending on which way it's flying. Not sure how it would work in space but worth a look. http://luftrausers.com/
|
# ? Feb 17, 2015 23:55 |
|
Galak-Z has the same effect. That game needs to come out yesterday. HiriseSoftware fucked around with this message at 00:25 on Feb 18, 2015 |
# ? Feb 18, 2015 00:12 |
|
poemdexter posted:You should look to maybe mimic the effect from Luftrausers where the plane turns on it's side depending on which way it's flying. Not sure how it would work in space but worth a look. I think that's more suited to a side-on view, but it's certainly do-able.
|
# ? Feb 18, 2015 00:27 |
|
Locus posted:*edit* Oh, duh, this page is a brilliant resource: http://simonschreibt.de/game-art-tricks/ Thanks for that also from me, great reading.
|
# ? Feb 18, 2015 00:31 |
|
poemdexter posted:You should look to maybe mimic the effect from Luftrausers where the plane turns on it's side depending on which way it's flying. Not sure how it would work in space but worth a look. Fun fact: The plane sprite never actually rotates on that axis at all. Only the wings change.
|
# ? Feb 18, 2015 00:31 |
|
Hello. Can I interest you in 5 counts of Skeleton Immunity (I'm really happy with the little swing effect when the skele gets near)
|
# ? Feb 18, 2015 01:49 |
|
KRILLIN IN THE NAME posted:Hello. Can I interest you in 5 counts of Skeleton Immunity Add a followthrough swoosh and a random 80s style POW BIFF BAM and you have a winner.
|
# ? Feb 18, 2015 01:56 |
|
There is a little swoosh but it's not very prominent. I think it would visually look better if the swoosh was the same color as the shield. I think in animation it's called a smear.
|
# ? Feb 18, 2015 02:48 |
|
I'm working on a real-time roguelike in unity which uses text and tiles, and right now I'm using Strings to display the tiles, but I've found that editing all the tiles in one big string is SUPER slow, and takes a ton of processing time to update it (even only when necessary like when the character moves) and it also triggers garbage collection a lot. It only uses one draw call to display the big block of text, but the character moves around quickly so it bogs down the CPU just making the gigantic string. With the huge string method it's faster while the player is standing still (because there's only one draw call), but I have to grab all of the lines from the world map data and do something like displayedTiles += worldMapData[yPosition].SubString(xPosition, screenWidth); for each line to make the big string that gets displayed. This ends up being super slow because it has to be updated frequently while moving and causes hitches. I found it's actually faster to split the string up into separate strings by each line and update each line individually, BUT there are now a TON of extra draw calls to just display each individual line of text on the screen. Is there a better way to do this though? If there was some way I could grab all of the tiles I needed in just a couple String edits while using just one draw call that would be much better. Mercury_Storm fucked around with this message at 07:00 on Feb 18, 2015 |
# ? Feb 18, 2015 06:08 |
|
HiriseSoftware posted:Galak-Z has the same effect. That game needs to come out yesterday. Played the hell out of a build during Fantastic Arcade last year and good god were the controls just impossible. It's one of those games that are going to take you a few hours to master.
|
# ? Feb 18, 2015 06:10 |
|
Mercury_Storm posted:I'm working on a real-time roguelike in unity which uses text and tiles, and right now I'm using Strings to display the tiles, but I've found that displaying all the tiles in one big string is SUPER slow, and takes a ton of processing time to update it (even only when necessary like when the character moves) and it also triggers garbage collection a lot. It only uses one draw call to display the big block of text, but the character moves around quickly so it bogs down the CPU just making the gigantic string. With the huge string method it's faster while the player is standing still because there's only one draw call, but I have to grab all of the lines from the world map data and do something like displayedTiles += worldMapData[yPosition].SubString(xPosition, screenWidth), which ends up being super slow because it has to be updated frequently while moving and causes hitches. Strings are immutable and what you are doing is utterly insane. You're getting awful hitching because of all that text; While it's fun and nice to have a single draw call, the garbage collector is absolutely demolishing any benefit you're seeing from one draw per enormous string. Use a sprite sheet with all of the letters your monsters, treasures, and walls need - they'll be batched and you won't have to worry about losing frames. Plop down some gameobjects to represent your levels instead of generating the character-count of War and Peace every second. Instantiating is Satan or whatever, but you're way better off generating 80x25 objects once to emulate the dos prompt than trashing a massive string every few miliseconds.
|
# ? Feb 18, 2015 07:21 |
|
Is there anything I can use for 2D games these days where I can mess around with the screen buffer/shaders without needing to drop $1500 on a pro version of the tools? It's looking and feeling like Javascript is my only option here. Argh.
|
# ? Feb 18, 2015 07:31 |
|
poemdexter posted:Played the hell out of a build during Fantastic Arcade last year and good god were the controls just impossible. It's one of those games that are going to take you a few hours to master.
|
# ? Feb 18, 2015 08:11 |
|
al-azad posted:There is a little swoosh but it's not very prominent. I think it would visually look better if the swoosh was the same color as the shield. I think in animation it's called a smear. Smearing is the right term. It's usually used as a way to explain a large motion from point A to point B that wouldn't work without something in the middle and is just too fast for an actual movement. The thing to remember with swooshing, particularly in games, is to sell the everloving gently caress out of them. It is easy to dial back on an overdone animation, but difficult to actually overdo them. This link has a great interactive bit showing all of the parts of an attack. Personally I think this is overdone for the scale they're working at, but it'd probably look pretty okay zoomed out. http://benruiz.net/aztez/impacteffects_poc.html
|
# ? Feb 18, 2015 10:26 |
|
KRILLIN IN THE NAME posted:Hello. Can I interest you in 5 counts of Skeleton Immunity I like it and it's really cute (as is the whole game), but I did a little tweak: Your version as it is: My slightly tweaked version: I added the shield swung effect right at the frame when the skele makes contact, so it's more of a baseball like feel with the shield connecting with the skele, rather than the original which looks like she's swinging the shield away after the skeles gone flying. I also added a couple frames of tweening for the shield 'stowed' and 'shield ready' states.
|
# ? Feb 18, 2015 11:59 |
|
Rotating camera and dynamic trails. https://www.youtube.com/watch?v=SQy1re1SwOk Next up: things to get shot by
|
# ? Feb 18, 2015 12:23 |
|
KiddieGrinder posted:My slightly tweaked version: That's really slick, thanks for the tip! Tricky part will be figuring out how to implement this - Fusion 2.5 has a limited number of reference co-ordinates (2 per sprite), one used for the base sprite itself and one used for the hat(s). The shield lowered is a separate sprite with it's x/y position 'baked' into the animation and synced up with the player's left hand, while the shield stowed is a different version of the player sprite. Having the swing sync up with the player motion will probably take some tinkering. (I actually added the subtle animation smear in to kind of give the illusion of a swing as a workaround.)
|
# ? Feb 18, 2015 13:28 |
|
|
# ? Apr 27, 2024 23:37 |
|
I think it would also make sense to think about having her dash through the skeleton instead of taking a hit and getting back up to speed, ie move her forward instead of backward.
|
# ? Feb 18, 2015 14:35 |