• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

GAF Indie Game Development Thread 2: High Res Work for Low Res Pay

Status
Not open for further replies.
A1pktHM.png


so, my game has melee and shield equips, and i need ideas for two more melee weapons and one more shield. They just have to be internety things. Anyone have any ideas?

How about The Packet Smasher and Cookie Monster for weapons and The Human Contact Barrier for a shield?
 

Popstar

Member
I took some code I had to render Quake 3 levels and added a parser for the Q3 "shader" files that collapses the rendering passes and creates single-pass GLSL shaders.

Even though the result is the same the actual rendering pipeline is quite different. Quake 3 calculated everything on the CPU and sent batches of simple triangles to render in multiple passes. I wrote everything more modern so all the geometry is resident on the GPU. With the CPU sorting for state changes and creating grouped draw commands (glMultiDrawStuff).

Not sure if I'll do anything with it.

pXYLaLO.gif
 

mantrakid

Member
I have a question... If anyone experienced in 3d and texturing esp in unity could lend their expertise, i would be so indebted..

gridlines.png


in unity, is it possible to add a texture to a 3d object that is essentially a ‘grid’ set to a specific size.. for example.. say i had 3 rubicks cubes that had various coloured faces (just like a rubicks cube) one was a 2x2x2 cube, one a 3x3x3 cube and one a 5x5x5 cube

lets say my models of the cubes are simply cubes, no indentations on where each of the smaller square faces are.. my first texture is simply the coloured squares of the cube. so the actual 2x2 / 3x3 / 5x5 faces

is it now possible to add another texture on top of that which is essentially the ‘gridlines’ or ‘in between’ pieces between each of the coloured squares?

I am trying to find the least time consuming way to do it... basically i want to add gridlines onto blocky (retro) voxel-like models without actually painstakingly painting them in by hand gridline by gridline...

any help is huge..! oxoxoo
 
Thanks!
Damn, things just got way too hard for us.

I guess I'm just going to do transitions when the backgrounds changes. ahah

You can actually do what you want in Photoshop fairly easily (with some planing) with 2D images to create a 360 Panoramic image (without worrying about perspective lines). You'll just get some image distortion on the edges and you won't get the perspective changes on objects, but you could still get really good results. You could also create a cube map and that essentially works the same (might not look as good though).

EDIT: I Actually take that back, I do not know how you guys are setting up the background or what engine you are using, but in Photoshop, the effect is really easy to achieve with 2D images.
 

Ito

Member
Hmm. Yesterday I found a solution to something that had me really concerned about Game Maker: Studio. I'll share it here in case any GMS users have the same problem:

If you are working with a lot of really big backgrounds (like I'm doing), you might have seen yourself in a situation where Game Maker can't create the texture pages because there's not enough RAM memory, thus causing the compile to fail.

You can try smaller texture pages (which will increase the ammount of texture page swapping and affect performance), or even freeing more RAM before compiling (which can be inconvinient, since compiling times are long and you might want to keep doing things in the meantime).

But if you keep adding backgrounds and other resources to your game, you'll unavoidably come to the point where you need more RAM memory.

Now, lets say that you can't upgrade your system's memory. Maybe because you don't have available slots in your motherboard. Or perhaps adding more RAM would be pointless because the architecture of your OS doesn't allow it (as it was my case, being a 32 bit Windows 7 user with 3 GB of RAM).

If you can't/don't want to buy a more powerfull machine, there's a solution to effectively compile your game and all your expensive graphic resources:

1st: After the compile fails and you get the out of memory window, close the game window and stop the debugger/player.

- 2nd: DO NOT CLEAR THE COMPILED ASSET CACHE. It's the first thing that the Game Maker Forum users will tell you to do -> "If compile fails, clear the cache, free ram, and try again". This might work sometimes, but it usually means that you're on the edge of not having enough memory to continue making your game.

- 3rd: Hit compile again. Since we haven't cleared the previously compiled assets, GM won't try to create again the troublesome texture page.

- 4th: If you keep getting "out of memory" errors (because there's more than one texture page that GM can't create), repeat 1, 2, and 3, until your game launches. I only get the out of memory error once (because of a certain amount of particularly expensive backgrounds that belong to the same texture group).

- 5th: Now, here comes the tricky part: finding the texture page that GM couldn't create. In my case, it was pretty easy since it was the last texture group I created. If it's not your case, you can check the temporary directory where Game Maker stores the created texture pages, or you can go through your entire game till you find the room with the failed backgrounds. You'll recognise them pretty easily: they'll look, glitchy, cut and/or smeared.

- 6th: Now, close your game, and in the GM editor, open one of the backgrounds that belong to the same texture group of the failed texture page, edit it (paint a transparent pixel for example) and save the changes.

- 7th: Compile again. Since you've changed this texture group, GM will try to compile its texture page/s again. But this time that will be the only thing that GM will compile, since the rest of your resources are already there from the last try.

Now, Game Maker should at last be able to compile that stupid texture page. If it doesn't, well, you'll have to free some RAM and try again. and if It still doesn't compile it... you're definitely trying to compile something that's too big for you system to handle. Try splitting it into 2 or 4 different backgrounds, then drawing them side by side.



This worked for me, and allows my 3GB of RAM system to compile 2048x2048 texture pages without having to close other programs (photoshop, skype, etc).

I hope it helps! (what I really hope is that you don't have the shitty PC I have).

EDIT: Before doing this, obviously... optimize your resources! Avoid big, repetitive backgrounds if you can make them smaller and draw them tiled or stretched. Crop your sprites and backgrounds to get rid of as much empty space as possible, even if that means having to split your picture in different parts. Most gradients cant be reduced to a 1 pixel wide background that can be stretched to fit the screen width. If all your animated sprite does is rotating or changing its colour, do it with code instead. I remember this article being specially useful > http://www.yoyogames.com/tech_blog/30

3PiKYKl.png
 
All good advice ^^

I would say though, 1 pixel wide anything is not a power of 2 so if you create a 2048x1 gradient - it gets its own 2048x2048 and can't be packed. I believe (someone correct me), Po2 requires a minimum of 8x8 - IIRC. I see a lot of people run into memory issues with improperly sized textures and sprites simply due to Po2 scaling.
 

mStudios

Member

You know how I fix my problems I had with GameMaker?
Leaving GameMaker behind.
It's a good engine for small/prototype games. Once you wanna go "hard" becomes shit.
I tried my best to do what I wanted on GameMaker but I was having trouble in every single corner.
I don't know what kind of magic you're using to do your game, but when I was using gamemaker, big background were a BIG issue.

The engine is just not good, horrible performance. There so many obvious thing that needs to be fix/modernized, but they still are doing their best to do the worst.

I remember how I had a trouble and I emailed then and they took AGES to fix it(after 4-5 updates). By that time I have moved onto another engine (Unity).

And now that they were bought by another company, I don't know what to expect in the future...
 
any help is huge..!

If your models are actually the 'blocks' used rather than a 2x2 being a resized 1x1 or whatever, you could probably write a shader that draws extra lines over a diffuse texture at model vertices? Like a wireframe shader would, but I would assume excluding drawing the hypotenuse on triangles, so it only draws quads?
 

Ito

Member
You know how I fix my problems I had with GameMaker?
Leaving GameMaker behind.
It's a good engine for small/prototype games. Once you wanna go "hard" becomes shit.
I tried my best to do what I wanted on GameMaker but I was having trouble in every single corner.
I don't know what kind of magic you're using to do your game, but when I was using gamemaker, big background were a BIG issue.

The engine is just not good, horrible performance. There so many obvious thing that needs to be fix/modernized, but they still are doing their best to do the worst.

I remember how I had a trouble and I emailed then and they took AGES to fix it(after 4-5 updates). By that time I have moved onto another engine (Unity).

And now that they were bought by another company, I don't know what to expect in the future...

Big backgrounds were an issue back on GM 8 and previous (when I had to load resources externally). Since GM changed the way it handles sprites (and began using texture atlas) it became much more flexible when it comes to background sizes. The issues I have are there because I'm working on a 6-7 years old computer with only 3 GB of RAM. Hell, even Adobe Photoshop CS6 gives me the "out of RAM" error sometimes when I'm exporting these backgrounds to .png files.

I don't think GM is horrible nor the performance that bad (and I still have to try the YoYo Compiler, which allegedly increases the performance). Of course it's not Unity and it has a lot of issues, but I think I'll be able to do the game I want to do there, and the game runs at 60+ FPS in machines older than mine.

Contrary to your experience with the YoYo user customer service, the only two times I needed their help and reported to their Mantis bug tracking thing, they did help me in a matter of days (I contacted them on twitter as well so that may have helped).

I think however that moving to Unity is a good choice for most devs. I don't do it because: a) I'm not a programmer; b) I want to finish this game before doing anything else in my life; which c) can be done perfectly on GMS. But if I succeed with this and buy myself some time to learn programming I'll definitely consider moving on.
 
I think GM is fine for what it does. It's lack of being a powerhouse tool isn't its largest problem. I personally found after toying with it a while back that it was extremely unintuitive from almost every aspect of development. Normal conventions found throughout the visual development toolsets from Photoshop, Maya, Unreal, Unity, etc - that seem like no-brainers from a convention and standard standpoint are brushed aside for more cumbersome methods.

That's about my only gripe with it. Feels like you are constantly ice skating uphill with things that you can knock out in minutes somewhere else.

People have made some fan-fucking-tastic games with it, though, and the evidence is right in this thread. If you are willing to put in the time to learn a tool inside and out I'm sure it's fine. For me, it just felt completely cumbersome.

Just my .02
 

Ito

Member
I think GM is fine for what it does. It's lack of being a powerhouse tool isn't its largest problem. I personally found after toying with it a while back that it was extremely unintuitive from almost every aspect of development. Normal conventions found throughout the visual development toolsets from Photoshop, Maya, Unreal, Unity, etc - that seem like no-brainers from a convention and standard standpoint are brushed aside for more cumbersome methods.

That's about my only gripe with it. Feels like you are constantly ice skating uphill with things that you can knock out in minutes somewhere else.

People have made some fan-fucking-tastic games with it, though, and the evidence is right in this thread. If you are willing to put in the time to learn a tool inside and out I'm sure it's fine. For me, it just felt completely cumbersome.

Just my .02

I agree with you. Learning to use GM is like getting used to always have a stone in your shoe or something like that. But it's definitely good enough for most 2d games, even when you're using big sprites and backgrounds.

And once you get into its logic and things start to match, the experience is much better, the outcomes much more predictable, and mishaps less frequent and more dependent on your lack of concentration.
 

UsagiWare

Neo Member
All good advice ^^

I would say though, 1 pixel wide anything is not a power of 2 so if you create a 2048x1 gradient - it gets its own 2048x2048 and can't be packed. I believe (someone correct me), Po2 requires a minimum of 8x8 - IIRC. I see a lot of people run into memory issues with improperly sized textures and sprites simply due to Po2 scaling.

Even 1 is a power of two (2^0).
Such resolutions should not be an issue (or else it sounds like a bug)


I also agree with the statement on Gamemaker.
My experience is that it does a lot of things right, and wrong...

I'm really wondering what GM2.0 will bring to the table.
 
Even 1 is a power of two (2^0).
Such resolutions should not be an issue (or else it sounds like a bug)


I also agree with the statement on Gamemaker.
My experience is that it does a lot of things right, and wrong...

I'm really wondering what GM2.0 will bring to the table.

Yup on GM and nope on 1.

Will not pack, will not compress. Unless it's a Unity only thing, which it shouldn't be as 1 is not a multiple of 4 or cleanly divisible by 4. It gets its own sheet and can't be packed. Just tried it again. You can get away with NPOT but it's quite the mess.

If you can compress a 1x1 texture/sprite then I'm missing something. Either 24/32 bit but that would be DXT1/DXT5 respectively and should have no bearing on the size of the sprite/texture as both still require a Po2, which 1x1 isn't.

Unity warns you when using these types of textures/sprites and if you look at your packer, they are always on their own sheet instead of packed nicely. Unless I'm just completely wrong about compression/Po2 - which I could be - or Unity just doesn't like it. If it is a bug then it's been there since I've been using Unity since 3.x and would have been fixed.

/shrug

I've been wrong about worse if that's the case but my knowledge doesn't spread too far outside of Unity and 8x8/Po2 is the industry standard.
 

UsagiWare

Neo Member
Yup on GM and nope on 1.

Will not pack, will not compress. Unless it's a Unity only thing, which it shouldn't be as 1 is not a multiple of 4 or cleanly divisible by 4. It gets its own sheet and can't be packed. Just tried it again. You can get away with NPOT but it's quite the mess.

If you can compress a 1x1 texture/sprite then I'm missing something. Either 24/32 bit but that would be DXT1/DXT5 respectively and should have no bearing on the size of the sprite/texture as both still require a Po2, which 1x1 isn't.

Unity warns you when using these types of textures/sprites and if you look at your packer, they are always on their own sheet instead of packed nicely. Unless I'm just completely wrong about compression/Po2 - which I could be - or Unity just doesn't like it. If it is a bug then it's been there since I've been using Unity since 3.x and would have been fixed.

/shrug

I've been wrong about worse if that's the case but my knowledge doesn't spread too far outside of Unity and 8x8/Po2 is the industry standard.

I didn't consider compressed textures, as they are block based I'm not sure how things behave then.
Gamemaker doesn't seem to care about this. Even 1x1 images work fine. But it packs multiple (arbitrary) sized images in a single atlas which is always a power-of-two resolution.
 

Popstar

Member
Don't mistake Unity's atrocious texture handling for actual reality. Like Usagi said, 2⁰ = 1.

Using 1 pixel wide textures is very common for things like look-up tables. Unity is just a mess when it comes to handling textures. It was a huge headache back when I was doing iOS stuff with 3.x. I would have though they'd have fixed it by now.
 
I didn't consider compressed textures, as they are block based I'm not sure how things behave then.
Gamemaker doesn't seem to care about this. Even 1x1 images work fine. But it packs multiple (arbitrary) sized images in a single atlas which is always a power-of-two resolution.
Aye. I'm not sure if engines have their own way of handling things. I've always stuck with multiples and Unity yells at me otherwise.

I know UE4 can go 1x1 without issues and creates atlases with them but I think (I'll need to look it up, don't use UE4) it throws them on 4x4 sheets for compression.

So all of my experience is extremely limited to Unity in regards to this kind of thing

Don't mistake Unity's atrocious texture handling for actual reality. Like Usagi said, 2⁰ = 1.

Using 1 pixel wide textures is very common for things like look-up tables. Unity is just a mess when it comes to handling textures. It was a huge headache back when I was doing iOS stuff with 3.x. I would have though they'd have fixed it by now.
There it is. I'll have to dive into it more, then. That would explain a few issues I had when bringing IC to iOS this year. I will read more - its obvious I need to learn more about this.
 

Turfster

Member
Anyone here done some UE4 work that might be able to help me?

I've been trying to implement a quick 180 turn, but am running into problems because root motion doesn't update the controller's rotation, so in following with the advice on the internet, I turned controller rotation off and back on. However, the result isn't satisfying.

When the root motion rotation finishes and the controller rotation is turned back on, it does an extra slow rotation instead of immediately using the new rotation as default.

Start of turning animation:
Code:
APawn::bUseControllerRotationYaw = false; 
AController* myController = APawn::GetController();
FRotator CurrentControllerRotation = myController->GetControlRotation();
CurrentControllerRotation.Add(0, 180.0f, 0); // same result with -180.0f
myController->SetControlRotation(CurrentControllerRotation);

and then at the end just a simple
Code:
APawn::bUseControllerRotationYaw = true;

I've also tried it without a root motion version of the animation originally, but that had an even uglier problem.


(I've tried APawn::FaceRotation, but that also does absolutely nothing useful as soon as the controller rotation is turned back on)
 

Jobbs

Banned
Speaking of UE4 (sorry I don't know the answer to your question ^) I've been watching blueprint videos trying to get a feel for what it does and how it works, and it looks much more powerful and cool than I previously thought. Definitely intrigued. Curiosity has turned into attention.
 

Turfster

Member
Speaking of UE4 (sorry I don't know the answer to your question ^) I've been watching blueprint videos trying to get a feel for what it does and how it works, and it looks much more powerful and cool than I previously thought. Definitely intrigued. Curiosity has turned into attention.

I'm not a big fan of BPs, but YMMV.
I just can't build up a logical function progression by dragging around little arrows and re-linking stuff when I need to swap things around, which breaks other links, etc etc.
It's so incredibly... messy, and gets really hard to track really fast.
 

desu

Member
I'm not a big fan of BPs, but YMMV.
I just can't build up a logical function progression by dragging around little arrows and re-linking stuff when I need to swap things around, which breaks other links, etc etc.
It's so incredibly... messy, and gets really hard to track really fast.

So you prefer coding?
 

Jobbs

Banned
I'm not a big fan of BPs, but YMMV.
I just can't build up a logical function progression by dragging around little arrows and re-linking stuff when I need to swap things around, which breaks other links, etc etc.
It's so incredibly... messy, and gets really hard to track really fast.

You probably have no earthly idea how "messy" my stencyl project is, like, anyone would faint if they saw it. Not that my work is genius, no, not at all, it's just the biggest clusterfuck at this point you could ever imagine and it's shocking that it all works. XD
 

Turfster

Member
So you prefer coding?

Definitely.
Unfortunately, the documentation for the code side is... lacking at the moment, as pretty much all tutorials and samples are axed more towards BP.
It's usually not too hard to go from one to the other, but it still takes some work.
Not all function names are the same, for example, and they do a couple of shortcuts in BP that you have to unpack and do a lot of busywork for in C++.

The most annoying one of these I've found so far are timelines.
In BP, you just drag a timeline node into your graph, and you're done.
In C++, you need to load your curve, create the timeline, hook up the functions (so far, so okay), and then explicitly tick every timeline you might have running in your class Tick function.
 

Blizzard

Banned
Definitely.
Unfortunately, the documentation for the code side is... lacking at the moment, as pretty much all tutorials and samples are axed more towards BP.
It's usually not too hard to go from one to the other, but it still takes some work.
Not all function names are the same, for example, and they do a couple of shortcuts in BP that you have to unpack and do a lot of busywork for in C++.

The most annoying one of these I've found so far are timelines.
In BP, you just drag a timeline node into your graph, and you're done.
In C++, you need to load your curve, create the timeline, hook up the functions (so far, so okay), and then explicitly tick every timeline you might have running in your class Tick function.
The efficiency and control of C++ can come at a price sometimes. :(

If you haven't seen these already, here are some UE4 C++ resources:
https://docs.unrealengine.com/latest/INT/Programming/Tutorials/index.html
https://wiki.unrealengine.com/First_Person_Shooter_C++_Tutorial

Also judging from the answerhub, make sure you've checked out K2Node_Timeline.h, K2Node_Timeline.cpp, and Timeline.cpp if you haven't already.
 

Turfster

Member
Also judging from the answerhub, make sure you've checked out K2Node_Timeline.h, K2Node_Timeline.cpp, and Timeline.cpp if you haven't already.

Yeah, I've pieced together a working system (without much help from outside, because back then, most of the answerhub/forum stuff was "how do I do this?" without any answers).
It's just been pretty kludgy.


The root motion/charactercontroller thing is annoying as hell.
I'm calling it a night, I've been banging my head against it for 2 days straight now.
 

desu

Member
Definitely.

I actually agree with you, I find it pretty cumbersome as soon as stuff gets a little bigger. However I work as programmer (C# and no C++) so whenever I used BP, it seemed more complicated and annoying compared to be able to easily change everything easily at will.

However I have to applaud Epic for their job on BP. I see so many people that have no programming knowledge doing amazing things with UE4 together with BP, always amazed me. I am used to programming and even for me C++ seems irretating at times so it's not surprising why people wouldn't pick up the engine without something like BP to get their foot in.

Whenever I have more time I need to get into C++ again, using BP was getting on my nerves xD.
 

Unain

Member
I'm not a big fan of BPs, but YMMV.
I just can't build up a logical function progression by dragging around little arrows and re-linking stuff when I need to swap things around, which breaks other links, etc etc.
It's so incredibly... messy, and gets really hard to track really fast.

Depends how you set it up and when to use functions/macros.
Its really quick with prototyping. I like making something in blueprint and optimize it in code later.
Also its pretty awesome with debugging.
 
Anyone here done some UE4 work that might be able to help me?

I've been trying to implement a quick 180 turn, but am running into problems because root motion doesn't update the controller's rotation, so in following with the advice on the internet, I turned controller rotation off and back on. However, the result isn't satisfying.

When the root motion rotation finishes and the controller rotation is turned back on, it does an extra slow rotation instead of immediately using the new rotation as default.

Start of turning animation:
Code:
APawn::bUseControllerRotationYaw = false; 
AController* myController = APawn::GetController();
FRotator CurrentControllerRotation = myController->GetControlRotation();
CurrentControllerRotation.Add(0, 180.0f, 0); // same result with -180.0f
myController->SetControlRotation(CurrentControllerRotation);

and then at the end just a simple
Code:
APawn::bUseControllerRotationYaw = true;

I've also tried it without a root motion version of the animation originally, but that had an even uglier problem.


(I've tried APawn::FaceRotation, but that also does absolutely nothing useful as soon as the controller rotation is turned back on)


I am probably missing something here, but it looks like your animation rotates more than 180, then snaps back when you add 180 to the controller rotation. Or is that the desired effect?
 

Turfster

Member
I am probably missing something here, but it looks like your animation rotates more than 180, then snaps back when you add 180 to the controller rotation. Or is that the desired effect?

The animation rotates 180 degrees exactly. The extra rotation comes from UE4 snapping back to the previous direction when the controlleryaw is turned back on then rotating to the desired one aka what should have been the outcome of the root animation.
Without the extra rotation, you just end up looking back at the red bar after the turn as soon as controlleryaw is turned back on and it snaps back to the stored controller "forward".

I admit, the video compression makes it kinda hard to see.
 
The animation rotates 180 degrees exactly. The extra rotation comes from UE4 snapping back to the previous direction when the controlleryaw is turned back on then rotating to the desired one aka what should have been the outcome of the root animation.
Without the extra rotation, you just end up looking back at the red bar after the turn as soon as controlleryaw is turned back on and it snaps back to the stored controller "forward".

I admit, the video compression makes it kinda hard to see.

That sounds like you are not actually getting root motion from your animation. When you made the animation, did you also rotate and set keys for the root bone?
 

Lautaro

Member
How are people here dealing with localization?

I've found that with my current setup (Unity + free plugin SmartLocalization + free Microsoft Translator) is very easy to get an automatic translation and put a lot of language options but I will still need a human to check for errors and words too long for some UI elements.

For example, I have no idea if this is good russian or not:

RF4PSckl.png
 

Turfster

Member
That sounds like you are not actually getting root motion from your animation. When you made the animation, did you also rotate and set keys for the root bone?

Yep.
If I don't turn the controller rotation back on, it ends as it should (but of course, I can't turn my character because then I'd have to rewrite the whole rotation control system to replicate what's already in the damn engine, but "forward" matches the view direction).
It's 100% the controller not being updated by UE4 to match the root motion, for some reason... which judging by what I've pieced together from the forum and answerhub, is "normal" since everyone does the turning off-rotation-turning back on.
It's just that nobody's complained about the damn extra jerking turn. Do they just not care?
 

Dynamite Shikoku

Congratulations, you really deserve it!
How are people here dealing with localization?

I've found that with my current setup (Unity + free plugin SmartLocalization + free Microsoft Translator) is very easy to get an automatic translation and put a lot of language options but I will still need a human to check for errors and words too long for some UI elements.

For example, I have no idea if this is good russian or not:

RF4PSckl.png

I haven't gotten to localisation yet, but I was going to use a site like onesky to get the translations. I don't know which site is best/cheapest though.
 

Turfster

Member
Just out of curiosity, how are you actually playing the animation in engine?

Hooked up to the animGraph with a boolean that gets tripped.
I've also tried it with a button and an animMontage, combined with a walk-animation transition.
No dice.
Without the explicit extra rotation, it just bounces back the moment I turn controller rotation back on.
Not turning off the controller rotation to start with also doesn't give the result I want.
 
Hooked up to the animGraph with a boolean that gets tripped.
I've also tried it with a button and an animMontage, combined with a walk-animation transition.
No dice.
Without the explicit extra rotation, it just bounces back the moment I turn controller rotation back on.
Not turning off the controller rotation to start with also doesn't give the result I want.


Hmmm, I don't understand how failing to update the controller rotation would cause snapping like that. Frankly I am not sure, but it really does look like you are not getting root motion from the animation. We did something similar with our game where we used root motion for a quick turn. We are doing a 3D side scroller so the camera is fixed (and no need to update the controller rotation), but I had a very similar looking issue with some transition animations where they would play then snap back to the state prior to the animation playing (like the video and how you described). The problem I had was that I wasn't actually getting the root motion from my animation. And for me, it was the little things that screwed me up. I had to double check the the root track actually had animation in it, imported animations assets had root motion checked, made sure all the animations where set up in Montages with slot nodes in the anim graph and that root motion was enabled on the slot. Turned out that my root tracks didn't actually have animation in them, and I didn't check root motion on the actual anim asset in engine. I would double check the little things, its always the little things that drive you nuts (or at least they drive me fucking nuts).
 

Turfster

Member
HI would double check the little things, its always the little things that drive you nuts (or at least they drive me fucking nuts).
Yeah, I'll take another look at it tomorrow, but I'm 100% sure my root is animated (basically, the ONLY thing rotating is the root, so since the character does the animation and rotates, it's working as intended).
Thanks for helping and considering angles, though.
I'll go over everything again tomorrow and hopefully find it.
 
I have no idea how UE handles animations but have you tried just lerping the axis?

Also how are you passing input from the input peripheral to the vector updates? Are you just placing them directly or holding a variable somewhere then passing that?

I ask because if the controller snaps back due to the axis rotation when entering a 180 - when the input is turned off and the action performed, can you not just invert the horizontal axis or offset its position so it winds up reading correctly instead of setting a "correct" reading? If so, does it snap back the very next frame? It's an odd issue to see from the video and I have no clue about controlling movement through animations and I'm interested to dabble in UE4 eventually and would like to pin this info for future reference. That's a lot of "and"s. Damn.
 

Jintor

Member
Looks good. Since it was your first four days, how are you finding working with collision detection and jump states?

collision detection isn't too bad right now the way i've implemented it (instead of using gamemaker's built in collision code I just have a place_meeting (x,y+1, obj_parSolid) check [modified for whatever detection I need].

jump states are currently a boolean but it's growing too unwieldy. I'm looking into what logic I'd need to make a state engine
 

Turfster

Member
I have no idea how UE handles animations but have you tried just lerping the axis?
The point is that the engine should really be doing all this for me without input from me. ;)
You build a sort of state machine of animations and IK modifiers & set conditions for when something has to transition to another state (isJumping bool true? switch to jumping state, etc) and back.

Also how are you passing input from the input peripheral to the vector updates? Are you just placing them directly or holding a variable somewhere then passing that?
You basically bind a key/axis to a function that gets passed a delta value every time it gets pushed/released/adjusted, which I then pass on to my built-in Controller component which then takes care of the rotation, lerping and limiting rotation and all that jazz.

I don't think the engine is set up for root motion for *everything*, but I might be wrong.
It's kinda hard to find recent and up to date information for quite a lot of things, really.
Half the docs and answerhub questions you find still talk about things from quite a few revisions ago.

Still like it better than I ever did Unity, though ;)
 
So I forced the issue using one of our test animations for our game and you can see why I think it may be an root animation issue

No root motion:
wFzb.gif


With root motion:
yFzb.gif


That snapping is fairly distinct with root motion issues
 
The point is that the engine should really be doing all this for me without input from me. ;)
You build a sort of state machine of animations and IK modifiers & set conditions for when something has to transition to another state (isJumping bool true? switch to jumping state, etc) and back.


You basically bind a key/axis to a function that gets passed a delta value every time it gets pushed/released/adjusted, which I then pass on to my built-in Controller component which then takes care of the rotation, lerping and limiting rotation and all that jazz.

I don't think the engine is set up for root motion for *everything*, but I might be wrong.
It's kinda hard to find recent and up to date information for quite a lot of things, really.
Half the docs and answerhub questions you find still talk about things from quite a few revisions ago.

Still like it better than I ever did Unity, though ;)

TLDR
Not saying I'm right - but decoupling an object that is controlled by peripheral input and moving it's vector through an animation (i'm assuming keyframed) sets off too many red flags. You're already controlling the object via code somewhere, overriding the vector with an animation while the code stays put in the background seems like its no bueno.

Long Version
I'm just curious as to why you chose animation to move a game object that is controlled externally via peripheral input. That seems like it's asking for trouble. If it's a 180 degree flip - wouldn't locking the input then manually lerping the horizontal axis 180 degrees be more efficient and less time consuming? If you are passing either the raw input from a mouse or analog stick input for turn controls to a variable, you can just emulate that via script to turn 180 degrees or lock the axis input and just lerp the vector. You can still animate a camera bob/lean if needed but I really don't feel that decoupling the method of controlling movement from external input and allowing an animation to move an object's vector is the best approach. It might be easy to simply animate a rotation but it introduces far more problems that need more solutions, IMO.

I'm not saying I'm right, either - I don't know the endgame of everything you want to do. I'm definitely not that advanced either so I look at this from a perspective of how I would approach this with my own limited knowledge and little information about what's happening. I just never do that sort of thing. Maybe lots of games do move objects through animation but there's no telling how that will end up close to a wall that someone rigged improperly, a table, any other object in the scene. At least via code you can perform multiple checks not only before executing the motion, but during each frame, as well, and adjust the gameobjects vector and rotation according to its next position in the next frame instead of having it hard-coded in an animation. There's about a zillion questions that pop up in my mind that I feel I need to protect against with a mechanic like this and animating it would raise too many red flags I wouldn't want to deal with ha! Of course, a lot of that depends on how accurate you need collision to be between the main player and other objects. But even simple capsules can get stuck on things that seem completely innocuous and should never happen to begin with.

It's one of the reasons even for my simple 2D game I have almost 20 unique scripts and hell knows how many lines of code involved just to make the player do things and even more code to protect against doing things he shouldn't. It's probably overkill but I've managed to prevent things from happening I've never encountered yet - because I know they exist and don't care to run into them. That's kinda the lens I look through, though. It's also why I take forever. The more questions I ask the more problems I avoid:

http://www.lizengland.com/blog/2014/04/the-door-problem/

Also - is that a tutorial you are following for your video? I swear I've seen almost that exact setup before in another UE video a while back but with robots.
 
Super early prototyping of a game :)

a3e6c9608b.gif


Love this phase, stuff changes so rapidly

This looks awesome. Reminds me of PS2 style burnout ^_^

If Game development were a marriage, prototyping is certainly the honeymoon phase. I think polish, QA and release is the phase that leads to divorce and embitterment.
 
Status
Not open for further replies.
Top Bottom