|
Lucid Dream posted:I worded it weird - I'm trying to do parallax clouds, and I want the clouds to fade into the background as they get further away, but (ideally) I don't want them to show through each other when they overlap. Is there a chance you're overthinking it? You're not really trying to get them to fade away further back, you're trying to tint them to a blue (or a specific color out of a gradient) - just keep the cloud part of the asset opaque, draw them back to front, and use progressively less tint as you get towards the front?
|
# ¿ Feb 23, 2012 15:46 |
|
|
# ¿ May 20, 2024 17:19 |
|
RoboCicero posted:What's the best way to develop for an iPhone on a windows machine? I know that eventually I need a Mac to publish it to the device, but I'd like to put that step off until I actually have to deal with it. Other than using unity as your framework and never getting to test in any real way until you get a Mac... No way. Get a cheap (ish) Mac mini and start right. Save 100 bucks by not buying the dev license until you're ready to test on a real device.
|
# ¿ Mar 31, 2012 03:19 |
|
TJChap2840 posted:I've said this multiple times in this thread, but it doesn't seem to stick. An honest question about this - how does he test (on a simulator or device) or publish a binary to the app store?
|
# ¿ Mar 31, 2012 12:50 |
|
Bocom posted:This, essentially. First of all, as someone else mentioned, don't "push", zero velocity so they can't make the illegal move in the first place. Switching from XNA won't help with this issue either, it's a valid, difficult, issue. It'll be taken care of for you if you use someone's framework but if you want to produce "your own" game - its not impossible to figure out. I'd recommend a series of bounding points, for world collision. Using radiuses will not allow you to move smoothly along a wall, you'll get tucked into corners between tiles. Use a series of points to test collision and do not use corners (since this will lead to sticking problems). Ive used two points per edge, offset inward by a few pixels, tested directionally in the past.
|
# ¿ Jul 16, 2012 12:32 |
|
Orzo posted:These solutions don't work unless you're processing movement pixel by pixel--otherwise your game will feel blocky and clumsy, because you'll be in a situation where let's say you want to move a character 5 pixels to the right and you can't because there's a collision 3 pixels away. The correct behavior is to move the object 3 pixels according to the collision resolution, instead of just stopping the object. That is quite correct! Especially with time based movement instead of pixel based movement, different dts would have you bouncing around if movement just stopped. Moving the correct amount to the collision point is the right way to go.
|
# ¿ Jul 16, 2012 18:16 |
|
Physical posted:I'm in C# in a unity function doing the following: I think Input.GetKeyDown takes a Key not a KeyCode, as in - superh fucked around with this message at 16:13 on Feb 8, 2013 |
# ¿ Feb 8, 2013 15:05 |
|
KoRMaK posted:After I got my AI up I kept wondering "how the hell do I make this more entertaining" because basically the AI gets up next to you and mashes its attack. You make the AI hold off and not attack all the time. Make it run away for a bit and do stupid things too. This is the hardest part, it's easy to make an unbeatable unfun AI but it's better to make one that's more complicated and more "realistic." In Street Fighter if you get hit you're interrupted and "stunned" in a hit state very briefly, a tiny fraction of a second, but if you get hit enough times you enter a real "stun" state. I think whether or not this feels "bad" in the game comes down to how long you stay in this state.
|
# ¿ Mar 26, 2013 16:15 |
|
MrSamurai posted:Make sure that your prefab field is public. Also worth trying to run your project and see if it gets updated in unity (I've noticed the inspector is slow to update code changes sometimes) Or, if you haven't finished debugging all classes (even ones you're not worried about at the moment) to remove all errors, the inspector will never update.
|
# ¿ Apr 2, 2013 13:24 |
|
Suran37 posted:Ok, so first of all I might be going about this wrong, but I am trying to make a Beat 'em Up type game in Unity with 2D Toolkit. You're doing it right, but it's a problem with zsorting large planes in perspective projection. I ran into the same thing recently, I solved it by manually setting the render order on sprites, which was a pain, and fairly limiting, but worked ok. I'm on my phone so I don't have the exact information at my fingertips but it involved setting the render queue on each individual material. This is a non issue with orthographic perspective, but you'll miss out on some cool perspective effects.
|
# ¿ Apr 12, 2013 12:18 |
|
Does *something* display, just in the wrong spot, or does nothing display at all? If it's the former, the math finding the screen point is probably wrong. If it's the latter, you might have the math right but you're not creating the element correctly. Can you make damage numbers pop up at a fixed point in the GUI successfully, independent of where they're "supposed" to spawn?
|
# ¿ May 14, 2013 16:16 |
|
Orzo posted:Actually Futile seems pretty decent for Google searches, since it's not a common word. Having worked in 2d Unity it gives me the impression that the author of Futile knew precisely what he was doing when he chose that name.
|
# ¿ May 22, 2013 21:18 |
|
Tendales posted:The end result is what matters, really. Flash has limitations, but if your project doesn't push against those limitations, it's not that big a deal. Binding of Isaac, for example, is the poster child of trying to make ActionScript 2 do way too much. Binding of Isaac is AS2? I'm simultaneously impressed and completely taken aback...
|
# ¿ May 23, 2013 20:19 |
|
poemdexter posted:Can someone tell me what's going on here? http://poemdexter.com/unity-player/xelda-web.html It looks like you're doing pixel art, so you need to change your texture import settings from bilinear filtering to point (no) filtering.
|
# ¿ May 26, 2013 01:40 |
|
Baldbeard posted:Camera woes seiken posted:I don't get it. Isn't this exactly what you wanted to happen? Yeah do this, exactly. Make a camera variable (just a point) and render the whole level off it. Set it to the player position, but clamp it to half the screen width of the outer boundary. Coldrice posted:Whew! I spent the week with c# / unity / futile. I spent the last 2 days working on making tile maps work in futile. I feel really pleased! The results aren't great, but it's results! Really I'm shocked by how much quicker I'm picking up c# then I did obj-c. I think you're having the same problem someone else had just a little bit earlier in the thread - make sure your textures are set to point filtering for pixel art instead of bilinear. It's bleeding. Looks awesome though! I've been playing with futile over the long weekend too, porting an olllllld project from XNA. I'm coming from a flash / haxe background so a lot of the guts of OpenGL and 3d are a mystery to me, but I was wondering if anyone had any suggestion for per-pixel tinting of an image. I was jury rigging something horrific in XNA (each player character pixel was a separate tinted draw...) and I'd like to do something less terrible in unity. Am I looking at shaders? Or is there an easy way to do some dynamic masking in unity?
|
# ¿ May 28, 2013 13:32 |
|
Baldbeard posted:Yeah I had the character within the level, so both were being moved after the player moved independently, causing the player to move twice so to speak. I figured out a a formula that shows the loss caused by this, based on any level/character position, so I have it auto correcting itself. This means that you will have to 2 stage your rendering process in AS3. Instead of setting thing's x and y and trusting that, you only use that as it's screen space position, and you give each object a world space position variable. Then, you run a render(camera) function on each of your objects which sets their screen space position ( spite x and y ) to the world space position minus the camera position. Then you can just move the camera and pan around, set it to the player's position or something else, it won't matter. Easy! Freedom! You'll love it!
|
# ¿ May 28, 2013 22:37 |
|
Baldbeard posted:Yeah, that definitely sounds boss. I think I understand the basic concept now, but I'm not sure how I would go about actually implementing it. World space vs screen space + the camera position is a little much for my feeble brain right now. I would probably need to see an actual example to fill in the blanks. All in due time I guess. I really appreciate you guys taking the time to explain this stuff to me. And sorry for noobing up the thread. No problem! The camera is definitely a weird thing to wrap your head around, at first. Pseudo-code, incoming! So right now you're probably moving things around by stuff like: _player.x += 10; _player.y -= 10; What you're really doing here is controlling both their screen position and their world position, which is not going to be accurate when you get beyond a single screen's worth of content (as I'm sure you're noticing, when you have to offset all the world positions as you move.) What you should do, in each of your world elements, or a base class for all the things in your world, is separate the two concepts into screen position (the x and the y on the object, basically what Flash is using to render the object) and the world position - it's position in the game world relative to all the other objects. So everything gets a Point - for this demonstration I'll call it "worldPos" to keep this information. You will use this Point instead of x and y for almost all the things you're using x and y for now. Now you need another Point to act as the "camera", which you can use to do some math to figure out the screen position of the objects from their world position. So to get the two to interact, put a function called something like "render" on the base class of all the objects in the world. code:
That looks like this : code:
code:
So that's a lot of stuff! But even if you don't fully understand it, try implementing that and playing around with it to see what you get. The net result will be the same and once you have it in place, it will be easier to conceptualize spatial movements and relationships, when the world stays constant and the player is moving within it. Hope some of that helps! superh fucked around with this message at 01:56 on May 29, 2013 |
# ¿ May 29, 2013 01:52 |
|
Orzo posted:I should probably refactor this: Just wait until you have to port it to Haxe and you're only supposed to use strings as Dictionary keys... e: vvvv that is awesome. superh fucked around with this message at 02:24 on May 29, 2013 |
# ¿ May 29, 2013 02:10 |
|
devilmouse posted:Haxe 3's Maps support "most" objects as keys! Haxe 3 posted:As a bonus, maps allow element access with the Array operator: Woo hoo! Yeah this looks awesome, once our libraries are up to date we'll be switching for sure! Although I'm not sold on - "Haxe 3 posted:// haxe 2 I kinda like being able to name my getters and setters (not that I ever use anything but _getVariable and _setVariable anyway). If they're going to still use the variable(get,set) syntax why do we still have to define strict names? I like C#'s { get {} set {} }.
|
# ¿ May 29, 2013 03:34 |
|
KoRMaK posted:Is that also a reason in the pro column to use sprite sheets instead of animated gifs? I've never scene an efficiency reason or otherwise for why to use one over the other. I prefer gifs. Besides the benefit that spritesheets will give you batching in engines that draw 2d sprites as polygons, with gifs you are going to be limiting yourself to a 256 color palette per animation and the accompanying dithering associated with turning an image into that palette. Besides that, not many frameworks will let you load up a gif and play it within the context of a game, that I know of? Are you using the gif timing for the animation timing, or timing it out yourself? I actually can't think of any benefit to using animated gifs. There are many utilities out there that will take a series of images done in photoshop and pack them into an easily parseable atlas for your platform of choice - like http://www.codeandweb.com/texturepacker
|
# ¿ May 30, 2013 04:06 |
|
A Bloody Crowbar posted:This is AS3/Flixel. Yeah, you're returning the null data object instantly because the load hasn't completed by the time the function ends. The onLoad event hasn't fired yet. Flash isn't threaded so you can't like, force a wait in that function until it's done or the whole program will halt waiting for the load. Do this instead: code:
|
# ¿ May 31, 2013 12:23 |
|
DarthJeebus posted:Can any resident XNA gurus tell me how I should be rendering my sprites so that they aren't incredibly blurry when I'm moving them around? I Googled around to no avail. Are they just plopped on stage or are you rendering them off a camera? If its a camera you need to clamp that too.
|
# ¿ Jun 4, 2013 12:13 |
|
I wrote this up for another poster a few pages back. It's for as3, and I have no experience with Pygame, but the concepts are all outlined here.superh posted:No problem! The camera is definitely a weird thing to wrap your head around, at first. Pseudo-code, incoming!
|
# ¿ Jun 7, 2013 13:52 |
|
Lazerbeam posted:I am successful! A second thanks to you superh, getting my sprite's screen position right was the key Awesome! Glad to hear it! It's not too bad once you see what you need to do.
|
# ¿ Jun 8, 2013 19:05 |
|
the posted:Alright, I did it, however it's not behaving exactly as I want. I have: Shouldn't it be - JavaScript code:
|
# ¿ Jun 14, 2013 20:04 |
|
the posted:I would think that would shrink it? Let me try and I'll get back to you. Is it still set to "=" from before? Setting it = .1 would shrink it but setting it += .1 will add .1 to whatever's in there. Keeping a reference to it's original size (new Vector(1,1,1)) then setting it to origin+new Vector(.1,.1,.1) will just grow it once too. You could break it down to this though - code:
vvv Great! No problem! superh fucked around with this message at 20:15 on Jun 14, 2013 |
# ¿ Jun 14, 2013 20:09 |
|
Coldrice posted:Quick Unity/Futile question That looks super weird, other than some weird texture creation issue the only thing I can think of is to make sure the position of those elements is a whole number, maybe it's freaking out trying t sub-pixel render those sprites?
|
# ¿ Jun 19, 2013 13:03 |
|
DancingPenguin posted:Sorry for the double post. In 90% of the games I have ever made, physics actually overkill. In a 2d tile based game some trig will be all you ever need.
|
# ¿ Jul 2, 2013 15:04 |
|
DarthJeebus posted:Well this is annoying. My monogame project in VS2010 suddenly won't debug. I press F5/click the debug button, and it just grays out briefly before returning to normal. Other projects still debug just fine. I made sure the program wasn't still running in the background and tried a reboot, but nothing seems to work. I'm not super familiar with VS 2010 or monogame but are there any errors that are preventing the game from compiling? Or any messages spit out into a build log?
|
# ¿ Jul 5, 2013 01:57 |
|
Lucid Dream posted:I made a ContentHandler class with static methods like LoadTexture. This is my preferred way of handling Asset management too. If everything needs its, either have an instance of it in a base class and remember / go through the tedium of passing it in to every constructor, or just throw it in a singleton that you can touch from everywhere. It's much better for your piece of mind.
|
# ¿ Jul 23, 2013 02:03 |
|
roomforthetuna posted:Aha, that is a good reason. I generally prefer tweaking values in the code, but being able to assign prefabs is certainly an advantage if that's something you want to do with a global var. I used to be of the same mindset, but there are certain areas that seeing your changes live will save you so, so much time on. Unity makes it so easy, once you can wrap your mind around it you'll really thank yourself for taking advantage of it. For example, I was working on a unity fighting game - after switching to inspector based hit box timing / positioning I could implement a character in a single day of fiddling instead of two or three days of fine tuning and trial and error. I've even been taking the time to implement quasi wysiwyg editors into most of my non unity products these days - it's a huge initial investment but you'll end up saving so much time in the end.
|
# ¿ Sep 22, 2013 23:32 |
|
Suspicious Dish posted:I'm surprised you're caught up about JavaScript. HTML5 is nowhere near ready for realtime gaming, but that's mostly because of multimedia and speed issues. This is not remotely true. My company has been working in html5 for almost 2 years now and it's been ready for prime time for about a year. If you want to see it in action and you have an iOS device, look at the games on the nick app, https://itunes.apple.com/us/app/nick/id596133590?mt=8 They are all running html5 games in a web view. Don't let nme/openfl taint your perception of the state if html5 gaming. E: here's another link, that will run in your browser. It may default to flash on a desktop device, so check it out on a tablet. http://www.nick.com/games/legend-of-korra-republic-city-run.html?apiKey=001 superh fucked around with this message at 07:50 on Sep 28, 2013 |
# ¿ Sep 28, 2013 07:21 |
|
Suspicious Dish posted:The big issue I ran into was sound and multimedia support. The state of <video> doesn't seem to be getting better, and it doesn't allow for any sort of integration on iOS -- I can't use <video> as the background to an app there. Yeah - there are certainly multimedia issues. I believe you're right, audio is not pre-cached, or even cached. Many devices only have a single channel limit on <audio>. Web Audio is better - even if it has issues with accurate timing, you can pre load it properly. I was able to get lip-sync out if it for one game by tying an animations progress to the progress of a sample so it is doable. Video is a total nightmare, and on iPhone can only run in full screen. I personally would try to do anything but use video as a background, but I'm sure there are use cases where it would be necessary.
|
# ¿ Sep 28, 2013 13:38 |
|
poemdexter posted:2D Toolkit is half off today on the Unity asset store. I know 4.3 is going to add a ton of 2D features, but until that's released and polished a bit, this is the best 2D solution so far that I've used. I can vouch for 2D Toolkit too, it's got some real slick dicing / texture packing features that work well. The workflow is a bit rough when you're used to something like Flash but it's the best that's out there now. e: I'm using it at this very moment too! In a legacy publish-to-Flash project.
|
# ¿ Oct 17, 2013 15:40 |
|
Here's a dumb Unity question - I set up a bunch of variables I can edit at runtime on a prefab, which I adjust as needed then hand copy back into my code. How come some of my prefabs automatically pick up the changes to the source while others never do? Some instances make me remove and re-add the source script component before they update. I made both of these prefabs using the same steps today, I didn't do anything different that I know of, and I've seen this before but never figured out a solution. Is the answer "because Unity" or "because you need to set x"? e: Maybe it's the reverse? Maybe it only "keeps" when I accidentally do my editing on the original prefab in the library? superh fucked around with this message at 18:54 on Oct 17, 2013 |
# ¿ Oct 17, 2013 18:38 |
|
Makes sense (in as much as "never trust it" can make sense!) and it's all good for me - my prefabs are instanced at runtime from the library so as long as the original is right the instances should be. The game I'm working on is a fighting game so I notice pretty quickly if all my attack timings are off when I rebuild. Thanks a lot!
|
# ¿ Oct 17, 2013 19:47 |
|
I never used tiling in 2d Toolkit so I don't know how much control you get, but you might have to overlap the tiles ever so slightly. You also want to set Pad Method to Extend in the Collection Editor. vvv Great! Glad it worked! superh fucked around with this message at 17:11 on Oct 31, 2013 |
# ¿ Oct 31, 2013 16:11 |
|
I've been "jamming" on a game for a few days now and I'm excited to show off a teaser shot Motherlode has a ways to go but it's starting to shape up and I'm in the middle of a proud parent moment
|
# ¿ Nov 3, 2013 05:03 |
|
I believe that since it's only sold through the Unity Asset Store it's covered under the Unity Asset Store license which is pretty much "one license per seat"? Have you looked at it in the store?
|
# ¿ Nov 8, 2013 04:58 |
|
You just get 2dToolkit as source files you add to your project, so yeah. I guess it never even occurred to me that modifying it for use in my own project could be against the rules.
|
# ¿ Nov 8, 2013 05:22 |
|
|
# ¿ May 20, 2024 17:19 |
|
Yeah, that looks awesome! Gonna send that around work and see what people think. I imagine if you're doing keyframe animation you'll have to do 3-6x the number of drawings, but if you can reuse the assets in many more situations throughout the game, it will probably pay off.
|
# ¿ Nov 13, 2013 04:44 |