Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I'm adding a new menu that gives quick access to some commonly used settings, but I'm not sure which keyboard key to use to bring it up. I'm already using escape to go back, space bar brings up an equipment menu, return starts the mission. Tab is also already used. I'm already using the first few function keys and it feels awkward to put something like that on like F6.

I'm trying shift but it feels weird, and if you hit shift too many times windows brings up the sticky keys thing.

Adbot
ADBOT LOVES YOU

The Fool
Oct 16, 2003


Tilde

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
ok

The Fool
Oct 16, 2003


My fee for this one-in-a-million idea is credit on the opening splash screen.












seriously though, tilde is probably your best option. It's the old-school dev console button, it's easy to reach while playing and doesn't have any weird interactions like shift and alt can.

but like everything else, make it re-bindable if you can, and I don't actually know if it's location is different on non-US keyboard layouts.

Your Computer
Oct 3, 2008




Grimey Drawer
just please do not hardcode anything to tilde

it's something US developers keep doing and it's endlessly frustrating because a lot of EU QWERTY keyboards don't have tilde in the same place as US QWERTY keyboards and that sometimes makes a menu or input functionally inaccessible unless the user changes the system language input in the OS


(see if you can spot the tilde)

in some games/software this is a non-issue since it's just tied to the key (i.e. whatever's above tab) and not the input but it's still something I see way too often

The Fool
Oct 16, 2003


Is that Ctrl-Alt-\ ?


e: because even on us keyboards the tilde key isn't actually the tidle key, it's the backtick key and tilde is Shift-backtick

floofyscorp
Feb 12, 2007

On my keyboard layout the 'tilde'/backtick key is meant to be used for inputting accented characters, so it doesn't actually do anything on its own and this makes activating/deactivating dev consoles that are hardcoded to that input to be nigh-impossible to use.

Your Computer
Oct 3, 2008




Grimey Drawer

The Fool posted:

Is that Ctrl-Alt-\ ?


e: because even on us keyboards the tilde key isn't actually the tidle key, it's the backtick key and tilde is Shift-backtick
it's AltGr-¨ but the ¨/^/~ key is an accent key so just inputting it does nothing until you make a second input (so you can write ä, â, ã etc.) which means that to get ~ you need to input AltGr-¨ followed by space, breaking anything that expects just a '~' input

for that matter, Shift-backtick is also an accent key for writing characters like à and á :v:

floofyscorp posted:

On my keyboard layout the 'tilde'/backtick key is meant to be used for inputting accented characters, so it doesn't actually do anything on its own and this makes activating/deactivating dev consoles that are hardcoded to that input to be nigh-impossible to use.
so even hardcoding it to the key and not the input isn't enough, then. Jeez!

Your Computer fucked around with this message at 22:36 on Oct 17, 2019

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.

Your Computer posted:

just please do not hardcode anything to tilde

it's something US developers keep doing and it's endlessly frustrating because a lot of EU QWERTY keyboards don't have tilde in the same place as US QWERTY keyboards and that sometimes makes a menu or input functionally inaccessible unless the user changes the system language input in the OS


(see if you can spot the tilde)

in some games/software this is a non-issue since it's just tied to the key (i.e. whatever's above tab) and not the input but it's still something I see way too often

what's the snakey in the upper left? because maybe I can use that or tilde.

e: i think i'm listening for the key but I'm not sure.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

baby puzzle posted:

what's the snakey in the upper left? because maybe I can use that or tilde.

That is clearly the Simoleon symbol.

(Apparently the "section symbol" or "double S")

megane
Jun 20, 2008



It's a section sign, if that helps.

KillHour
Oct 28, 2007


Also, when people say tilde, they usually mean backtick. Just to save you some debugging if you're looking for the character.

Peewi
Nov 8, 2012

floofyscorp posted:

On my keyboard layout the 'tilde'/backtick key is meant to be used for inputting accented characters, so it doesn't actually do anything on its own and this makes activating/deactivating dev consoles that are hardcoded to that input to be nigh-impossible to use.

A key being for accents in text input shouldn't interfere with a game getting key events for that key.

I don't know anything about how to implement it, but there are some games that will show the localized key name for the user's keyboard layout and I think that's pretty nice.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
That reminds me, does anyone have a recommended asset pack or whatever for icons of controller buttons? If it interoperated with Rewired and I could just say "give me the image that corresponds to the Fire Guns action" that would be fantastic.

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.
https://twitter.com/DevSpacePrez/status/1185024913721253888?s=20

Bunnies :3:

You bet your rear end I'm planning on a rare spawn Rabbit of Caerbannog that flies across the map to bite your head off instantly

Also I'm not an artist so stuff like this blows my mind

https://twitter.com/mwaayk/status/1184709277681737728?s=20

I guess maybe I should try learning to do sprite art but I've got more than enough stuff to work on just doing the code and design and whatnot, IDK

Zaphod42 fucked around with this message at 03:55 on Oct 18, 2019

Zadda
Jan 27, 2007


Young Urchin

TooMuchAbstraction posted:

That reminds me, does anyone have a recommended asset pack or whatever for icons of controller buttons? If it interoperated with Rewired and I could just say "give me the image that corresponds to the Fire Guns action" that would be fantastic.

This may be of help :)

https://opengameart.org/content/free-keyboard-and-controllers-prompts-pack

Hammer Bro.
Jul 7, 2007

THUNDERDOME LOSER

There's also https://www.kenney.nl/assets/onscreen-controls -- I tend to enjoy Kenney's stuff, at least for prototyping.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Thanks, yeah, that looks useful! Now I just have to figure out how to identify the controller being used and what button to display for a given action.

EDIT: and Rewired's documentation has a step-by-step guide for doing exactly that.

TooMuchAbstraction fucked around with this message at 04:36 on Oct 18, 2019

Your Computer
Oct 3, 2008




Grimey Drawer

baby puzzle posted:

what's the snakey in the upper left? because maybe I can use that or tilde.

e: i think i'm listening for the key but I'm not sure.
just pressing the button it's actually '|' and not § (§ is Shift-|)

that said, what symbol is on that button varies from country to country a lot (check out https://en.wikipedia.org/wiki/QWERTY#Diacritical_marks_and_international_variants for just how many variations there are) so I wouldn't bind anything to a specific symbol

Peewi posted:

I don't know anything about how to implement it, but there are some games that will show the localized key name for the user's keyboard layout and I think that's pretty nice.
yeah, that would be nice (although I'm not sure I've ever seen it). I'm just used to seeing "press ~" and my mind goes "ah yes, the | key" :v:

KillHour
Oct 28, 2007


Bind it to the F24 key to annoy everyone equally.

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?

Zaphod42 posted:



https://twitter.com/mwaayk/status/1184709277681737728?s=20

I guess maybe I should try learning to do sprite art but I've got more than enough stuff to work on just doing the code and design and whatnot, IDK

Hell yeah smears are where it's at

Omi no Kami
Feb 19, 2014




Even with terrible, super-simple textures I'm getting happier with my ability to junk out generic office spaces! I'm finding that keeping a consistent scale is super-tough, though. I'm thinking for production assets I should probably just keep a guy and some modular floors/walls in every asset file and size props relative to that.

al-azad
May 28, 2009



Omi no Kami posted:



Even with terrible, super-simple textures I'm getting happier with my ability to junk out generic office spaces! I'm finding that keeping a consistent scale is super-tough, though. I'm thinking for production assets I should probably just keep a guy and some modular floors/walls in every asset file and size props relative to that.

Blender's default cube is 2x2 meters so the average adult person should fit within it. That's how I manage scale when importing back and forth.

Ignite Memories
Feb 27, 2005

Shoehead posted:

Hell yeah smears are where it's at

ayyyy whats up fam i heard we were talking about smears

Chev
Jul 19, 2010
Switchblade Switcharoo

Omi no Kami posted:



Even with terrible, super-simple textures I'm getting happier with my ability to junk out generic office spaces! I'm finding that keeping a consistent scale is super-tough, though. I'm thinking for production assets I should probably just keep a guy and some modular floors/walls in every asset file and size props relative to that.

If you're in Blender just link your character and whatever other reference you need to each file that needs them.

Your Computer
Oct 3, 2008




Grimey Drawer
so I had a bit of a galaxy brain moment as I was trying to figure out how to give the impression of dynamic shadows without using shadow mapping

I am already faking shadows in the environment by painting them on with vertex colors, right? ....so what if I simply use that information and darken the player model based on the vertex colors they're standing on? Walking into a dark cave or the shadow of a tall object would give the impression that they're casting their shadows onto the player! :pseudo:


It took me all day but... it seems to be working?
https://i.imgur.com/Xyu1saD.mp4

I threw the script into the level I'm working on and to my surprise it still seems to be working :woop:
https://i.imgur.com/VmsQA7i.mp4

it still needs some things ironed out and the code is.... not pretty, but I still can't believe I got it working. I feel like there has to be a better way of doing it though because right now the code is kinda bonkers and I just did whatever I felt like could work :v: The script starts by calculating the positions of all the triangles in the level geometry by averaging their vertices and then uses that whenever the player moves to find the triangle the player is closest to (this is one of the things I need to fix since it doesn't actually consider what you're standing on, only closest to). Then in order to shade the player smoothly it takes the vertex colors of the three tris and the player's position within the triangle and interpolates them using barycentric coordinates (that one took a while to figure out, I've never even heard of that before!) before using that information to change a variable in the player's shader. I said it was bonkers :pram:

CodfishCartographer
Feb 23, 2010

Gadus Maprocephalus

Pillbug

Mr Scumbag posted:

Whatever happened to "Bob's Game"?

I just remembered it today and realized that it had been years since I thought about it but that it was sort of an on and off shitshow for nearly a decade or something.

Dewgy posted:

I think it finally came out for iOS a couple of years back. It might have been on the Ouya too?

This is from pages ago, but gently caress it. TLDR on Bob’s game: he did his protest thing (that was back in goddamn 2008 jesus christ), claims it was viral advertising, then nothing happened for like three years. He then announced he was making a handheld, and then after like a year or something deleted all evidence of it online and launched a kickstarter for a puzzle game called bob’s game that was supposedly in the RPG bob’s game. that failed, then he did a second kickstarter for the JRPG bob’s game where he wanted money to make a hack van, which include a 75k word rant of his literal life story. That somehow succeeded, mostly due to a last-minute $5k donation that was probably from bob himself, but may have been from one of the Stanley Parable devs. Either way he wasted the money on rent and then was living out of a regular car for two or three years, then out of a regular non-hack van, then eventually got another place to live. He eventually released the puzzle game Bob’s Game on steam, and has made some posts about how he’s the massiah and the second coming of christ, and as of a year ago is still working on the JRPG Bob’s Game.

KillHour
Oct 28, 2007


Your Computer posted:

so I had a bit of a galaxy brain moment as I was trying to figure out how to give the impression of dynamic shadows without using shadow mapping

I am already faking shadows in the environment by painting them on with vertex colors, right? ....so what if I simply use that information and darken the player model based on the vertex colors they're standing on? Walking into a dark cave or the shadow of a tall object would give the impression that they're casting their shadows onto the player! :pseudo:


It took me all day but... it seems to be working?
https://i.imgur.com/Xyu1saD.mp4

I threw the script into the level I'm working on and to my surprise it still seems to be working :woop:
https://i.imgur.com/VmsQA7i.mp4

it still needs some things ironed out and the code is.... not pretty, but I still can't believe I got it working. I feel like there has to be a better way of doing it though because right now the code is kinda bonkers and I just did whatever I felt like could work :v: The script starts by calculating the positions of all the triangles in the level geometry by averaging their vertices and then uses that whenever the player moves to find the triangle the player is closest to (this is one of the things I need to fix since it doesn't actually consider what you're standing on, only closest to). Then in order to shade the player smoothly it takes the vertex colors of the three tris and the player's position within the triangle and interpolates them using barycentric coordinates (that one took a while to figure out, I've never even heard of that before!) before using that information to change a variable in the player's shader. I said it was bonkers :pram:

The way you did it actually seems fairly reasonable, tbh. It looks great.

Closest is probably what you want, but if you really want standing on, you could do a raycast down. Either one could give weird results, especially when jumping/falling.

Your Computer
Oct 3, 2008




Grimey Drawer

KillHour posted:

The way you did it actually seems fairly reasonable, tbh. It looks great.

Closest is probably what you want, but if you really want standing on, you could do a raycast down. Either one could give weird results, especially when jumping/falling.
thanks :3:

The plan is to do a raycast down since I always want it to look at what's underneath me, yeah. That said, I need a new method of finding the nearest tri too since right now it produces some weird result even when I'm measuring from ground level:


sometimes it correctly picks the tri I'm standing on, sometimes if I'm close enough to a wall it picks that as the nearest tri and in some specific situations it picks a tri that I'm not even standing on!

In addition to getting a more accurate nearest tri and raycasting downwards, I could also filter the list of tris based on face normal (and exclude everything that isn't within -/+ X degrees of "up") or simply make the ground a separate mesh to cut down on the amount of tris checked significantly since I don't plan on getting shadow info from anything that the player can't stand on.

also, it shouldn't be a surprise at this point but I did some digging (which is to say I discovered romhacking) and you know who else figured out this trick over 20 years ago? I really am just rediscovering every old technique aren't I :cripes:

KillHour
Oct 28, 2007


I'd say that's a huge compliment in your favor that you're coming to the same ideas that legendary developers did to get the most out of the hardware. Those guys were geniuses.

Have some more examples of crazy poo poo:
https://www.youtube.com/watch?v=channel?UCfVFSjHQ57zyxajhhRc7i0g

Zereth
Jul 9, 2003



???

KillHour
Oct 28, 2007



Whoops, SA's autoformatting breaks the link if you try to paste it. :argh:

https://www.youtube.com/channel/UCfVFSjHQ57zyxajhhRc7i0g

Your Computer
Oct 3, 2008




Grimey Drawer
already know about the channel and love that sort of stuff :allears: One of my favorite youtube channels is Retro Game Mechanics Explained which goes into crazy detail and has some impressive visualization to boot.


as I was heading to bed thinking about raycasts I was wondering if you could just get the triangle index directly from that and avoid any sort of manual sorting through tris, and wouldn't you know it there's literally a property just called RaycastHit.triangleIndex. The catch is that it looks at the mesh in the MeshCollider and not the mesh in the MeshFilter, but in my case those two meshes are the same for the level geometry and it seems to work just fine using the sharedMesh property? What I want to know is whether I can always expect the triangle indices to be the same for MeshCollider.sharedMesh and MeshFilter.sharedMesh if they're sharing a mesh. On the surface it sounds like an obvious yes, but I figure it's worth asking in case anyone knows :v:

seems to be working beautifully though and slots in just fine with the code I already have

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
If they're literally using the same mesh, then they should have the same indices. If it's two distinct copies that happen to be identical, then I don't know. If it ever breaks down on you, what I'd do is have a once-per-scene process run that maps triangles in the collider mesh to triangles in the render mesh based on their vertex positions.

Looking good by the way!

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.
Hmmm, I've kinda got a workaround but I feel like I'm missing something so hopefully one of you can help me out here

I have a bunch of ScriptableObject which store some constant data values used throughout my game.

Now I'm trying to serialize some game objects that have a ScriptableObject reference to disk. I come to find, you can't serialize a ScriptableObject.

I guess I kinda understand that you don't need to store the data, there's no point repeating it, but... I need a way to deserialize back to those ScriptableObjects. Is there a way to get an SO based on name at runtime?

Seems kinda pointless to have if I just have to create a struct with the same fields so I can save all the data.

So at the moment I'm storing the SO name, and then when I read back the names I pick one of the SOs from a list of all SOs... I guess that works but it seems wrong that now I have to maintain this master list of all the objects in the game or they won't be able to be loaded back. There's got to be a better way! :cheeky:

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
As far as I know, you can't find assets by name at runtime, unless you put them into a folder named "Resources" (or that has "Resources" somewhere in its path) and use Resources.Load<type of object>(path to object).

KillHour
Oct 28, 2007


Fractals are trippy as gently caress

https://www.youtube.com/watch?v=dFN0jnK_D50

:pcgaming:

Your Computer
Oct 3, 2008




Grimey Drawer

TooMuchAbstraction posted:

If they're literally using the same mesh, then they should have the same indices. If it's two distinct copies that happen to be identical, then I don't know. If it ever breaks down on you, what I'd do is have a once-per-scene process run that maps triangles in the collider mesh to triangles in the render mesh based on their vertex positions.

Looking good by the way!
oh yeah, that's a good idea! They are using literally the exact same mesh asset so hopefully I don't run into any trouble, but it's good to know that I have a solution if it happens.

I did some more work on it today and I think just about everything is working as I want it to now - I added some lerping so there's a tiny transition period to avoid abrupt color changes or flickering when going between contrasting triangles:


and also implemented a check for the face normal angle so it ignores anything the player can't stand on (might tweak the exact angle though, mostly I want to avoid it looking at walls):


also fixed a bunch of tiny bugs, like making sure I'm only reading from the level geometry :v: Had a nice bug when I stepped on an object and the color freaked out because it was mapping a triangle from the object I was standing on to the level geometry. Oops! I also made it so the raycast is pretty short, that way I can jump between platforms and such and it keeps the color of the last triangle I was standing on rather than whatever's down on the ground below.
:okpos: :okpos: :okpos:

Lanth
Jun 15, 2007
Lipstick Apathy

I'm feeling this so much.

Been stuck doing other things the last couple of days, but finally back at it.
I'm starting to lose faith in hitting the deadline, but if anything it's been fun. Who knows, maybe I'll get more stuff done today than I thought?

Gromit posted:

If the searchlight is decorative, rather than showing precisely what the ghost can see, you could also make it narrower when the ghost has spotted you as though they are focussing their vision.

Sorry for the late reply, I've played around with some alternatives today. I might just polish up the MGS-style "!" effect and call it a day, as none of these variations really solve the problem for now. Also had a Spotlight Cookie version but that really broke the angle of the spotlight every time it changed, so...


How it looks like in the game


Unity's built-in Color Blindness Simulation

I also started tweaking the colors of the level a bit, was getting sick of the washed out brown palette.

Had a thought before falling asleep one of these days: "If my floor is dark, I won't even need shadows! *taps head*" but it turns out that won't make things look less flat, sooo...

Also fighting the Unity Animator on some things, I wanted to make the Skelly go into a frightened pose instead of regular Idle whenever a ghost is close, but adding another state to the Animator introduced issues everywhere, like the walk animation finishing after turning off the Navmesh Agent component, which results in the player character walking into walls and getting stuck. After laughing about it, it made me realize that currently my ghosts don't go through walls so that's another thing I'll have to consider whether I want to implement it.

I'm scrambling right now to find the things that add the most value so I can finish this up in SOME playable state soon. Whoever said that making a menu and game over screen for your game would give a big boost of motivation sounded right so I'll try that next, either that or a first actually playable level.

Adbot
ADBOT LOVES YOU

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
Question: what would you do to polish this screen further?



The things that leap out to me are:

* Put a dividing line horizontally across the middle (where the grid looks like it's stretched; that's actually the two cameras seeing different grids)
* Put a border around the part preview display
* Put a border and background around the text in the top-left corner
* Maybe put a rubber texture on the grid to make it look kind of like a cutting mat for miniatures? Or a paper texture to make it look kind of like blueprints? I don't know.


Man that looks great.

It occurs to me you could probably do some lizard-brain-tickling shaders just using the multiple-scrolling-textures-multiplied-against-each-other technique. They'd be responsive to the music by jerking the scrolling based on what's playing, kind of like how your fractal evolves in that video.

Lanth posted:

Been stuck doing other things the last couple of days, but finally back at it.
I'm starting to lose faith in hitting the deadline, but if anything it's been fun. Who knows, maybe I'll get more stuff done today than I thought?

Even if you miss the deadline (what deadline?), you've made some incredible progress. Game jams are more about buckling down and actually doing things than anything else IMO, and you are absolutely doing things.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply