• 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.
can you guys recommend a method or something to read regarding managing game states in unity? how do you guys handle passing variables between scenes, praising, menus, and so on?

every time I do it I feel like I'm building an ornate chest when a cardboard box would work just as well.
 

Feep

Banned
Got a brand new shield effect! Mega-thanks to our gameplay engineer Archie, who is also doing effects work for us.

NewShield.gif


Edit: Dammit Prince I fixed that in like twenty seconds how did you catch it

Double edit: Yes I know we're having sorting issues with those stupid rings, gonna remove them shortly
 
I use SourceTree as well. (GitHub).

Well, I use a freakish amalgamation of GitHub and Dropbox, since GitHub won't let me commit my now-at-28-GB project folder. = P
SourceTree and BitBucket, no issues. Then again I'm not nearly that size. On the topic of commits tho, I do that shit religiously, lol. Being able to fork, merge and roll back. Lawd.
 
can you guys recommend a method or something to read regarding managing game states in unity? how do you guys handle passing variables between scenes, praising, menus, and so on?

every time I do it I feel like I'm building an ornate chest when a cardboard box would work just as well.

Could you use Object.DontDestroyOnLoad?

Just make an empty with all your variables.

Then every time a new scene is loaded, this empty would stick around allowing you to access it's variables as needed.
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
So here's a kind of cool Unity feature that I didn't know it had.

Search by Type. Seems simple enough, but if you actually search for something like "MeshCollider" it'll gray-out/deemphasize any object that doesn't have a Mesh Collider attached (which was great for me, when I went and optimized a lot of my colliders -- I thought that tracking down all the default mesh colliders would be a pain, but it wasn't!).

It's the little things. Now, I do wish that I didn't have to go and swap most of my colliders, but stupid Mesh Colliders don't actually have volume (unlike primitive colliders) so, yeah. Can't do any accurate checks for if you're inside a mesh collider (unless it's convex, I believe, but that kind of defeats the point of concave colliders).

You could have a state attached to an object that tracks whether it's in a mesh collider. 1 = it's inside, 0 = it's outside. Set to 1 on first(entering) mesh trigger, 0 on second(when exiting).

That seems really hokey, but I think it would work.


So you would store all of into a PlayerPref, destroy the scene, then reload that PlayerPref?
 
You could have a state attached to an object that tracks whether it's in a mesh collider. 1 = it's inside, 0 = it's outside. Set to 1 on first(entering) mesh trigger, 0 on second(when exiting).

That seems really hokey, but I think it would work.

The problem is that I'm moving things around dynamically, so I check if my movement spot is valid by seeing if I'm in a collider. Since I'm not actually moving through the collider, and since Mesh Colliders have no volume, the inside of a Mesh can be counted as a "safe" place to move, when in reality you're in an object.

After reading around, it seems like the best thing to do is just use primitives, which kind of sucks. I'll probably have to come up with something better, but primitives will work alright for now.
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
Yes. It's really easy!

Edit: Yeah, the registry is a messy place to put it, but it's not like I ever go in there. = P

Awesome!

The problem is that I'm moving things around dynamically, so I check if my movement spot is valid by seeing if I'm in a collider. Since I'm not actually moving through the collider, and since Mesh Colliders have no volume, the inside of a Mesh can be counted as a "safe" place to move, when in reality you're in an object.

After reading around, it seems like the best thing to do is just use primitives, which kind of sucks. I'll probably have to come up with something better, but primitives will work alright for now.

Sweet. Thanks for explaining that.
 
can you guys recommend a method or something to read regarding managing game states in unity? how do you guys handle passing variables between scenes, praising, menus, and so on?

every time I do it I feel like I'm building an ornate chest when a cardboard box would work just as well.

The best way to go about this is to encapsulate state into appropriate classes for your game. A quick and dirty way to share these objects between scenes in c# script is to create static properties of your state classes. Then, every scene can just read or write to those properties.

If you really wanted to get fancy, you could create a class that is specifically responsible for managing state and implement it using the singleton pattern.

http://en.wikipedia.org/wiki/Singleton_pattern

This design pattern can catch a bit of grief from time to time, but in the context of Unity scene management, in my opinion it is the best solution until this problem is addressed with a native solution.

Edit: Here is a blog post that illustrates a quick and dirty way to use static variables. I use a more mature implementation in my game, but I think this will help get you moving in the right direction.

http://blog.christianhenschel.com/2013/05/16/how-to-pass-data-between-scenes-static-variables/
 
Could you use Object.DontDestroyOnLoad?

Just make an empty with all your variables.

Then every time a new scene is loaded, this empty would stick around allowing you to access it's variables as needed.
Yup. I do this with my SessionManager. I MAY (rarely) choose a static since those exist between scenes. Depends on what I am looking for, TBH. My thing with statics is to never use them since you never really need them. Most people use them as an easy out to Class.Function their way to not referencing anything. I reference and often times reference without caching if I rarely need something.

But yes. DontDestroyOnLoad(this); will let that GameObject persist through scenes.
 
Thanks for the advice, barkers crest and AbsintheGames. Feep, you're right that PlayerPrefs is the true cardboard box for between-scene variables but I was hoping for something to manage states like menus and pausing as well, and I think the SessionManager or singleton approaches will work for that.

Thanks everyone!
 

Jobbs

Banned
I find myself facing a constant tension between wanting to avoid the really "sillier" platforming game conventions -- such as enemies that do some repetition forever (going back and forth) or traps that maintain a constant pattern (like a hazard that keeps shooting in predictable intervals) and all of that kind of stuff -- and wanting to actually utilize some of this stuff and sort of "give in" and allow some more of that platforming heritage into the game.

The problem with keeping things as grounded and serious as possible, avoiding those platforming conventions, is it becomes very hard to come up with enough ideas to keep things going and keep things varied. For that reason, I'm close to adding in some things here and there that I didn't originally think I was going to.
 

Pehesse

Member
Screenshot Saturday WIP, exteriors finally coming together a bit:



Bonus cool points if you know what inspired it

I'm not sure what inspired it, but I really like how it looks! It somehow reminds me of Ultima a bit, except with a legible perspective :-D

I find myself facing a constant tension between wanting to avoid the really "sillier" platforming game conventions -- such as enemies that do some repetition forever (going back and forth) or traps that maintain a constant pattern (like a hazard that keeps shooting in predictable intervals) and all of that kind of stuff -- and wanting to actually utilize some of this stuff and sort of "give in" and allow some more of that platforming heritage into the game.

The problem with keeping things as grounded and serious as possible, avoiding those platforming conventions, is it becomes very hard to come up with enough ideas to keep things going and keep things varied. For that reason, I'm close to adding in some things here and there that I didn't originally think I was going to.

I think I understand/know the feeling, having been through something similar recently. The best advice I could offer is that sometimes conventions/cliches work because they are, well, cliches... and that doesn't mean they are tired, but simply that they *work*, and in part have been recognized/ingrained as a specific yet integral part of the experience. In your case, I understand that you wish to make enemy movement and the like as "un-patterny" as possible, but this to me goes somewhat against what a platformer should do, as it's not simply about reaction against the unpredictable (which is kinda frustrating to me as you don't feel you're learning, simply failing over and over against something new each time), but memorization (think Castlevania 1: all of the things that are flying at you seem random at first, but you eventually figure out their pattern and navigate through that without taking damage, which is way more satisfying as you feel you've overcome something - and as far as platforming goes, I think it's a good example of memorization of both patterns, and player skill, which seem to be more like what you'd like to develop). I don't know the specifics of what you intended not to add, of course, but I'd say not to be afraid of trying out things that have been used already and not to stay in an intellectual stance of doing things differently for the sake of doing things differently. Of course this can work and sometimes add a lot, and be a breakthrough, but sometimes relying on what players know can allow to turn *that* on its head, too.

(In my case it was my conondrum about health bars, and represent damage as health portraits/audience reactions instead, and while I still think the concept as potential as a better realized thing completely focused on that type of feedback, going back to the classic feedback of "hurt"="decrease bar" has some player satisfation and 90's throwback that I didn't account for and which totally fits in my plan. And so in the end, these stay in, and the health portraits are out - memory save, woo!).

So in your case, I'd say to try adding the things you didn't thing you would, even if it's just to test them out, and see if it fits as is/if you can play around with those same conventions to surprise the player differently, using what they expect!
 

Five

Banned
Short or Tall?

At the risk of sounding like a pedophile, the short one is significantly more alluring to me. The proportions work better with the given art style.

I find myself facing a constant tension between wanting to avoid the really "sillier" platforming game conventions -- such as enemies that do some repetition forever (going back and forth) or traps that maintain a constant pattern (like a hazard that keeps shooting in predictable intervals) and all of that kind of stuff -- and wanting to actually utilize some of this stuff and sort of "give in" and allow some more of that platforming heritage into the game.

The problem with keeping things as grounded and serious as possible, avoiding those platforming conventions, is it becomes very hard to come up with enough ideas to keep things going and keep things varied. For that reason, I'm close to adding in some things here and there that I didn't originally think I was going to.

Maybe find some middle ground? An enemy that paces back and forth, but pauses at random moments, or waits an indeterminate amount of time at each end. A regular projectile emitter that has some amount of variation (say 10%) off a given tempo.

Or maybe give more grounded reasons for the behavior. If an enemy is moving back and forth regularly, maybe it's distracted by something. Maybe it's chasing a butterfly, or running away from a mouse or a swarm of bees.

You're quite clever, so I'm sure you'll think of something.
 

Jobbs

Banned
here's an example...

this is a vertical shaft room.

http://gfycat.com/ColorlessLinedBlackandtancoonhound

it's boring. I plan to put something in it, but how do you put "realistic" enemies into such unrealistic terrain? the whole idea of a platformer becomes kind of abstract at a point.

probably going to put some little perched creatures on those ledges that shoot crap down at you.
 

bruuge

Neo Member
here's an example...

this is a vertical shaft room.

http://gfycat.com/ColorlessLinedBlackandtancoonhound

it's boring. I plan to put something in it, but how do you put "realistic" enemies into such unrealistic terrain? the whole idea of a platformer becomes kind of abstract at a point.

probably going to put some little perched creatures on those ledges that shoot crap down at you.

Have some slug like creatures crawling on the walls
 

Five

Banned
Yeah, traditionally, that would be the perfect place to put something that juts out of the wall occasionally (spear trap, clawing hand, snapping eel) or an enemy that flies back and forth between the walls.

Right now I'm imaging a sort of beetle creature that hugs one of the walls for a few seconds, then slowly buzzes to the other wall at a slightly different height. Its pattern wouldn't be completely regular, but it would keep within a predefined height range and have a set range for how long it could hang on a given wall. Maybe that still feels too patterned, though.
 

_machine

Member
Screenshot Saturday WIP, exteriors finally coming together a bit:
Looks great, but a minor thing I would maybe look at is the way the hay piles next to the barn blend into the environment. I'm no artist, but maybe it's the way the ground next to them is shadowed, but the hay itself doesn't have any ambient occlusion/shadows in the bottom part of them.
 

donut

Neo Member
Short or Tall?

The short one is super cute and yeah the art style fits the shorter one better.

Here's a gif from my 3D platformer, some of you guys might have seen it if you go to TIGforums. I posted a couple of pics from this project here like 100 years ago.

16gs.gif
 
Finally getting some more sprites together and mustering up my courage for procedural enemy spawning. I've never really programmed a completely procedural game before so I had to wrap my head around some logic to make it all happen. Programming this is like some sort of RPG meta game so I find the challenge refreshing. Taking multiple variables into account to get an end result that says "OK, spawn this group of baddies NOW" was fun. Lots of things to consider for the math to keep pressure up but not overwhelm the player. All the while keeping it "automatic" dependent on the current difficulty level and global game speed.

I'm having loads of fun trying to find answers to problems I'm creating :D Procedural can be difficult but hot damn when that light bulb goes off. I'm sure it also helps that I flowchart every little thing. Makes coding so much easier.

Will have the Alpha up this week for Android for those that emailed. I'm still struggling with relative touch input as for some reason simply offsetting the ship based on distance between touch and object doesn't want to work for me, so I'm using direct control, at the moment. I've tried Mathf.Abs and Transform.Distance (I believe Mathf is faster) and can get distances fine, but when I go to offset the ship's transform relative to my finger it gets all whack. I'm no good with touch so I'll just keep cracking.
 

Burt

Member
Looks great, but a minor thing I would maybe look at is the way the hay piles next to the barn blend into the environment. I'm no artist, but maybe it's the way the ground next to them is shadowed, but the hay itself doesn't have any ambient occlusion/shadows in the bottom part of them.
Yeah definitely. The hay overall lacks form, but that's probably the biggest problem with the whole thing. Gonna shape that up today though, thanks :)

I'm not sure what inspired it, but I really like how it looks! It somehow reminds me of Ultima a bit, except with a legible perspective :-D

Thanks :)

Short or Tall?

I'm gonna have to go with short as well. Can't put a finger on why, but it feels like it has a lot more character.
 

HelloMeow

Member
Finally getting some more sprites together and mustering up my courage for procedural enemy spawning.

Hey! That's what I'm working on.

I've got all this data that gets extracted from a song and now I have to find fun and cool looking ways to get enemies to spawn and behave accordingly. It's not hard, but it takes a lot of trial and error to see what works.
 

_machine

Member
So I'm finally starting to recover from a busy week (half a day of Divinity:OS helps, god that game is such a product of immense love and it's something that really motivates me to work so much harder), but I just wanted to say how much I love game dev conferences because of the amazing people there are in the industry. For all the crap the industry gets regularly and how tough it can be, most of game developers are just wonderful people. We got some fantastic feedback for our game and it was fantastic to see people be really excited about it, despite only being in development for 7 weeks so far. Our ghetto setup (taken with a crappy tablet, sorry=

One of the highlights of Northern Game Summit for me was Tomas Jech's (Animator at Riot) talk "Poop for the stars", which was not only extremely motivational and funny it also gave us some really good tips on one of the issues we had with our graphics. It was similar to his talk at TEDx, but even better. I still recommend check that video out, though.

So what good memories do you people have from game conferences and are the some smaller ones where you've been that no-one has heard of (nobody knows NGS, despite there actually being great speakers and a lot of talented developers)?
 

Burt

Member
Starting area of Temple of Elemental Evil?

Haha, I actually know exactly what you're talking about, but nope:

Early piece of concept art for FFVII, although I guess it really isn't very close now that I've put the two side by side, and it just makes me feel bad about my complete lack of architectural creativity when I look at it.

Also, I've gotten Ultima twice now, so maybe I should get around to playing some of them.
 

_machine

Member
I still need to talk about the whole game more, but a bit too tired to write anything right now...have a screenshot though!
We are probably not gonna keep the grid completely visible and we'll try to mask the repetitive nature of the grid environment a lot more, but I'd love to hear your thoughts on how it looks at the moment.

Also, didn't get any feedback last time so I'll repost my post about the Deck Builder UI:
We've had a problem where a part of our game, the deckbuilder, works just fine in the editor, but doesn't work in the compiled build at all and apparently our only hope is to redo it almost completely or update the engine (which breaks quite a few things), but it'd be nice to get some feedback on what you guys think about our current deckbuilder.
deckbuilder9gs8m.jpg

So at the top right you have your current built deck and the cost of each card. You can hover over the deck to check each card or remove them by clicking. Below that you can see the size of your deck and the maximum size of it and the amount of cards you have for all the different mana costs aka the cost balance of your deck. Left to it you can choose which type of cards you're browsing; minions or spells and on the far left you get to browse those cards and pick which ones you want. We also currently support 3 save slots for different deck builds.
 

Mr. RPG

Member
Screenshot Saturday WIP, exteriors finally coming together a bit:



Bonus cool points if you know what inspired it



Haha, I didn't notice it the first few times the gif ran, but I really like his "hurt" animation.

What kind of game is this? It looks really interesting.
 
Status
Not open for further replies.
Top Bottom