• 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.

Indie Game Development Discussion Thread | Of Being Professionally Poor

Status
Not open for further replies.

missile

Member
@JNT: Do you have selections as well? Am towards completion of having
selections within edit boxes. I just need to do some more adjustments, some
more keyboard interactions, and a way to render it all out (nothing special,
just a solid rectangle for demonstration purpose, I guess).
 
Anyone knows how to get fast input reading in Unity?

I'm using Input.GetKeyUp(KeyCode) on the Update method but it's nowhere near fast enough for my needs.

I guess I should poll for key inputs outside the Update methods that is framerate limited, but I have no clue how to do it in Unity.
 
Anyone knows how to get fast input reading in Unity?

I'm using Input.GetKeyUp(KeyCode) on the Update method but it's nowhere near fast enough for my needs.

I guess I should poll for key inputs outside the Update methods that is framerate limited, but I have no clue how to do it in Unity.

I don't know if it will help with speed, but I'd suggest key polling is done in fixedupdate rather than update for consistency of polling if nothing else
 

razu

Member
Anyone knows how to get fast input reading in Unity?

I'm using Input.GetKeyUp(KeyCode) on the Update method but it's nowhere near fast enough for my needs.

I guess I should poll for key inputs outside the Update methods that is framerate limited, but I have no clue how to do it in Unity.

Maybe read here: http://www.sophiehoulden.com/super-fast-input-in-unity/

Although I'm not sure a keyboard is guaranteed to update faster than the display anyway. Probably a per-driver/HW controller thing.


I don't know if it will help with speed, but I'd suggest key polling is done in fixedupdate rather than update for consistency of polling if nothing else

Actually, you can miss key presses if you just check in FixedUpdate as you could have had two Updates, the key could be released in the first Update, meaning the next FixedUpdate won't see it. I assume you don't get two presses in a row if your game is running slowly enough to do two FixedUpdates in a frame. You'd have to test that.
 

JNT

Member
Yeah, there is sort of a hell in there in rendering TTFs with all their quirks
like hinting and such. Freetype 2 was gone through it, twice! xD Well, I don't
want to write another true TTF render. This would take way too much time as
you said. If anyone would require me to have TTFs in my GUI, I would use
Freetype 2 immediately. No problem. However, I have a natural interest on the
subject. Font rendering is sort of a stepchild in rendering and is most often
excluded in any book on rendering just for the simplest case, i.e. bitmapped
fonts. And since I want to gain some more proficiency on the subject, I will
do some experiments on my own. That's it.
I take this stance regarding a lot of things as well. Sure, reinventing the wheel may not be the best use of one's time, but if the wheel breaks it would be nice to have a sufficient understanding of the device to actually repair it, and maybe even advance it.

@JNT: Do you have selections as well? Am towards completion of having
selections within edit boxes. I just need to do some more adjustments, some
more keyboard interactions, and a way to render it all out (nothing special,
just a solid rectangle for demonstration purpose, I guess).
Yeah, I did. I can't remember exactly how it was implemented, but I think I simply split the caret in two (i.e. two top pointers on the stack) and then if a key was pressed (effectively replacing the selected text) I simply moved one of the carets to the same position as the other without pushing the contents of one stack to the other. On a visual level I simply made a call to FillRect.
 

DinkyDev

Neo Member
Maybe read here: http://www.sophiehoulden.com/super-fast-input-in-unity/

Although I'm not sure a keyboard is guaranteed to update faster than the display anyway. Probably a per-driver/HW controller thing.
Her 'fast input' method is only really applicable to small games like hers where the 'simulation' is very, very cheap.

She runs the simulation between every input event. That would result in spikes if many events were fired within one rendering frame (i.e. imagine bashing the keyboard).

I think her solution is overkill for anything other than simple, reaction games. I'm more in favour of doing say 60Hz input processing in a 30Hz game etc.
 

Blizzard

Banned
In my engine I run the update cycle at 120 Hz and the screen updates at 60 Hz. However, I'm not doing a twitch game so I'm not certain if SFML would catch very quickly pressed-and-released keys. I'm probably doing input-handling at 60 Hz and might very well miss those.
 

razu

Member
Her 'fast input' method is only really applicable to small games like hers where the 'simulation' is very, very cheap.

She runs the simulation between every input event. That would result in spikes if many events were fired within one rendering frame (i.e. imagine bashing the keyboard).

I think her solution is overkill for anything other than simple, reaction games. I'm more in favour of doing say 60Hz input processing in a 30Hz game etc.

Well, set your physics timestep to 1/60th and vsync to 2. You'll get two FixedUpdates per rendered frame. The problem you'll have is that they won't be spaced at regular intervals. They'll be right after each other, with almost 1/30th of a second between the next pair. And occasionally you'll probably get 1 FixedUpdate, or 3. Probably not what you're after.

If your aim is responsive controls, rendering 60fps is the biggest win. In fact, updating input at about 10Hz and rendering an interpolated 60Hz will feel better than rendering 30fps. It's more about perception of control than actual control.

Of course, best to update and render at 60. It would be good if Unity had a simple mode that did one update and one render per frame, and you just had to ensure it could fit in 1/60th for your target hardware.

The original question, however, was what's the quickest way of reading input. And I think her input method is as good as you're going to get in Unity. When you're asking questions like that though, you're probably not thinking everything through correctly. It's a complicated subject.
 

Ashodin

Member
...And I FINALLY have gamepads working properly. XD

oh wow hehe. Yeah I know that feeling.

TvVGEO4.png


Boarly an enemy yet.
 
Arrrg I spent 3 hours trying to upload my game to Apple's store. So tired of their bullshit and it's still not up. I just want to be done with this game and move on to the next one.
 

missile

Member
I take this stance regarding a lot of things as well. Sure, reinventing the wheel may not be the best use of one's time, but if the wheel breaks it would be nice to have a sufficient understanding of the device to actually repair it, and maybe even advance it. ...

Learning is about recreating from scratch. Despite the outcome may be the same
many times, the way of approach and the insight gained will be different each
time for everyone. Meaning, everyone who has recreated things from scratch
will have a different perspective as any other who ever did the same thing
before on the same subject. And that's a key point. It's not about gaining the
same result (the result is just used for verification), it's about gaining a
new perspective altogether. Combining said perspectives can lead to new things
exiting the results of old.
 

missile

Member
O1Og74X.gif


Selections are working! Some minor formatting of the selection and text and
everything will be fine. Next thing is to modify the selection upon key/mouse-
pressing (delete, insert, etc.) and to build a clipboard for copy & paste.
 
Maybe read here: http://www.sophiehoulden.com/super-fast-input-in-unity/

Although I'm not sure a keyboard is guaranteed to update faster than the display anyway. Probably a per-driver/HW controller thing.

Actually, you can miss key presses if you just check in FixedUpdate as you could have had two Updates, the key could be released in the first Update, meaning the next FixedUpdate won't see it. I assume you don't get two presses in a row if your game is running slowly enough to do two FixedUpdates in a frame. You'd have to test that.

Thanks, I'll try that URL you posted.
Why not Input.GetKeyDown?

I'm trying to do something like typing of the dead, with keydown if the text contains the same letter twice in a row a single key press could register both and I don't want that.

If anyone is interested I managed to do it this way I found online:

http://akilram.com/low-level-input-access-on-windows-in-unity/
 

JulianImp

Member
My first standing animation!
leis_000.gif

(still not final)
Man standing animations are harder than expected.

The primary reason I've mostly been making games about spheres and cubes is because I'm deathly afraid of animating stuff and getting it right. I'll eventually try doing some humanoid characters once I'm more comfortable with my drawing skills, though.

I'd say she looks kind of stiff, besides the arms. Perhaps it'd be better if she moved less to the sides and a bit more up and down, possibly by bending her kness some more.
 

2+2=5

The Amiga Brotherhood
The primary reason I've mostly been making games about spheres and cubes is because I'm deathly afraid of animating stuff and getting it right. I'll eventually try doing some humanoid characters once I'm more comfortable with my drawing skills, though.

I'd say she looks kind of stiff, besides the arms. Perhaps it'd be better if she moved less to the sides and a bit more up and down, possibly by bending her kness some more.

Thanks for the input! :D

Her stiffness is sort of wanted(but i don't want animations to look stiff), game's major inspiration is Budokan, i want the game to be/look more "realistic"(let's say so) than other fighting games, in real armed matches fighters don't move that much, they are almost still waiting for the opportunity to attack(most of the Soul Calibur fighters don't move too much when standing)
An example of kendo match(i didn't find dual knives matches lol)
http://www.youtube.com/watch?v=i9PBLhaYodY

About the animation itself the initial idea was to do something like this(taken from Beast's Fury thread)
d63a9c371aebfb3a84bbbf2371984b24_large.gif


But that doesn't fit the character, but again the animation is not final, the final one could be totally different lol!
Anyway i'll try to improve it, thanks again :)
 

Dascu

Member
How active is IndieGoGo these days? I want to do a small little campaign for Malebolgia, to cover costs for some of the last steps. Unity licenses, some legal fees, etc. The total would likely be around 5000-6000 euro.

I'm not sure if it's worth doing a Kickstarter for this amount, as that involves a bit more work to get the marketing quality up to a higher standard and to get the funds from the UK to Europe/Belgium.
 

lashman

Steam-GAF's Official Ambassador to Gaming-GAF
Marmoset tool bag? Are you using Unity version?

So busy getting acclimated at my new job that I haven't been posting. I know you all miss my top tier advice. :(

this one is marmoset (mostly for the insane AA ;)) but it looks pretty much the same in Unity with Alloy shaders :)
 

JulianImp

Member
Thanks for the input! :D

Her stiffness is sort of wanted(but i don't want animations to look stiff), game's major inspiration is Budokan, i want the game to be/look more "realistic"(let's say so) than other fighting games, in real armed matches fighters don't move that much, they are almost still waiting for the opportunity to attack(most of the Soul Calibur fighters don't move too much when standing)
An example of kendo match(i didn't find dual knives matches lol)
http://www.youtube.com/watch?v=i9PBLhaYodY

About the animation itself the initial idea was to do something like this(taken from Beast's Fury thread)
d63a9c371aebfb3a84bbbf2371984b24_large.gif


But that doesn't fit the character, but again the animation is not final, the final one could be totally different lol!
Anyway i'll try to improve it, thanks again :)

I'd say, if you're aiming for realism, that she probably shouldn't be moving the knives back and forth as much as she does in the current sprite, since the amount of movement kind of looks like what I'd expect for a crawling animation rather than an idle pose.

I've just done some quick searches, and while I haven't spotted any dual knife videos, there's one of an exhibition match which belongs to some History Channel program: https://www.youtube.com/watch?v=rkHwe0anWnk

From what I can see, it looks like knife fights aren't just about the weapon, but also about diverting your opponents' attacks with your free hand. Given this video, it looks like a reverse grip is better for defense, while a forward grip's strength lies in offense, so I'd say that perhaps your character could use a kife in each position? I guess the dominant hand would have to take the forward grip and be used for stabs and long-range slashes, while the reverse grip could do short-range follow-up slashes for combo attacks as well as counters (can you even parry with a knife?).

Alternatively, you could have her keep the non-dominant knife holstered, perhaps on her waist rather than her leg to allow for faster retrieval, which'd also allow her to better counter enemy attacks with her now free hand (if that's something you want to do in your game, that is).
 

Foshy

Member
Anyone participating in the Epic Game Jam? It just started, lasts 45 hours from now.

Theme is "First Time". They also have a list of subthemes (which will be steadily updated if I understood correctly), which are optional to include.

Got a rough idea of what I want to do already, will keep you guys updated if I decide to go through with it.
 

2+2=5

The Amiga Brotherhood
I'd say, if you're aiming for realism, that she probably shouldn't be moving the knives back and forth as much as she does in the current sprite, since the amount of movement kind of looks like what I'd expect for a crawling animation rather than an idle pose.

I've just done some quick searches, and while I haven't spotted any dual knife videos, there's one of an exhibition match which belongs to some History Channel program: https://www.youtube.com/watch?v=rkHwe0anWnk

From what I can see, it looks like knife fights aren't just about the weapon, but also about diverting your opponents' attacks with your free hand. Given this video, it looks like a reverse grip is better for defense, while a forward grip's strength lies in offense, so I'd say that perhaps your character could use a kife in each position? I guess the dominant hand would have to take the forward grip and be used for stabs and long-range slashes, while the reverse grip could do short-range follow-up slashes for combo attacks as well as counters (can you even parry with a knife?).

Alternatively, you could have her keep the non-dominant knife holstered, perhaps on her waist rather than her leg to allow for faster retrieval, which'd also allow her to better counter enemy attacks with her now free hand (if that's something you want to do in your game, that is).

:O
Thanks for the video and your thoughts! :D

The game will still be "gamey", it won't be 100% realistic, but more realistic than average fighting games, maybe i should cal it an arcade martial game or something similar.
While the idea of using a bare hand is undeniably very cool i want characters to use only weapons for both attack and defense.

For the two knives style of combat i essentially use game and anime characters as reference, i'm still debating if using normal grip attacks, the initial idea was that she rotates a knife before landing some attacks, like in this very old animation

leifc_ani.png


(man she was very ugly at the beginning lol)
but that could be problematic for a certain mechanic i want to implement and seeing how other game characters were made i'm thinking of making reverse grip attacks only, like this(just a quick mockup i made time ago, everything is wrong, not final!)

leiff.png


but everything is still a work in progress so we'll see!

The idea of the game is basically a less serious Budokan with more picturesque characters, a story mode, various modes and other additions.
 

GulAtiCa

Member
Been working on a new update for my game today. Currently working on updating the background of a map called "Nebula", which I really HATEd how "static" it looked and how it made it seem stale. Bothered me. So now I'm going back and animating it, and changing stuff a little.

Here is what it looked like before: (I'm reducing size to not bog down everyone's internet :p )

To now this look:

Animated a little with a twist effect to be like this:
O4J.gif


Certainly in the right direction I think.

Think I might go a bit father and separate it into multiple layers for different color sections and do similar effect in different directions to make it appear more animated. Will need to redraw it of course.
 

Ashodin

Member
Your comments fuel my artist's rage (and creativity!)

Also the boar got mad I was riding him and now chases me!

wA0qiK3.gif


s8986Xm.gif


What the fuck is THAT
 

Anustart

Member
I'm so stupid and cannot find a good cg shader tutorial that my dumb ass brain can wrap my head around. I'm just on the verge of fucking trashing my pitiful work because it's obvious I'm not good enough.
 
Status
Not open for further replies.
Top Bottom