|
I finished a map editor for a reverse engineered DOS game! Its clunky as poo poo, has no exception handling (it doesnt even bother to check for a valid file, it will just crash), is made out of windows forms buttons, and only has the bare minimum functionality, but it works
|
# ? Jun 21, 2017 16:01 |
|
|
# ? May 25, 2024 01:54 |
|
Does anyone know a way to get Unity's Snap to Grid functionality to toggle or just be enabled by default? I don't mind having to hold Control to do it but it would be nice to not have to worry about it when messing around with more extensive sprite placement.
|
# ? Jun 21, 2017 18:10 |
|
Warbird posted:Does anyone know a way to get Unity's Snap to Grid functionality to toggle or just be enabled by default? I don't mind having to hold Control to do it but it would be nice to not have to worry about it when messing around with more extensive sprite placement. No I do not, but ProGrids (paid addon) works well. https://www.assetstore.unity3d.com/en/?gclid=CO#!/content/4466 I think it's been discounted down to something like $5 before.
|
# ? Jun 21, 2017 18:14 |
|
Crap, I was hoping it was something they had added on in more recent updates. It's annoying, but not "pay for it to fix it" annoying. I think I remember seeing something about them improving 2D stuff in the next update, so hopefully it'll get fixed/improved.
|
# ? Jun 21, 2017 18:23 |
|
I have progrids and it works pretty well (except on linux). The lack of a decent grid system in Unity is strange, it would be an easy addition compared to some of the other crazy things they're putting in there.
|
# ? Jun 21, 2017 20:04 |
|
awesomeolion posted:Does anyone know how you'd approach doing the effect where there's a handful of particles or objects spawned and then after a beat they all sort of gather up and arc over to a destination in a satisfying way? I guess I'm thinking like some games where you collect things they have those money animations as they zoom to your inventory or count of total stars or w/e. I'm thinking there maybe is a name for this? Or a common way to do it? I can spawn a bunch of stuff and lerp it over to a destination but that's going to look poo poo I feel like. Let's say you use a separate but similar spline for each particle. You need four points: start, end two other randomised curve points. Add small random offsets to the in-between locations for each particle, and also slightly randomise the interpolation rate for each one. Now when you update each one it will follow a unique curve, but also stay in a nice group depending on how you weight the random added points. Another nice tip: use hermite interpolation on the interpolator value. This will make the particles accelerate and decelerate smoothly over the path. e: Screenshot of this: Spatial fucked around with this message at 21:22 on Jun 21, 2017 |
# ? Jun 21, 2017 20:17 |
|
Nolgthorn posted:I have progrids and it works pretty well (except on linux). The lack of a decent grid system in Unity is strange, it would be an easy addition compared to some of the other crazy things they're putting in there. It is odd considering there is a whole genre of games that specifically use a grid system, I would totally dig it if Unity had a grid library to the same extent as their raycasting/colliding library, but that's a lot to ask of.
|
# ? Jun 21, 2017 20:18 |
|
Spatial posted:A little randomness is key. Multiple layers of interpolation looks wayyyy more natural. drat, this is great! Thank you very much for your help. I am going to give it a go.
|
# ? Jun 21, 2017 22:38 |
|
SpaceClown posted:I finished a map editor for a reverse engineered DOS game! Its clunky as poo poo, has no exception handling (it doesnt even bother to check for a valid file, it will just crash), is made out of windows forms buttons, and only has the bare minimum functionality, but it works At one point I managed to embed an XNA game in a winforms app.
|
# ? Jun 22, 2017 14:30 |
|
Blue Footed Booby posted:At one point I managed to embed an XNA game in a winforms app. how
|
# ? Jun 22, 2017 17:46 |
|
what's the most efficient way to store global variables / "quest" status in unity? gameobject in persistent scene with a simple dictionary script? eg. "TalkedToLady" = 1 that way I figure I could have new objects check the dictionary to see if their key is in there, and if not add it
|
# ? Jun 22, 2017 18:40 |
Blue Footed Booby posted:At one point I managed to embed an XNA game in a winforms app. You can grab the GraphicsDevice from the Game class and render the contents in OnPaint of the winform by passing the handle of the current Control into GraphicsDevice.Present(). Pretty neat.
|
|
# ? Jun 22, 2017 19:02 |
|
Meyers-Briggs Testicle posted:what's the most efficient way to store global variables / "quest" status in unity? Just make a place to store it, namespace something like Storage call the class Quest. You can have a bunch of public variables, or a dictionary, or whatever.
|
# ? Jun 23, 2017 00:27 |
|
variable scope is the devil and the number one reason why assembly is king, baby.
|
# ? Jun 23, 2017 04:21 |
|
Spatial posted:Also, while I'm complaining about controllers: while the PS4 controller doesn't have the 360's design flaw of one axis for both triggers, it does have the minor flaw of having both buttons AND axes for the triggers. So any typical binding detection system is going to see the button press first and take away the analogue functionality. Some motherfuckers are always trying to iceskate uphill
|
# ? Jun 23, 2017 08:07 |
|
variable state keeps me from doing dumb things and im thankful for it Speaking of doing dumb things... I'm working on setting up the logic for my prototype and currently, I have the Update method for things require being passed an input. The UpdateManager object is subscribed to an InputChanged event and passes the current input along when everything subscribed to it gets updated, because I figured, hey, that's less room for loving things up than having every object have another subscription to juggle and input value to store or whatnot. But having gone back to read a bit on some design patterns, I've noticed that generally you have a handleInput method and a separate Update method. I'm not familiar enough with this stuff to know intuitively why they're separate. There's a few reasons why I think I'm at this point (System.Console being innately weird and dumb being part of it), but I'm guessing there's some landmine I have yet to trod upon at play here. Anything to be aware of? And since I'm getting into game logic / state stuff as well, anything to be aware of before I gently caress things up? Planning on having some BattleMapLogic thing maintain its state and do a lot of the lifting itself regarding things like turn order / unit active or inactive / player actions, but I wanted to throw in a text window to display some relevant information and for the player to be able to make choices in, if needed. I'm guessing the best course of action there is to have it be its own object, and wondered if making the strings for choices/info or whatever be their own objects as well, so I could better define their behavior (mainly, making sure they appear in the right location even if the screen size changes and they have some means of doing little text effects like scrolling if they're long messages stuck in tiny spots instead of ruining everything or whatever). But there's the problem of figuring out how to ensure these separate objects understand when they're given focus, vs when they're passive, and who tells what when they're on deck. I'm going to take a running guess and assume that this ties into the issue of separate input / update things, but I'm also curious if this is something better handled with state logic than trying to do things like having one thing eat the inputs before another things gets it or whatever. There's just a bit of passing of the torch deal going on and I'm wondering what the generally sane route with this sort of focus-having stuff is (like, does the text window tell the BattleLogic "hey im done now" and the BattleLogic kicks awake something else, or does the other object pipe up every update cycle and go "AM I IN THE GAME YET COACH???" or something? I'm kind of loathe to do a sort of "torch passing" setup where I'd be able to accidentally destroy everything when I gently caress up the daisy chain, as opposed to having things sort out their own poo poo but I'd also like to not do stupid things a lot. yet again kind of rambling questions but im not good at describing this stuff due to half-understanding most of it, probably e: Man, there is some zen in refactoring. Moved all my graphics data into a component system, sorted out all the name path fuckery, and having it still work the same is... oddly satisfying. Tiler Kiwi fucked around with this message at 09:53 on Jun 23, 2017 |
# ? Jun 23, 2017 08:34 |
|
Meyers-Briggs Testicle posted:what's the most efficient way to store global variables / "quest" status in unity? Saw this on Gamasutra today and it seems like it might be useful for you
|
# ? Jun 23, 2017 09:41 |
|
Tiler Kiwi posted:variable state keeps me from doing dumb things and im thankful for it Uh, hard to say from just that. I mean, if the handleInput code is complicated enough, that's reason to break it off into a private method and have update call that, just for code clarity. But as for actually logically separating them, my guess would be related to threading. Usually inputs fire as events on their own thread, or something needs to be running its own thread to catch the inputs and respond to them and fire those inputchanged events, and so that needs to be ready. But you also have your update method which is doing game logic and graphics rendering. So you break out the handleInput in order to have it in its own listener thread while the rest of the game is running, and then the game thread checks with the input state when it is ready for it, and that way input events don't get dropped because it was busy rendering or something. But it kinda depends upon what engine / environment you're talking about, I'm just kinda taking a stab in the dark here... And then as you kinda alluded to, there's the problem of like, does this entity or that entity go first, which ones check the input, does one eat the input, etc. So having a handleInput method to process some of that as soon as the input comes in and then you have the game logic, which may be multi-threaded or non-deterministic in its order (or maybe not, IDK, again stabbin in the dark ideas) and they're independent so things don't get confused. But it all kinda depends upon how complicated your use case is. You only design as much as you actually need, plenty of games can be made without any of that kinda stuff at all. Its just a question of how complex your actual design is and whether its worth breaking those things out in the name of low coupling or whatever. Generally sounds like you've got the right approach, I'd just have some BattleMap state, then if its in like "cinematic mode" or "dialogue mode" state then it uses a dialogueManager class which has its own state for tracking the flow of cinematics/conversations, and then you can have some individual textblurb entities or whatever that it has a big collection of and works its way through based on their order and then it triggers them and gives them focus or whatever, and then they return back to it when they're done doing their thing. Tiler Kiwi posted:e: Man, there is some zen in refactoring. Moved all my graphics data into a component system, sorted out all the name path fuckery, and having it still work the same is... oddly satisfying. Yes sir! Hehe, make sure you actually cleaned your build and compiled it fresh and weren't just executing an old build by mistake!
|
# ? Jun 23, 2017 09:54 |
|
Oh my god, I didn't even consider threading. Yeah, gently caress, that's kind of important then. Well, not for me right now, but, you know, yeah. In regards to the other stuff, I'm probably overthinking things, really. I just hate the idea of having to pay attention to something as fiddly as focus and making sure it gets passed around nicely, in lieu of having some manager object do it for me, or using some kind of interface/component combo so I can just define the rules and systems in one place, so I hopefully break it less / dont have to care as much, but I'm wary if that's going to create some dumb rigid horrible god object thing that has its fingers in everything or otherwise be a bigger pain than just biting the bullet. I guess one advantage of having my first big prototype thing be a tRPG sort of system is that there's a lot more inherent need for rigid control of game flow and less need for objects to do things on their lonesome, so its less troubling to just have a bunch of fooManager things, maybe.
|
# ? Jun 23, 2017 10:23 |
|
awesomeolion posted:Saw this on Gamasutra today and it seems like it might be useful for you This is awesome, thanks! I'm always on the lookout for articles describing "best practices" for different mechanics. I know enough to hack together almost anything I can think of, but there's a lot of things like this that wouldn't ever come up.
|
# ? Jun 23, 2017 16:00 |
|
Polio Vax Scene posted:You can grab the GraphicsDevice from the Game class and render the contents in OnPaint of the winform by passing the handle of the current Control into GraphicsDevice.Present(). Pretty neat. Yeah, this. It's pretty handy for making tools, because I'd rather eat a live badger than do serious GUI stuff in XNA. It definitely gave me that "this is not the way I'm supposed to use this" feeling, though. Blue Footed Booby fucked around with this message at 17:35 on Jun 23, 2017 |
# ? Jun 23, 2017 17:32 |
|
Edit: Nevermind, I should just dig into Unity's per-platform texture settings myself.
Ranzear fucked around with this message at 05:08 on Jun 26, 2017 |
# ? Jun 26, 2017 05:00 |
|
Ok, then nevermind.
|
# ? Jun 26, 2017 05:17 |
|
Well, I'm more or less done with this prototype. There's a long list of things I'd like to do, like, adding menus, allowing resize of window while the program is running, making rivers not poo poo ( splines ), adding ingame parameters for the map generator, making the controls not poo poo, making it so the mapgenerator doesnt sometimes hiccup and fill the entire playable map space with tiles, etc. but writing a thing for a Console and managing my own garbage bin engine has officially gotten Too Much A Pain In The rear end. Not to say my engine is THE WORST, but its gotten big enough that I'm sometimes coming across things I wrote and going "the gently caress is this", which is never a good sign. I'm gradually forgetting what the render stuff is doing beyond some witchcraft and bullshit. next step is seeing how much of the logic is actually translatable into unity and how much is going to get thrown into the dirt and stomped to bits. A lot of it probably deserves it, as I could likely do better now that I've gotten past some of the difficulties.
|
# ? Jun 26, 2017 12:24 |
|
What has happened with .NET 4.6 support in Unity since January? I saw a post about a test build supporting it back then and one update, but it looks like it's still some special release that doesn't follow mainstream releases. The main thing I'm looking at is having an up-to-date DLR for embedding a Python interpreter. I can using something like IronPython 2.4 right now kinda-sorta, to be fair, so maybe I'm fussing too much. It involves turning on full .NET support and presumably bloating my release.
|
# ? Jun 26, 2017 17:12 |
|
Rocko Bonaparte posted:What has happened with .NET 4.6 support in Unity since January? I saw a post about a test build supporting it back then and one update, but it looks like it's still some special release that doesn't follow mainstream releases. It's on the roadmap for Unity 2017.1 (they're switching to a year-based numbering system for their majors now). It's currently in a public beta with a release set for next month.
|
# ? Jun 26, 2017 23:13 |
|
BirdOfPlay posted:It's on the roadmap for Unity 2017.1 (they're switching to a year-based numbering system for their majors now). It's currently in a public beta with a release set for next month. yep, its opt in currently but it's the player options. i've been using it with no troubles.
|
# ? Jun 27, 2017 23:20 |
|
Seem to have missed the controller chat, but is there an actual way to detect that you're seeing a PS4 controller? Since the driver just calls it "Wireless Controller" I'm at a loss for a reliable way to be sure.
|
# ? Jun 28, 2017 17:29 |
|
I use the name and number of axes/buttons as a heuristic, and also allow players to override the way the controller is interpreted in the options (generic/360/PS4). The proper way is probably enumerating devices using the HID API and looking for some magic number. I've never done it myself though. There are some open source tools which do mapping of the PS4 to XInput, try taking a look at what they do.
|
# ? Jun 28, 2017 19:20 |
|
quote:I'm sure this all makes sense somewhere. Perhaps in a deep dark old Intel 4044 or 8088 manual somewhere where some fool went "I know let's have all the bytes in the wrong order!". this sums up my experience with reverse engineering this stupid video game very nicely.
|
# ? Jun 28, 2017 19:59 |
|
SpaceClown posted:this sums up my experience with reverse engineering this stupid video game very nicely.
|
# ? Jun 28, 2017 23:49 |
|
How do you find the nearest point on a Catmull Rom spline? I need to evaluate the distance. I don't have many splines to evaluate so I can brute-force it. But I'm wondering if there's an analytical solution.
|
# ? Jun 29, 2017 17:30 |
|
Spatial posted:How do you find the nearest point on a Catmull Rom spline? I need to evaluate the distance. Computing the exact distance to a cubic spline involves root finding on quintic polynomials, there is no analytic solution. You need to use some numeric root finding approach (Newton-Raphson or the like) if you want an exact solution. For more approximate solutions, http://hhoppe.com/ravg.pdf has a pretty good one for Bezier curves (look for get_distance_vector) that you might be able to adapt. Depending on the situation and how much accuracy you need you might also be able to convert the spline to polylines, or just pick a lot of candidate points on the curve and do a final binary search if it doesn't need to go fast.
|
# ? Jun 29, 2017 22:37 |
|
Nevermind then. I went with a fairly high res polyline. Since I never change the curve after it's created I can just precompute the polyline to high accuracy and still have a very fast lookup.
|
# ? Jun 30, 2017 03:00 |
|
Buy a D-Wave and use quantum annealing.
|
# ? Jun 30, 2017 07:17 |
|
Spatial posted:Nevermind then. I went with a fairly high res polyline. Since I never change the curve after it's created I can just precompute the polyline to high accuracy and still have a very fast lookup. Haha, "Things that look simple"
|
# ? Jun 30, 2017 11:13 |
|
Spatial posted:Nevermind then. I went with a fairly high res polyline. Since I never change the curve after it's created I can just precompute the polyline to high accuracy and still have a very fast lookup. Since they're Catmull Rom's, I wonder if finding the closest, consecutive control points and interpolating a position would be worth the effort. EDIT: I'm a loser that loves simple math problems. If you were thinking about doing this, here's a simple way to figure out what interpolation to use. Bonus: it only uses squared distances, so you can skip any root finding for the distances. pre:d12 - d22 t = -------- + 0.5 dcp2 d1 = distance from the 1st (in the order of the spline) control point to your location d2 = distance from the 2nd control point to your location dcp = distance between the control points themselves All that said, I haven't gone to the effort of proving the assumptions. Biggest one being that the curve is convex relative to your location. Otherwise, the closest point would be one of the control points. Another would be that the t value would be relative to segment between the 2 points rather than the curve itself. For some insanity in my current 2D Unity project, I'm trying to get a gatling gun's animation to sync with player input, and I don't know if this is the best solution. Actually, I know it isn't the solution, because the "Rest" states are empty, which dumps it back to the default sprite of the weapon. First pass was to start and stop the animation, but that could lead to "stopping" on the muzzle flash. I think the best option would be to wait to pause it after the next fire frame, but I don't know how to best rope into that. BirdOfPlay fucked around with this message at 08:07 on Jul 1, 2017 |
# ? Jul 1, 2017 04:27 |
|
I'm trying to learn Godot and having a struggle with 3D physics, and would be really grateful if anyone could help me. I want to create car-like movement, where pressing the up key moves an object forward, and the left and right keys rotates the object. This was fairly simple to implement, but I want the rotation to change the direction of the movement that has already been started. For example, if you hold the up key and start moving along a straight line, pressing the left key until the car has been rotated 90 degrees should result in the car moving in a straight line that is 90 degrees off the original line. I'm doing this in 3D in Godot, but I'm not dealing with any movement in the Y-axis so you could think of the game as top-down in terms of movement. This seems like trivial behaviour but I haven't been able to implement it right. This is what I have currenly implemented: code:
|
# ? Jul 4, 2017 21:15 |
|
Alcatrash posted:I'm trying to learn Godot and having a struggle with 3D physics, and would be really grateful if anyone could help me. Do you have a way of doing something like "state.set_linear_velocity(state.get_linear_velocity().rotate_y(angle))"? You basically need to rotate your velocity, not just the object itself.
|
# ? Jul 4, 2017 21:24 |
|
|
# ? May 25, 2024 01:54 |
|
I'm not a programmer at all, but I have an idea for a game and I want to see if I can learn how to do it. I'm not sure what languages are good for what. I have some very basic (including BASIC) coding knowledge gleaned from memories of late high school, but that's about it. Anyway, it's going to be mainly text based, but with visual elements like a map and some other things. I want it to have branching paths, along with an inventory system, a combat system, and a dialogue system. Is Python a good fit for my idea, or should I go with another language?
|
# ? Jul 5, 2017 03:05 |