Game development tips, tricks, flexes, or general non-sense

@“beets”#p65474 Woah! I hadn‘t thought of that, that’s wild! :•0

Not to be a sourpuss, but as someone that has been writing software for ~ 30 years I would like to largely anti-recommend ternary conditionals.

They can be really useful sometimes! However, please do not abuse them. I would suggest _never_ nesting them as described above. In a few months time when you return to your code you want to be able to immediately understand it, rather than trying to decrypt a complex series of `:` and `?` symbols.

there is a good tool in c, (and many other languages), for initializing a variable in terms of a potentially quite complex relationship of other values: a function call.

😜

I was going to make a post about how to 3d model/implement the scene below into unity as I was having troubles with textures on sketchup files in unity.


>!

[upl-image-preview url=//i.imgur.com/Bbuxvo4.jpeg]

But I've figured it out on my own. ||(You have to make each face a unique texture in skechup and can then remap them in unity)||. I'd now like to formally announce to all my haters that it's over for all of you.

[upl-image-preview url=//i.imgur.com/2lC5nPN.png]

I finally got this sims‘ walls effect working. It’s not perfect but its got the foundations to be what I envision.

What I'm doing is using a shader to render the top 75% of a quad transparent if the player object is behind it. I check if it is behind a wall with a sphere-cast

I've also started putting some placeholder textures in. If I keep going with unlit materials line work will have mondo importance.

I‘ve basically been reusing and updating my 2D engine for a while now and at some point I ran my code against this thing that looks for inefficiencies and it marked passing Strings around in C# as a bad thing so I’ve tried to use Enums whenever possible. So I load a bunch of stuff from an XML file at startup and populate a lot of stuff with that. I do this for everything. For instance, I‘ll load sound effects into memory and make an enum for each one (that basically matches the name) and do something like PlaySound(Sounds.Explode); or something and go that route. My question is, is there a better way to do this? Like can I generate the Enums at compile time or something? I always feel like there’s got to be a better way than the way I'm doing things lol.

Also, I've noticed I will end up making an Enum that corresponds with a tile index on my sprite sheet. Like STAIRS = 1045 or something then when I need to test collision against a certain kind of tile, test that against against the Enum like tile.spriteIndex == STAIRS or something. Is there a better way to go about this? I was thinking last night that I should make a Tiled Map Editor map with the entire sprite sheet and input the like, Enum name or something there to make reuse easier. Anybody got any tips about this?

One of my main goals when developing games is to somehow keep as much of the data separate from the algorithm as possible but I feel like I'm driving myself crazy keeping the two separate. Like it would be much easier just to hardcode everything in the code and say screw it to "reuse."

@“Balrog”#p68439 A straightforward-ish thing you could do is write a script in python or something similar to generate a C# file containing the enum you want based on the contents of whatever folder it is that the sound effects are in, and you’d have to just run it each time you add new sound effects. You might be able to do something similar with the tileset you use for your Tiled maps, but I forget if the format Tiled used contains names for each tile. If it doesn’t then it might be tricky generating an enum from it.

There might be a better way that’s more integrated with Visual Studio/MonoDevelop than writing python scripts though. I haven’t really used Visual Studio that much. I imagine whatever method works best with VS would probably be similar in principle though.

@“Balrog”#p68439 I assume you‘re just using a Map/Dictionary to load and play the sound effects. Unless you’re making a massive game it‘s not too hard to add to your enum each time you want to add a sound.

The other option is to load a string along with the path. I know it’s not optimal but you have to weigh up development time against runspeed.

For tiled level editor my goto would be a text file where each character is a different type of tile. It's the fastest way to edit levels unless you've already made a tilemap editor (which would probably save to a txt file). I don't think it's smart to name every tile.

This is a general help question.

I feel like I’m somewhat stalled out on my first project (really had three periods of productive work). Description [here](https://forums.insertcredit.com/d/1146-does-this-game-exist-already).

The question is: when dealing with a system with a good number of potential ‘knobs’ that can change gameplay balance, what are approaches people have for getting something ‘about right’ about certain variables so that decisions about other elements can be made?

In my case things like: spread of player shots, persistence duration, speed of player and enemy bullets, damage of player and enemy bullets, rate of fire of enemies and bullets, health, player movement speed, enemy tracking speed, number of enemies on screen, when/how much players can recover health - all influence things like enemy spawn intervals or numbers of enemies in a wave. It all feels like everything can be tuned to everything else.

I know there are effectively different games/modes that could be made based on each of those choices, and so I feel a bit paralyzed for how to ‘design’ what’s next. I know I really need to actually get a menu system and level ‘clearing’ sorted out to get this game to a ‘finished’ state, but I don’t really have any guiding principals in mind for how to, say, decide whether I should turn down the firing rate and turn up the damage or whatever. The closest thought I have is that I want everything to revolve around the risk/reward of filling the screen with a lot of ricocheting bullets and cutting it close by grinding on those bullets, so that sets at least some bounds.

The real answer here, I think, is that I don’t need to even consider this right now, I just need to create the systems to move between stages and get the main menu stuff sorted out so the game is actually “completable” rather than just a testbed for the mechanics.

As an aside just about this project, I’m proud of have what I’ve got so far, however rudimentary, so here is my minor flex (from someone doing just their first project). You can move and shoot, limited fire rate, can hold and repeat fire and reduce speed, bullets come from an object pool and aren’t re-instantiated, there is a rudimentary psyvariar ‘grind’ that builds a combo meter and fills “charges” for an ‘absorb bullets around you and then shoot one big high damage shot based on absorption’, enemies can track the player and turn appropriately, check line of sight, a couple enemy types so far - no moving enemies yet; rectangle spawn zones can be arbitrarily set up, can spawn enemies in a defined wave that references spawn locations; UI player health and combo meter, some basic sprite stuff and spark hit effects. Haven’t used any external plugins, and managed to set up a somewhat low-dependency event system (maybe it’s just a soliton but I pulled out of at least maximum spaghetti).

Any suggestions or encouragement gratefully received.

@“MDS-02”#p68567 you got to just pick things, and make changes in response to actually playing the game. don't trust your imagination, trust your eyes.

>

@“MDS-02”#p68567 The closest thought I have is that I want everything to revolve around the risk/reward of filling the screen with a lot of ricocheting bullets and cutting it close by grinding on those bullets, so that sets at least some bounds.

This sounds to me that the way to go for now is to balance with a small number of enemies with high fire rates. If the desire is to have the player dividing their focus between enemies and ricochets but weighting that focus towards the bullets, start with a very small number of enemies and tune the fire rate to get the desired effect.

It might be worth defining enemy types if you haven't. A basic enemy that always fires a burst in front of them. An enemy that strafes as it fires. An enemy that fires a circle of bullets etc. Create a level of rooms with one of each enemy type in each room. Focus on making it fun to fight one of each enemy. If only one of an enemy type doesn't work then you've learned that they either need to be spawned in multiples or as a group with different enemies.

This is just me but I wouldn't worry about menus etc for now. As you play with these enemy setups you might discover that instead of being level based, this should be an open world shooter or a endless horde mode or a Bangai-O style puzzle level game. Learning that stuff will change your level clear systems etc.

I worked on a scrapped top down shooter that was going to be a tight Dark Souls style open world with what I was describing as Rondo of Blood combat but shooting. The primary level we worked on was a collection of rooms, one for every enemy type and learning what mechanics, spawn rates, fire rates etc worked. For me the most important aspect of the game was tuning to this slow paced, exploratory duel style gameplay because I had a very clear idea of what I wanted it to be. Sounds like you have a pretty clear idea of what you want to achieve in the second to second gameplay so focus on combinations of that and let the rest of the game reveal itself to you as you go.

Hope that helps and I'm sure some people here (me included) would be happy to take a look at a build and provide feedback if you need it.

@“MDS-02”#p68567 What I've found is that making games and finishing games are two entirely different things that require different skills to do well in. From a making games perspective, sure there are a ton of different things you can fiddle with, and having them coded is great. From a finishing games perspective, you are trying to find the single solution to an unconstrained problem which has infinity valid solutions, instead of finishing the game.

Your tagline in the post is “bullet hell of your own making,” and your decisions should be made with that in mind. Shooting 4 bullets per second instead of 3 doesn't make your game any more or less "bullet hell of your own making" unless you have context to inform that decision. If you don't have a reason to change a number (eg feedback from broader interactions within the game, specific interactions that don't embody the idea of your game), then it's fine for now.

yesterday I had an idea for a game, usually I keep them to myself but this one‘s silly enough

it has the aesthetic of a rugged, in your face, edgy, action fighting game or a shooter like zombies or something, idk I don’t play those kinds of games

when the enemy approaches you, everything seems normal, you‘re within their range of attack, and they rear back, to telegraph their move when— SIKE!!! they mime "I’m not touching you" and you realize all the enemies aren‘t allowed to touch you and they’re all coming up to you, you're totally smothered but none of them are touching you.

I think this was a dream or something, I don't remember where it goes from there. Just the impulse you get from enemies approaching is so hard-wired, and I've never seen a game where the premise is being faked out.

@“treefroggy”#p68834 i picture a late level being a screen filled with zombies clipping through each other, not touching you– not that you can tell.

if you think about it, if they have physical constraints on their movement, the player could trick one into touching.

I‘ve been taking an online course to get up to speed with Unreal.

I’m really enjoying

>

Module compiling took 317.794 seconds

and

>

fatal error C1085: Cannot write precompiled header file … There is not enough space on the disk.

It's usually not quite this slow but I cleaned the solution to hopefully clear up some space. I usually just have to compile multiple times as I run out of space with precompiled headers. I think I'll move my project back onto my HDD as the SSD is simply too crowded with Windows' files.

Hay everybody! A while ago I posted a small pinball game my dev team did for a game jam. Well we took that idea and ran with it and we‘ve got a beta test version up and running before our final release. We’d really appreciate anybody checking it out and also providing feedback! From the main menu of the game you can select “share your thoughts” which will open up a Google form in your browser.

Thanks everyone!

https://lamp-lighter.itch.io/vertical-collapse

I‘m a longtime lurker and it occurred to me that, duh, the people whose intellectual words I like reading might like the intellectual game I’m working on, perhaps more than … almost anyone else, in fact. And maybe posting this as a little introduction to myself will inspire me to finally begin posting elsewhere, since this seems like more fun than Twitter.

It's a real-time adventure game where everything you do takes time. Push a box, for example, and it will take a half hour in real time for it to finish moving. I was originally inspired by how the real-time mechanics of Animal Crossing turned playing it into a ritual and meaningful part of my life, and I had the idea of extending those real-time mechanics into all aspects of a more narrative-driven, goal-based game. You could also think of it as an anti-free-to-play game where I've removed the ability to pay in order to skip ahead. It has an anti-capitalist story centered around themes of temporality, where you learn the company you work for is trying to take control of time in order to make you work for them forever and you begin to fight back by stealing from them. There's a mishmash of genres including idler, puzzle (sokoban), and stealth, and I think it will be obvious that I take a lot of inspiration from Metal Gear Solid 1–3, not only aesthetically and mechanically but also for the melodramatic, sometimes absurd and conspiracy-fueled storytelling.

There's a demo on Steam right now and I'm planning to release part 1 this year. Would love to know what yall think! https://store.steampowered.com/app/1481910/Time_Bandit/

![](https://media3.giphy.com/media/I8HMRKjBGp3bD6BpSE/giphy.gif?cid=790b76114bb6313c6fe3e8b54d4fc9c3fecccdc07fc87bb8&rid=giphy.gif&ct=g)

I've been turning one of my old games (Diorama Dungeoncrawl) into a sort of generalized system for quickly making self-contained fantasy adventure/dungeon-crawl modules.

As part of that, I've been making a self-contained dungeon-crawl module called Tomb of the Devourer. I've been taking a lot of inspiration both from old-school ADnD adventure modules, and from 90s OVAs.

[upl-image-preview url=https://i.imgur.com/ul5zu4L.gif]

is anybody else getting stressed out by losing twitter?

i‘m not even a proffesional game-dev but i knew that if i wanted to find game-devs or post about my own stuff twitter was the place to go. now there’s half a dozen replacements and everybody is going their seperate ways.

A good dev bundle on sale right now:

https://youtu.be/S3MORA3TdeA