|
Nothing about that looks like it should be killing your framerate to me; try checking the profiler to see if your bottleneck isn't maybe in a different script entirely (or if it's here, to find out which function it's in). You can make this a little bit simpler, in any case. Coroutines can take parameters, so you can send all the necessary information directly into them. Wrapped with a function, you can also ensure that if you call up a new fade while one is running, you don't end up with both running at once. Something like: code:
With that, you can call Fade() with whichever color and fade time you happen to need, and the bool parameter lets you decide if the image should be turned off once the fade is complete (as in a fade to Clear). e: fixed an error in the code ApproachingInfinity fucked around with this message at 16:59 on Feb 8, 2016 |
# ? Feb 8, 2016 10:06 |
|
|
# ? Apr 26, 2024 05:48 |
|
This weekend I got a lot of game dev time in while half-watching the superbowl, added some new features and cleaned up my code and stuff. At one point decided I should refactor my player class into a state machine using an enum state rather than the current tree of conditions that it has. That'll be simpler to keep track of state and which actions are possible from any given position, right? Sounds great! Well an hour later everything was broken, and I realized that it'd take a few more hours to sort everything and get it working as well as it did before with the new system... git checkout HEAD~1 Player.java git commit -a -m "I've made a huge mistake."
|
# ? Feb 8, 2016 17:34 |
|
Zaphod42 posted:At one point decided I should refactor my player class into a state machine using an enum state rather than the current tree of conditions that it has. That'll be simpler to keep track of state and which actions are possible from any given position, right? Sounds great!
|
# ? Feb 8, 2016 17:49 |
|
What I'm seeing is Canvas.BuildBatch which takes up (self) 3477 ms (although even the profiler can't handle the lags so I'm not sure it captured the right frame), and I've come upon this thread http://forum.unity3d.com/threads/why-does-canvas-buildbatch-happen-at-random-and-how-can-i-avoid-it-during-runtime.277966/ At the end there it says that the issue got fixed, but maybe not as related to me? Maybe since I'm changing the color of the whole screen it has to do a lot of checks and stuff? I don't know then how other people don't experience that with this fading script though. Edit: No, I'm not the only one, and a guy is specifically mentioning the 5.2 update... so, I guess I'll disable the script for now. supermikhail fucked around with this message at 19:54 on Feb 8, 2016 |
# ? Feb 8, 2016 18:40 |
|
Yeah, that's pretty weird. I do fades almost exactly in that manner all the time and haven't ever had an issue like that before. Only difference is I use a tween library to control the image's color instead of a Coroutine, which would still cause the build batch stuff. What's in your UI, other than the fade image? Also, which version of Unity are you on, and what platform are you on? (If on OSX, try switching to OpenGL 2, their 4.0 renderer is still kind of busted)
|
# ? Feb 8, 2016 22:06 |
|
code:
|
# ? Feb 8, 2016 22:55 |
|
Okay, this, and also scaling the image to full screen in the editor instead of in code... Or rather, probably simply just the latter. I don't know why I didn't think of this sooner... Well, I know. Because it was one of many lines of code inherited from the original script, and now I've cut the bullshit down to just the two I need (with your help):code:
|
# ? Feb 9, 2016 06:52 |
|
It's late and my brain doesn't want to math properly. Given this lovely diagram: where: x = some value y = x/3 z = some other value between 0 and x, inclusive How in the fart can I round z UP to the nearest y? Using the diagram as an example, z would be rounded up to 3y. If you were to reduce z by let's say half, you would round it up to 2y, and so forth.
|
# ? Feb 9, 2016 08:32 |
|
ceiling(z/y)*y?
|
# ? Feb 9, 2016 08:38 |
|
Divide Z by X, multiply by three, round up, multiply by Y? E: Clamp the value to 1-3 after rounding up to deal with edge cases. From Earth fucked around with this message at 08:45 on Feb 9, 2016 |
# ? Feb 9, 2016 08:40 |
|
Well, now we know why Amazon gave a pile of money to CryTek.
|
# ? Feb 9, 2016 09:30 |
|
The AWS and Twitch integration seems attractive.
|
# ? Feb 9, 2016 11:58 |
|
pseudorandom name posted:Well, now we know why Amazon gave a pile of money to CryTek.
|
# ? Feb 9, 2016 12:01 |
|
SupSuper posted:For those that missed it: http://gamasutra.com/view/news/265425/Amazon_launches_new_free_highquality_game_engine_Lumberyard.php It's free... money-wise. If you make an online game you either have to be filthy rich or sell your soul to Amazon. Cool.
|
# ? Feb 9, 2016 15:39 |
|
So Amazon released an engine that can't even deploy to their own devices?
|
# ? Feb 9, 2016 15:43 |
|
Also what the gently caress kind of name is "Lumberyard"? The last thing I want to think of when I'm considering a game engine is one of those lovely redneck farmer stores like Home Depot or Fleet Farm.
|
# ? Feb 9, 2016 15:46 |
|
Doesn't seem any better or worse a name than "UE4" or "Unity." At least Lumberyard will index well for search engines.
|
# ? Feb 9, 2016 15:47 |
|
xzzy posted:Doesn't seem any better or worse a name than "UE4" or "Unity." If I Google search UE4 I guarantee you I'm going to get nothing but the game engine. Unity's such an infrequently used word otherwise that it's the same poo poo. If I Google Lumberyard I'll get 9 pages about actual lumberyards and one about the game engine.
|
# ? Feb 9, 2016 15:50 |
|
Lumberyard better at least have exceptional logs.
|
# ? Feb 9, 2016 15:54 |
|
So if you use Lumberyard, most of SteamWorks is verboten. And I guess you can't use it on the Xbox One either, since every game implicitly uses Xbox Live's cloud storage.
|
# ? Feb 9, 2016 16:00 |
|
SupSuper posted:For those that missed it: http://gamasutra.com/view/news/265425/Amazon_launches_new_free_highquality_game_engine_Lumberyard.php But. I mean I face-plant into dumb poo poo in UE4 on a daily basis, and that's an engine that's (technically) been out for years. I'm trying to imagine the epic shitshow that Lumberyard is going to be, for the next few years. Still. Heck of an offer. It's even full source. I'm really wondering how Unity is going to compete, long term. They're going to have to up their game substantially.
|
# ? Feb 9, 2016 16:02 |
|
BlueKingBar posted:It's free... money-wise. If you make an online game you either have to be filthy rich or sell your soul to Amazon. Cool. I don't know, it doesn't seem too bad compared to other hosting solutions for MMO games: http://aws.amazon.com/gamelift/pricing/ (scroll down to the examples) ~$6k a month for a game with 10,000 daily users sounds cheap to me, I would have estimated more around $10k. That said, it's many years since I was involved with AAA stuff. It's certainly aimed at medium-large studios though, this isn't an indie product (unless you make non-networked games, in which case it's amazing). BlueKingBar posted:If I Google search UE4 I guarantee you I'm going to get nothing but the game engine. Unity's such an infrequently used word otherwise that it's the same poo poo. If I Google Lumberyard I'll get 9 pages about actual lumberyards and one about the game engine. That's true now, but a few years ago any search for unity would be full of this poo poo. pseudorandom name posted:I guess you can't use it on the Xbox One either, since every game implicitly uses Xbox Live's cloud storage. Rocko Bonaparte posted:Lumberyard better at least have exceptional logs.
|
# ? Feb 9, 2016 16:17 |
|
Rocko Bonaparte posted:Lumberyard better at least have exceptional logs.
|
# ? Feb 9, 2016 16:26 |
|
Has Crytek announced anything since they said they were basically going under and then Amazon gave them a sack full of cash for this engine license? That was almost a year ago and Ryse was the last thing they did.
|
# ? Feb 9, 2016 16:37 |
|
Wolfsbane posted:~$6k a month for a game with 10,000 daily users sounds cheap to me Maybe it's worth $6k a month not to have to think about it.
|
# ? Feb 9, 2016 16:38 |
|
I might as well post something more interesting with less puns. Regarding this: I figured out that most all the defects--other than the porch needing a clear obstacle blocks--comes from how I'm gauging valid spaces. I fire a ray down in the middle of each grid square, and then branch off from there. There are two issues: 1. When the downray hits the top of a cabinet, it thinks it's clear. 2. When the downray hit a diagonal wall, it ends up on top of it since the ray hits dead center on top of the wall. So it thinks there's a valid route there. In the short term, I will probably just fire more rays in adjacent squares to verify heights and topology. I'm just precalculating on my PC, after all. However, the map data this algorithm is filling up actually has some stuff in it for handling heights and platforms, so I will eventually fill that up too. I'm mostly thinking out loud for posterity, and also hoping somebody will call me out if I'm being real dumb. It seems excessive for me, but I went for this "thin wall" tile-based layout originally, so I brought it upon myself.
|
# ? Feb 9, 2016 16:45 |
|
They are hyping up the Twitch support but I don't really see how that is a feature I'd want in a game engine. Any Twitch streamer worth their salt isn't going to be using in-game Twitch integration at all. They use OBS or similar software that lets them setup different "scenes" for different game and web cam layouts, interstitials, and community written plugins, etc, etc. Besides, Unreal also has Twitch support as well. Lumberyard is hardly the first.
|
# ? Feb 9, 2016 17:19 |
|
Rocko Bonaparte posted:I might as well post something more interesting with less puns. Regarding this: What exactly is it you're trying to do here? Just generate a navmesh for your scene? The way you're going about it seems extremely finicky and error prone. If your scenes aren't procedurally generated (and it looks like they aren't) then maybe it would be easier to just design the navmesh by hand no?
|
# ? Feb 9, 2016 18:10 |
|
xgalaxy posted:They are hyping up the Twitch support but I don't really see how that is a feature I'd want in a game engine. I got the impression that it was more for the twitch-to-game than the game-to-twitch. People would be streaming and their viewers would be able to directly control the experience: vote for characters and maps, directly spawn enemies or objects, etc. This will of course devolve until someone makes a game where the only way to get the best loot is to subscribe to the most popular streamer of that game and eventually we end up in Fifteen Million Merits. Twitch-plays-you could be used well in a game before society ends, though.
|
# ? Feb 9, 2016 19:01 |
|
HappyHippo posted:What exactly is it you're trying to do here? Just generate a navmesh for your scene? The way you're going about it seems extremely finicky and error prone. If your scenes aren't procedurally generated (and it looks like they aren't) then maybe it would be easier to just design the navmesh by hand no?
|
# ? Feb 9, 2016 19:02 |
|
Praseodymi posted:ceiling(z/y)*y? This was perfect. THANK YOU.
|
# ? Feb 9, 2016 20:25 |
|
A while back I received a newsletter from AIGameDev which contained the following:quote:One of the big trends of the year from our perspective has been "Letting Go"; from old practices and techniques that don't work anymore (who thought huge animation graphs were a good idea?), descriptions and terms that no longer apply (we stopped using the words "Game AI" as it became overloaded), to levels of control that are not sustainable (everything is becoming more systemic and procedural). Things are moving forward whether we're ready or not, so get ready for the transition! As someone working on a game that features what is by my estimation a huge animation graph (care of Unity's Mecanim) used by both the player and AI, this seems relevant to my interests. I can't find anything about it in my searches though, so I put the question to you guys: What's wrong with big animation graphs? I get that they can become a bit unwieldy when you want to change something and have to redo all the transitions, but what's the alternative?
|
# ? Feb 9, 2016 22:34 |
|
nolen posted:This was perfect. THANK YOU. Hi, just wanted to say that this looks cool.
|
# ? Feb 10, 2016 01:06 |
|
Rocko Bonaparte posted:Lumberyard better at least have exceptional logs.
|
# ? Feb 10, 2016 09:37 |
|
I asked this in the Making Games Megathread, but I actually thought I posted it here (which would have been a better place): Does anyone have a link to / suggestion for a 3D model of a human, rigged and animated? And also free'ish (up to say $50). Low poly count is fine though. Also, it must be something that can be used outside of Unity and UE4. (I know I'm asking for a lot.)
|
# ? Feb 10, 2016 15:49 |
|
For anybody following along at home with my pathfinding generation experiment: I really needed to also check the entire volume of each grid, rather than just fire rays everywhere. I'm not trying to put a grid over a completely arbitrary level. It's 2.5d, and walls go at the edges of each grid. However, I have some diagonal walls that foiled the generator, but a box test should fix it.
|
# ? Feb 10, 2016 18:17 |
|
I keep agonizing about how to serialize my stuff in Unity, partly due to my sketchy knowledge of C# and Unity. But basically, is their official tutorial (http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/persistence-data-saving-loading) the best way? To me, it has some kind of weird singleton which throws me off... And I wish the same thing were available in text form.
|
# ? Feb 10, 2016 21:18 |
|
I've become a huge sucker for yaml these days, I love the look of the files (they're super easy for a human to edit) and importers/exporters exist for just about every language. I'm sure Unity has one too. I know it does json as well, which is a reasonable alternative for serialization.
|
# ? Feb 10, 2016 21:38 |
|
supermikhail posted:I keep agonizing about how to serialize my stuff in Unity, partly due to my sketchy knowledge of C# and Unity. But basically, is their official tutorial (http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/persistence-data-saving-loading) the best way? To me, it has some kind of weird singleton which throws me off... And I wish the same thing were available in text form. If you're fine with singletons, sure. You would only have one game save loaded at a time so I don't particularly think a singleton is a bad idea for that. Depends on your general architecture I guess. If you want to serialize it into text, just pick a format (XML, JSON, etc) and use that serializer. This is a pretty simple example of XML serialization. For any other format you'd have to google around, usually any C# solution would work since Unity has the .NET 2.0 framework. EDIT: If you're talking about Unity's serialization, that's kind of another thing. This blog post is a pretty good look into it. ShinAli fucked around with this message at 21:41 on Feb 10, 2016 |
# ? Feb 10, 2016 21:38 |
|
|
# ? Apr 26, 2024 05:48 |
|
Oh, dear... So do I want Unity serialization or... C# serialization? I guess it's probably up to me.
|
# ? Feb 10, 2016 22:20 |