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
Floodkiller
May 31, 2011

Jeffrey of YOSPOS posted:

I am very angry that you write
code:
}
else
{
instead of
code:
} else {

Multi-line readability supremacy :colbert:

Adbot
ADBOT LOVES YOU

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Jeffrey of YOSPOS posted:

I am very angry that you write
code:
}
else
{
instead of
code:
} else {

I dunno why everyone likes jamming everything on one line. It's not like we all use vi anymore.

coyo7e
Aug 23, 2007

by zen death robot
It's just good programming practise. I used to code and my professor once used my code as an example of of good formatting, he said "you can put this on the wall ten feet away and still get an idea of what it's doing."

White doesn't doesn't exactly cause bloat.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

coyo7e posted:

It's just good programming practise. I used to code and my professor once used my code as an example of of good formatting, he said "you can put this on the wall ten feet away and still get an idea of what it's doing."

White doesn't doesn't exactly cause bloat.

He just liked same-line braces then, there's nothing at all good or bad about that particular point of style (same line or newline for grouping elements), it's a total matter of taste. It's a complete irrelevancy on today's big screens and auto-completing IDEs. (Really there's no reason with today's IDEs that it matters at all, you should be able to go view..braces my way|braces highway" since it's all just nonmaterial whitespace.)

It's got kind of an amusingly elaborate holy war backstory: https://en.wikipedia.org/wiki/Indent_style

For what it's worth, I'm a Templar Warden of the Allmanites: https://en.wikipedia.org/wiki/Indent_style#Allman_style

quote:

Commenting out the control statement, removing the control statement entirely, refactoring, or removing of the block of code is less likely to introduce syntax errors because of dangling or missing braces.

Is the big thing I like about it, alongside being able to super easily scan for the matching { without worrying about what control structure it's hooked too.

e: I think people think { inline with control statements is "the right way" because Stroustrup does it, and Stroustrup gives the nerdkins the geekbones.

Unormal fucked around with this message at 01:20 on Sep 27, 2015

Tax Inductions
Jul 9, 2007

I carry refreshments to the good guys
I made the good guys some home fries

Unormal posted:

For what it's worth, I'm a Templar Warden of the Allmanites: https://en.wikipedia.org/wiki/Indent_style#Allman_style

This is convention both at my job and also in my classes this semester and I've gotten used to it to the point that I like it.

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
Literally the only thing that can be objectively wrong about a brace style is if you leave off the braces for your short if/while/for/etc. block. In other words, this is wrong:

code:
for (int i = 0; i < count; ++i)
    sum += vals[i];
Pretty much anything else you can say about formatting code, I don't give a poo poo, but that right there routinely introduces bugs because people try to add code to the block without remembering to add braces.

coyo7e
Aug 23, 2007

by zen death robot

Unormal posted:

He just liked same-line braces then, there's nothing at all good or bad about that particular point of style (same line or newline for grouping elements), it's a total matter of taste. It's a complete irrelevancy on today's big screens and auto-completing IDEs. (Really there's no reason with today's IDEs that it matters at all, you should be able to go view..braces my way|braces highway" since it's all just nonmaterial whitespace.)

It's got kind of an amusingly elaborate holy war backstory: https://en.wikipedia.org/wiki/Indent_style

For what it's worth, I'm a Templar Warden of the Allmanites: https://en.wikipedia.org/wiki/Indent_style#Allman_style


Is the big thing I like about it, alongside being able to super easily scan for the matching { without worrying about what control structure it's hooked too.

e: I think people think { inline with control statements is "the right way" because Stroustrup does it, and Stroustrup gives the nerdkins the geekbones.
I am weird, I like my compiler colors to be yellow on black, with pink for operators, blue for variables, red for comments, etc etc.. It's ugly as sin but easy to recognize when scrolling quickly or when your eyes are tired and blurry. I think I learned the habit playing MUDs with a client back in the day, where I highlighted keywords all over the place so I could just kind of glaze-over my eyes and then react when certain colors showed up, and strings appeared highlighted. I'm no crazed Swede MUDder but I was pretty good at pking back in the day. ;)

I worked in code and later in IT and netrworking enough to try and leave easy to parse scripts and code blocks behind when I was done with a project, you never know who will end up having to dig into it later and I've known enough people who wrote and left nearly-unmaintainable blocks of code behind after they moved on. :D

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS
lol wish I could play puppetmaster and act like I intended for a code formatting derail in the roguelikes thread, but that one was mostly by accident

linux kernel style 4eva

Floodkiller
May 31, 2011

FR: An apocalyptic roguelike where the remaining inhabitants are in a brutal gang war over coding practices and standards.

Devor
Nov 30, 2004
Lurking more.

Floodkiller posted:

FR: An apocalyptic roguelike where the remaining inhabitants are in a brutal gang war over coding practices and standards.



https://medium.com/matt-bors/world-war-g-8b90a02a4432

madjackmcmad
May 27, 2008

Look, I'm startin' to believe some of the stuff the cult guy's been saying, it's starting to make a lot of sense.

Floodkiller posted:

FR: An apocalyptic roguelike where the remaining inhabitants are in a brutal gang war over coding practices and standards.

Death Brace 2000

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
First little tent city built with regionalizer+maxrect.



Not too bad, maybe I'll play around with L-systems a bit.

The coolest part of this approach is it will build tent cities around any arbitrary obstacles if possible, no matter what. Like I can dump a tent city into a cave, or amongst ruins, etc.

Other cool thing is here's all the code it takes, with my growing generic procgen library:

Unormal fucked around with this message at 06:17 on Sep 27, 2015

Wafflecopper
Nov 27, 2004

I am a mouth, and I must scream

Why would you need a tent in a cave? :confused:

e: how would you even pitch it?

Wafflecopper fucked around with this message at 04:57 on Sep 27, 2015

Mercury_Storm
Jun 12, 2003

*chomp chomp chomp*

TooMuchAbstraction posted:

code:
for (int i = 0; i < count; ++i)
    sum += vals[i];
Pretty much anything else you can say about formatting code, I don't give a poo poo, but that right there routinely introduces bugs because people try to add code to the block without remembering to add braces.

That's why you do it like this, so you know can't add more instructions to it :smug:

code:
for (int i = 0; i < count; ++i) sum += vals[i]; 
Anyway, I have no idea what the preferred method it, I think it just looks nicer that way with less braces when they're obviously not needed.

Mercury_Storm fucked around with this message at 05:13 on Sep 27, 2015

lets hang out
Jan 10, 2015

a wizard mugged me and then threw me in lava

Sage Grimm
Feb 18, 2013

Let's go explorin' little dude!

Mercury_Storm posted:

That's why you do it like this, so you know can't add more instructions to it :smug:

code:
for (int i = 0; i < count; ++i) sum += vals[i]; 
Anyway, I have no idea what the preferred method it, I think it just looks nicer that way with less braces when they're obviously not needed.

UGH, you would be thrown to the wolves because of that in my company that has nothing to do with game programming. And I would hate you forever.

Interestingly enough there's a standard we're (the company) supposed to adhere to but I can count on my hands the number of times that actually happens. The javascript team does a better job here, ironically.

EDIT: There's no preferred method overall in the programming world, it's just where you work that decides what is best. If you are more comfortable with single line then all power to you, do it just so. Just let others know this is your standard and you burn the rest at the stake if they do not follow.

Sage Grimm fucked around with this message at 06:06 on Sep 27, 2015

ToxicFrog
Apr 26, 2008


lets hang out posted:

maybe some other program could mirror the analog stick to the dpad, that would do it. I can't figure out how to make xpadder do that.

Some gamepads actually have a built in toggle for swapping the analog stick and dpad; on Logitech controllers it's a"mode " button underneath start/select.

madjackmcmad
May 27, 2008

Look, I'm startin' to believe some of the stuff the cult guy's been saying, it's starting to make a lot of sense.

Unormal posted:

The coolest part of this approach is it will build tent cities around any arbitrary obstacles if possible, no matter what. Like I can dump a tent city into a cave, or amongst ruins, etc.

I just start throwing rectangles down-- did this randomly sized and placed rectangle fit in the area? No? Toss it out and try again. 10,000 failures? Unthinkable, rebuild the level, try again. The end results are: levels that do what I want combined with deep, crimson-hued shame over inflexible code that only works in that one location.

alarumklok
Jun 30, 2012

madjackmcmad posted:

I just start throwing rectangles down-- did this randomly sized and placed rectangle fit in the area? No? Toss it out and try again. 10,000 failures? Unthinkable, rebuild the level, try again. The end results are: levels that do what I want combined with deep, crimson-hued shame over inflexible code that only works in that one location.

So the coding equivalent of slamming the square peg in the round hole repeatedly until you've worn a big enough hole it'll fit. There's no shame in that, only +piety with Trog.

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!



And we're in-game! Maps are already flowing way better than the old ones. Next up, prefab rooms.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
^- looking great!

madjackmcmad posted:

I just start throwing rectangles down-- did this randomly sized and placed rectangle fit in the area? No? Toss it out and try again. 10,000 failures? Unthinkable, rebuild the level, try again. The end results are: levels that do what I want combined with deep, crimson-hued shame over inflexible code that only works in that one location.

Yeah, I mean I ultimately share your love of the dead simple and "throw random poo poo down, try again if it fails" was and is still Qud's main tactic for most of its level building. I was 'inspired' by the fact that when I build and throw away Qud's absurd levels where every rock and flower is a full game object, I start thrashing Unity's GC pretty hard, and with a bit more scientific approach I end up getting both a much more stable process but also some actually useful control over the process and far more elegant code to accomplish it with. 95% of Qud is still lolz montecarlo, though.

Unormal fucked around with this message at 16:39 on Sep 27, 2015

lets hang out
Jan 10, 2015

ToxicFrog posted:

Some gamepads actually have a built in toggle for swapping the analog stick and dpad; on Logitech controllers it's a"mode " button underneath start/select.

I did eventually get exactly what i wanted by plugging in a dualshock 4, setting the movement to the analog stick in the game, and then mirroring the analog stick to the dpad with ds4windows. so now I can switch between the stick and the dpad whenever and I stick to walls when I'm using the latter. Totally ideal.

I caught a stream of a guy doing some late chapter 2 stuff and it is loving unreal where this game goes. Really incredible.

dis astranagant
Dec 14, 2006

madjackmcmad posted:

I just start throwing rectangles down-- did this randomly sized and placed rectangle fit in the area? No? Toss it out and try again. 10,000 failures? Unthinkable, rebuild the level, try again. The end results are: levels that do what I want combined with deep, crimson-hued shame over inflexible code that only works in that one location.

So that's why your game is broke as hell :v:

tokenbrownguy
Apr 1, 2010

For those of you who went to the IRDC: Do any academics/fans/developers in the genre publish papers in a specific journal or venue? I can't seem to find much published on roguelikes that isn't ~game journalism~

madjackmcmad
May 27, 2008

Look, I'm startin' to believe some of the stuff the cult guy's been saying, it's starting to make a lot of sense.

dis astranagant posted:

So that's why your game is broke as hell :v:

Actually the parts where it breaks are usually one of two conditions: 1) I tried to do something too fancy, and didn't see it through completely in the interest of time 2) It's built off a really old piece of code that I never had the time to refactor.

Both of those conditions would occur less often if I were a better programmer.

Nettle Soup
Jan 30, 2010

Oh, and Jones was there too.

Apparently I bought towerclimb back in 2012 and then promptly forgot about it. Thanks for reminding me to look through my old emails for it :v:

Also a friend made me play ToME and suddenly I have 21 hours in it, when did that happen, where did my weekend go!

Farquar
Apr 30, 2003

Bjorn you glad I didn't say banana?
Finally picked up Sproggiwood for Android this morning. This is the phone game I've been dreaming of for ages. :bubblewoop:

Also, it's on sale!
https://play.google.com/store/apps/details?id=com.freeholdgames.sproggiwood&hl=en

andrew smash
Jun 26, 2006

smooth soul
Thanks for mentioning the sale. With Qud and other games recently I had kind of forgotten how loving good sproggiwood is and it's perfect for mobile.

woke kaczynski
Jan 23, 2015

How do you do, fellow antifa?



Fun Shoe
Yeah, I grabbed Sproggiwood earlier today and I've thoroughly enjoyed myself. I'm pretty bad at roguelikes, so I haven't gotten very far yet. I really appreciate how well it works on mobile, because I don't have as much gaming time as I used to. All in all, all worth the buy.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
It's on sale for iOS, Android & Steam, all 50% if all ya'll want to get your any-platform Sproggi on.

MrWillsauce
Mar 19, 2015

I kind of regret buying Sproggiwood. The hardest difficulty wasn't hard in any kind of fun way: there were just way too many enemies on the screen at all times that I'm convinced most stages were impossible without buying tons of upgrades for your character and/or finding good items early on in each dungeon. Also all of those enemies that are tied together such that you have to kill all of them at once (or else they'll regenerate like hydras' heads) are everywhere and they're horrible. The graphics were cute and everything was super pretty and charming, but it was just unplayable for me after awhile. I tried playing it on a lower difficulty, but that wasn't satisfying. I also don't like the mechanic of progress being made and preserved between characters. Part of the appeal of roguelikes to me is that you start off on equal footing every time, and you just have to use your wits and the knowledge you've gleaned in previous failures to survive. Buying equipment and buffs that carry over between games feels like cheating, but the game is built so that you have to do that or you won't be strong enough to meet the challenges of later levels. I guess I just have a weird compulsion about that kind of thing. Also maybe I just suck, because I still couldn't beat the game even though I spent all my money on buffs and items, but me sucking hasn't discouraged me from playing any other roguelikes like it did in Sproggiwood. It's probably more fun to play on the bus or the train than it is to play for multiple hours in a row sitting at home at your desk.

Klaus Kinski
Nov 26, 2007
Der Klaus
Is that the "hard" difficulty on release or the "lol murder" difficulty added later? Because the first one is very doable after a few tries, the second one is intentionally pretty loving stupid.

Sage Grimm
Feb 18, 2013

Let's go explorin' little dude!
Yeah, I wouldn't do Savage difficulty until you've played the game through at least once. Then you've got some build up in the persistent skills to allow for rush tactics and surviving to your first few level ups.

MrWillsauce
Mar 19, 2015

It was the one meant to be terrible, so it's my fault. But I really couldn't help myself.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

MrWillsauce posted:

I'm convinced most stages were impossible without buying tons of upgrades for your character and/or finding good items early on in each dungeon.

Nah, Hand of Luke and I can do Savage straight, so it's not unfair, but we've played 1,000s of hours; but I agree it's hard to the point where if solving super intense puzzles like that isn't your thing, it might be too much; however it's definitely (well, probably) better to learn the game on Hard (at least for a single class), because you have to really understand everything that's going on, it's a tough mode to be doing 'discovery' on.

Unormal fucked around with this message at 05:35 on Sep 29, 2015

Farquar
Apr 30, 2003

Bjorn you glad I didn't say banana?
Well I'm discovering on Savage mode and loving it, so you know. Different boats, different floats.

RPATDO_LAMD
Mar 22, 2013

🐘🪠🍆
I'm still not sure about this: Is there a way to buy Sproggiwood to get the mobile and steam versions, or do you have to buy them separately? I know humble bundle sells other mobile games but it looks like the humble store option doesn't include a mobile copy.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

RPATDO_LAMD posted:

I'm still not sure about this: Is there a way to buy Sproggiwood to get the mobile and steam versions, or do you have to buy them separately? I know humble bundle sells other mobile games but it looks like the humble store option doesn't include a mobile copy.

Not at the moment. None of the stores make it easy or possible to do bundles like that, though we may eventually so a humble PC plus apk , we haven't set that up yet.

Klaus Kinski
Nov 26, 2007
Der Klaus

RPATDO_LAMD posted:

I'm still not sure about this: Is there a way to buy Sproggiwood to get the mobile and steam versions, or do you have to buy them separately? I know humble bundle sells other mobile games but it looks like the humble store option doesn't include a mobile copy.

Every mobile+pc bundle I've bought has been separate codes.

Adbot
ADBOT LOVES YOU

Isaac
Aug 3, 2006

Fun Shoe
I played sproggiwood on savage first run by accident and beat it without much fuss. You dont have to kill everything and with blobs you should avoid it.

Vampire plus that item that creates health potions should see you through the last levels fairly easy

Isaac fucked around with this message at 07:48 on Sep 29, 2015

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