|
One thing that will make dealing with quaternions much more intuitive is realizing that they're extremely closely related to axis-angle rotations. Converting from an axis-angle rotation is just: X = Axis X * sin(angle) Y = Axis Y * sin(angle) Z = Axis Z * sin(angle) W = cos(angle) Various consequences of that: quat(X, Y, Z, W) == quat(-X, -Y, -Z, -W), which is used by a lot of algorithms that force W to be positive. inverse(quat(X, Y, Z, W)) == quat(-X, -Y, -Z, W) OR quat(X, Y, Z, -W) All rotation quaternions are length 1, so they're great for representing rotations that undergo a ton of transformation because you can always fix the error accumulation by just normalizing it.
|
# ? Mar 26, 2013 02:09 |
|
|
# ? May 23, 2024 03:47 |
|
OneEightHundred posted:One thing that will make dealing with quaternions much more intuitive is realizing that they're extremely closely related to axis-angle rotations. Converting from an axis-angle rotation is just: One thing that's not necessary obvious when you start wacky Euler/matrix/quaternion math, but was pretty to me when I first learned it a million years ago is that your 3x3 matrix is just literally made up of the 3 vectors that define the 3 axis of the orientation that it will rotate to. Realizing that helped me understand what the gently caress was going on with matrices. http://renderdan.blogspot.com/2006/05/rotation-matrix-from-axis-vectors.html Unormal fucked around with this message at 04:01 on Mar 26, 2013 |
# ? Mar 26, 2013 02:16 |
|
In the realm of a 2D fighter game, what should happen to the player that gets hit? Should they be stunned and unable to move for a bit while the other player beats on them? I need to get some good fighting games for reference.
|
# ? Mar 26, 2013 15:11 |
|
KoRMaK posted:In the realm of a 2D fighter game, what should happen to the player that gets hit? Should they be stunned and unable to move for a bit while the other player beats on them? I need to get some good fighting games for reference.
|
# ? Mar 26, 2013 15:22 |
|
KoRMaK posted:In the realm of a 2D fighter game, what should happen to the player that gets hit? Should they be stunned and unable to move for a bit while the other player beats on them? I need to get some good fighting games for reference. I think the way games like Street Fighter, etc. work is that different moves have different stun times, and take differing amounts of time to actually attack, and to recover from. Obviously this has to be pretty well balanced, though, so that you can't just repeatedly light-jab your opponent into oblivion while they can't act.
|
# ? Mar 26, 2013 15:27 |
|
So I'm trying to get into Unity with Futile and I've gone through MattRix's tutorials and started making something of my own but I've already hit a roadblock. For some reason I just can not get my own texture atlas working. Can someone download this thing and tell me what's wrong? It's about as simple as it gets and the error being thrown doesn't help at all.
Which is the same as in his sample project. In my code I'm calling: code:
code:
|
# ? Mar 26, 2013 15:51 |
|
Set your maxsize to 2048. Your png is 1024x2048. I learned this yesterday after my atlas moved up to the next size in TexturePacker and then all of a sudden, garbled mess where my sprites should be. Also set your Texture Type as "Texture". See if that helps. Here's my atlas properties: poemdexter fucked around with this message at 15:58 on Mar 26, 2013 |
# ? Mar 26, 2013 15:55 |
|
poemdexter posted:Set your maxsize to 2048. Your png is 1024x2048. I learned this yesterday after my atlas moved up to the next size in TexturePacker and then all of a sudden, garbled mess where my sprites should be. It doesn't matter. I've tried setting Max Size to its actual size or the biggest like in that screenshot (which is what he does for his atlases) and I get the error either way.
|
# ? Mar 26, 2013 15:57 |
|
Yea it's pretty painful to have a full stun. 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. I thought the idea of a freeze for .5 sec, and then an invincible escape for 1 sec for the player that was hit might work. I also was heavily considering the idea of having a breaking combo. But being able to be hit and rendered unable to attack without a shield sucks. Add a shield/block ability and now it's kind of fun, I would think (I haven't tried yet) I also have to add a "flee" behavior to the AI so that if it gets dinged a couple times it gets away. Surprise T Rex posted:I think the way games like Street Fighter, etc. work is that different moves have different stun times, and take differing amounts of time to actually attack, and to recover from. Obviously this has to be pretty well balanced, though, so that you can't just repeatedly light-jab your opponent into oblivion while they can't act.
|
# ? Mar 26, 2013 15:58 |
|
Yodzilla posted:It doesn't matter. I've tried setting Max Size to its actual size or the biggest like in that screenshot (which is what he does for his atlases) and I get the error either way. Recheck my post. I added additional info.
|
# ? Mar 26, 2013 15:58 |
|
poemdexter posted:Recheck my post. I added additional info. poemdexter posted:Also set your Texture Type as "Texture". See if that helps. Here's my atlas properties: Nope, nothin' doing. Still throws the error.
|
# ? Mar 26, 2013 15:59 |
|
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 |
|
KoRMaK posted:So after a player is hit, are they unable to do ANYTHING or are they able to do restricted stuff (block, backup, anything but attack), or is there an invincible escape moment so they can back off? Infinite combo prevention is a very tricky art and I'm not very well versed on fighter game theory, but usually relaunch combos are prevented by launchers being too slow to hit someone before they're below the effective range, stun combos are prevented by basic attacks chaining into combos that end on something slow (and the opener can't be chained because you have to wait for it to think you're out of the combo or cancel it using something that has a time cost), and specials are often restricted based on where you are in a combo or have prohibitive startup and recovery times that prevent them from being used on standing enemies. A lot of fighters go further and have stun lengths and damage get worse if a combo goes on for too long. Honestly, it's extremely hard to design a fighter game well unless you understand the theory behind them reasonably well, are making it primarily as a joke (i.e. having a cast of all pop culture references), or you have a Marvel license in which case you can put in as much broken poo poo as you want. OneEightHundred fucked around with this message at 16:37 on Mar 26, 2013 |
# ? Mar 26, 2013 16:29 |
|
Yodzilla posted:Nope, nothin' doing. Still throws the error. I added your atlas to my code it loaded just fine. Got mario on my screen and everything. Spelling errors somewhere?
|
# ? Mar 26, 2013 16:33 |
|
poemdexter posted:I added your atlas to my code it loaded just fine. Got mario on my screen and everything. Spelling errors somewhere? I just don't know. This is beyond frustrating and I have no idea what the hell is going on. The only code I'm calling is this: code:
E: GOD loving DAMMIT now i understand why he has all those atlases with _ScaleNum and how that corresponds to the screen resolution you're running at. gently caress i'm a goddamn idiot programmin' Yodzilla fucked around with this message at 17:08 on Mar 26, 2013 |
# ? Mar 26, 2013 16:55 |
|
I know absolutely nothing about Unity, but I looked up FAtlas.cs and the surrounding area around line 102 looks like this:code:
Edit: Welp, nevermind
|
# ? Mar 26, 2013 17:13 |
|
Yodzilla posted:I just don't know. This is beyond frustrating and I have no idea what the hell is going on. The only code I'm calling is this: So what was the solution? I didn't do any sort of _scalenum wizardry to my sprite page nor yours and I got a nice mario on my screen. Now I'm paranoid I hosed up somehow.
|
# ? Mar 26, 2013 17:24 |
|
The problem was that I copied this over from his sample code:code:
code:
Now that I know how supporting multiple resolution atlases works I was able to strip out what I don't need for now and load my regular one using just this: code:
|
# ? Mar 26, 2013 17:30 |
|
I think something a lot of fighting games will also do is have the stun time decay as the combo continues, so even if an attack stuns for half a second at the start, it'll only stun for .1 seconds if it's the 10th move or whatever.
|
# ? Mar 26, 2013 21:25 |
|
Sony getting rid of approval process. This along with the Unity licenses is making the PS4 very attractive to indies. Only question is how expensive a dev kit will be.
|
# ? Mar 27, 2013 06:30 |
|
OneEightHundred posted:Honestly, it's extremely hard to design a fighter game well unless you understand the theory behind them reasonably well, are making it primarily as a joke (i.e. having a cast of all pop culture references), or you have a Marvel license in which case you can put in as much broken poo poo as you want. Yeah, the theory of it all boils down to very small tweaks that are largely imperceptible from watching fighting games, and are also hard to perceive whilst casually playing the game too. Add stuff in like jump and roll cancelling (for some 3d fighters) and it all gets very complicated indeed. Basically the key is to penalize, but allow you to come out of problems with good timing and strategy. How that balances to the low end of players takes ALOT of playtesting, and you may as well acknowledge that it's going to be a mess until you have some decent play time on it. Play good fighting games and attempt to get genuinely decent at one, it's probably the best way to learn if you're looking to make something seriously.
|
# ? Mar 27, 2013 06:39 |
|
Maluco Marinero posted:Play good fighting games and attempt to get genuinely decent at one, it's probably the best way to learn if you're looking to make something seriously. Basically this, yeah. To make a fighting game you really need to know your stuff. Even the new Skullgirls DLC characters that are being voted for, under each of them they have a big list of inspiration they draw from, maybe 10-20 games each. To make a character or an attack or something you really can't just focus on design, you have to focus on various techniques and intricacies learnt only by seeing a lot of fighting games. They're also hell to make because fighting games are one of the only times you want to make a solid engine before making a solid game, because usually there's only one ruleset that the game goes by, and that ruleset has to be absolutely frame-perfect in all cases.
|
# ? Mar 27, 2013 06:43 |
|
What's the preferred method of handling savegames (without built-in serialization)? Do you use human-readable formats like XML/YAML so they're easy to debug and maintain but cumbersome? Or do you prefer custom binary formats that are fast and efficient but a pain to work with?
|
# ? Mar 27, 2013 12:30 |
|
xgalaxy posted:Sony getting rid of approval process. I've heard that Sony is easy to work with regarding dev kit pricing for indie developers. I'm sure it's a case by case thing but that's coming from two devs I've spoken to about cross platform authoring.
|
# ? Mar 27, 2013 14:07 |
|
More of a conceptual/what is fun question, I'm essentially ripping off Carnage Heart by building a 2D game where robots are controlled by flow-diagram code. In case you're not familiar with carnage heart, the "code" that players build looks like this: It has conditions that relate directly to the bots state, these bots are pretty advanced and can evaluate "if enemy within 15 metres". Branching is achieved with the red/green arrows. But what I'm building is closer to hobby robots than giant anime robots and so my current set of instruction blocks are actually related to something resembling a very basic processor: Processors determine how many cells you have to code in, the number of variables (registers) and how deep the stack can be; The IN/OUT commands send/receive raw bytes to simulated devices (motors, sensors etc.) and try to imagine each op as a block in a grid as seen in the image above. code:
|
# ? Mar 27, 2013 14:24 |
|
Yodzilla posted:I've heard that Sony is easy to work with regarding dev kit pricing for indie developers. I'm sure it's a case by case thing but that's coming from two devs I've spoken to about cross platform authoring. They have a divide between debug PS3s and their full-featured dev kits (I don't think they even lease full dev kits to anybody other than large studios), so I'm assuming Sony will either stick with that model or make a shift towards how the 360 deals with it - allowing indie developers to deploy to their own consoles for testing (without full debugging features), which would make Unity a very attractive prospect and get a lot more content into the PS3 marketplace. Edit; compared to Microsoft they definitely treat indie developers as proper clients and actually want them to make games for their platform, instead of the "it's a privilege to make games for the Xbox and we are doing you a favor" attitude Microsoft has. It's unfortunate that it's not as easy to develop for, currently. The Gripper fucked around with this message at 14:31 on Mar 27, 2013 |
# ? Mar 27, 2013 14:25 |
|
Cancelbot: Far be it from me to criticize someone for designing a brutally complicated educational puzzle game, but I think you're underestimating how many blocks like that will be necessary to build up high level behaviors. Can you imagine writing the equivalent of a thousand-line C program in raw, straight-line assembly? If you like the assembly language-like style, design a simpler game that is more suited to OR provide some means of abstraction. You could, for example, allow users to group together cells into subcircuits which could be reused, slowly building up more powerful capabilities.
|
# ? Mar 27, 2013 14:34 |
|
Internet Janitor posted:Cancelbot: Far be it from me to criticize someone for designing a brutally complicated educational puzzle game, but I think you're underestimating how many blocks like that will be necessary to build up high level behaviors. Can you imagine writing the equivalent of a thousand-line C program in raw, straight-line assembly? If you like the assembly language-like style, design a simpler game that is more suited to OR provide some means of abstraction. You could, for example, allow users to group together cells into subcircuits which could be reused, slowly building up more powerful capabilities. You're right - I think there's two potential games at the moment; higher level robot punching simulator and lower level manipulate an LED to win: the game. Building up sub-components is a good idea as the potential grid space would grow enormously. But you already mentioned that
|
# ? Mar 27, 2013 14:40 |
SupSuper posted:What's the preferred method of handling savegames (without built-in serialization)? Do you use human-readable formats like XML/YAML so they're easy to debug and maintain but cumbersome? Or do you prefer custom binary formats that are fast and efficient but a pain to work with? I've done all of these and serialization is a godsend. Why can't you use it? If you have to choose between the last two stick with XML, "cumbersome" is hardly an issue these days, your only worry should be people editing the save file. Cancelbot posted:More of a conceptual/what is fun question, I'm essentially ripping off Carnage Heart by building a 2D game where robots are controlled by flow-diagram code. Back in 2004 () I remember a game that worked exactly like this made in Game Maker, I believe it was made by a fellow called EricDB, I don't think it had stacks or variables, just the ability to scan for obstacles/enemies in a relative rotation, check fuel/damage status, and move/shoot. Is there any reason you can't start out with look/move commands and expand on them as the game goes on? Polio Vax Scene fucked around with this message at 14:45 on Mar 27, 2013 |
|
# ? Mar 27, 2013 14:41 |
|
SupSuper posted:What's the preferred method of handling savegames (without built-in serialization)? Do you use human-readable formats like XML/YAML so they're easy to debug and maintain but cumbersome? Or do you prefer custom binary formats that are fast and efficient but a pain to work with? Why don't you use something in-between like messagepack? Fast and efficient but easy to work with.
|
# ? Mar 27, 2013 15:25 |
|
What format you use to store the data doesn't matter a whole lot, the main barrier to save games is making sure they're properly planned for. The two main things you need to do are make sure that save data can be handled as an actual island of data (i.e. you need to be able to reconstruct references, possibly circular ones, and you need to be able to store references to other subsystems like the renderer without traversing into those subsystems), and you may need to think about how you're going to handle version compatibility (i.e. storing a minimal set of checkpoint-anchored data is usually easy to make in a way that survives game updates, but frozen world states with actual objects in them are not). One thing to watch out for with JSON and XML is that both of them are hierarchical formats, so they don't really like circular references. There are things you can do with IDs in XML, but it's not entirely straightforward. OneEightHundred fucked around with this message at 15:46 on Mar 27, 2013 |
# ? Mar 27, 2013 15:43 |
|
So I'm having a problem setting up a JRPG-type battle system in Unity. Basically, I declared each of my GameObjects and linked them to the appropriate GameObjects in the inspector. Then I loaded them into my battleParticipantsUnsorted array. Whenever I get to the foreach loop, though, it returns a null reference exception, and I can't figure out why. My comments are overdone because this is for a class project, and all of us are designers rather than programmers. This is my first time trying to do something big in Unity. Please be gentle. code:
|
# ? Mar 27, 2013 16:30 |
|
HarkToTheLoons posted:So I'm having a problem setting up a JRPG-type battle system in Unity. Basically, I declared each of my GameObjects and linked them to the appropriate GameObjects in the inspector. Then I loaded them into my battleParticipantsUnsorted array. Whenever I get to the foreach loop, though, it returns a null reference exception, and I can't figure out why. vvvv Ahh, I didn't check that far because he said "when I get to the foreach loop" not "a couple of lines into the foreach loop". Using the debugger and a breakpoint would have helped find the problem anyway though, teaching a man to fish and all that. I think in js you're still supposed to cast a GetComponent return value, and in C# you'd use a template GetComponent<scriptname>() roomforthetuna fucked around with this message at 20:50 on Mar 27, 2013 |
# ? Mar 27, 2013 16:36 |
|
HarkToTheLoons posted:
Assuming everything else is correct - this would be your problem. Usually I'd pass the Type of the object to GetComponent() - until I went and checked the Unity documentation just now I didn't know you could pass it a script name in a string instead. Anyway - if passing a string as the parameter you should drop the .cs from the end and it seems it should work. To be honest though, you should probably just pass the type of the object - and then the cast would be unnecessary. so: code:
Torch Dexter fucked around with this message at 20:55 on Mar 27, 2013 |
# ? Mar 27, 2013 20:45 |
|
I got the game dev bug again, and I decided it was time to learn Unity, since my pygame projects always end up hitting a performance wall as soon as they really get going, particular due to the language's lack of proper threading. I went through a fun little tutorial where I made a clock and it looks pretty cool, but I just wanted to make sure I'm not headed down completely the wrong path before I spend a lot of time with it. I'm only creating objects and things by hand in the GUI right now because it's there to help beginners, right? Once I really learn how to use the environment, I hope to be able to do everything dynamically in code. I don't want to have to create each entity by hand that I might need in the game, but should be able to just create them out in code as I need them. The main thing I'm hoping to leverage here is an easy to use 3D environment, since I've only ever done 2D games in the past. For the moment, it's basically just going to be a flat plane with different sized blocks on it.
|
# ? Mar 27, 2013 21:54 |
|
My (C#) game engine uses Lua scripts for all game logic. I am considering switching to C# scripting for a number of reasons. Does anyone have any good (preferably highly technical) articles on how Unity does this? I have an idea on how to go about accomplishing what I need (aggregate all scripts and use CSharpCodeCompiler to dynamically generate an assembly) but I want to see if there's any gotchas or concepts that I haven't considered yet. Edit: For anyone who might be interested, here's my reasons for switching from Lua to C#: Better libraries (.NET), better IDE, no cross-language datatype conversions necessary (since the engine is in C#), better memory management (LuaInterface is kind of flaky), better performance, better debugging (this is a big deal). Orzo fucked around with this message at 22:01 on Mar 27, 2013 |
# ? Mar 27, 2013 21:56 |
|
SlightlyMadman posted:I got the game dev bug again, and I decided it was time to learn Unity, since my pygame projects always end up hitting a performance wall as soon as they really get going, particular due to the language's lack of proper threading. It depends on the game you're trying to create; in some cases the unity editor is really useful, like creating a big scripted level for an RPG or adventure game. However there's nothing stopping you from doing everything programatically, and a lot of people like Futile, which is a completely programatic. My games are almost entirely instantiated in code, with each scene typically only having a camera and a manager object with a "manager" script. It's quite straightforward once you get used to it, I'd dive right in. Orzo I have no articles, but yay for runtime-compiled C#, I think you're going to be happy with the results. I've never read a technical article on doing it, but I've done runtime-compiled C# scripting for several projects, both hobby and commercial (with millions of installs, without any significant hiccups). I find it quite straightforward to just compile the scripts into an assembly or application domain (depending on the scope of the script) and reflect into it. I'd be happy to see any good articles you dig up on approaches, since I typically just get-it-done without a lot of finesse. Unormal fucked around with this message at 22:31 on Mar 27, 2013 |
# ? Mar 27, 2013 22:29 |
|
Cool, I'm thinking of putting together a city sim, like probably several thousand other hobbyist programmers are doing right now, to try to scratch the itch that SimCity completely failed to even get near. I figured Unity will make it easy to just put together a 3D world with camera and everything, and I can start by just representing the buildings as different sized blocks, and maybe skin them later. Of course the buildings need to be created and grown dynamically in-game, so I wanted to make sure that was possible. I'll keep going through the tutorials and hopefully it will become clear.
|
# ? Mar 27, 2013 22:32 |
|
SlightlyMadman posted:Cool, I'm thinking of putting together a city sim, like probably several thousand other hobbyist programmers are doing right now, to try to scratch the itch that SimCity completely failed to even get near. Well, for example, click any object in the editor. The entries like "Transform" and "Camera" down the inspector for that object are just "component" classes that have been added to that object; and the fields are usually simple reflection on the properties of those component classes. You could create an exactly-behaving copy for an object with a particular set of compoennts (in this case, for pure example, Physics and Whatever1, Whatever2, etc...) by going something like: GameObject G = new GameObject(); G.AddComponent<Physics>(); G.GetComponent<Physics>().PropertyWhatever = blah blah; ... G.AddCompoennt<Whatever1..n>(); G.GetComponent<Whatever1..n>().Property1..n = blah blah; ... etc There's nothing magic going on in the editor. Once you make that leap, and realize you can just add/remove components very easily willy-nilly in code and it mostly just works, you've pretty much understood how the core of Unity works. All the actual behavior for any particular object just comes from the behavior/event-responses of whatever components it happens to have, and can be changed on the fly by adding/removing/modifying components of those objects.
|
# ? Mar 27, 2013 22:39 |
|
|
# ? May 23, 2024 03:47 |
|
Ah thank you! That's exactly what I was hoping to hear.
|
# ? Mar 27, 2013 22:43 |