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.
 
  • Locked thread
Shima Honnou
Dec 1, 2010

The Once And Future King Of Dicetroit

College Slice
It hasn't even been two full years since Spacebase 1.0 and we're already getting a glorious encore with Starbound.

Adbot
ADBOT LOVES YOU

Babe Magnet
Jun 2, 2008

See also: Banished

deadly_pudding
May 13, 2009

who the fuck is scraeming
"LOG OFF" at my house.
show yourself, coward.
i will never log off

Babe Magnet posted:

See also: Banished

Banished was actually good, though.

Babe Magnet
Jun 2, 2008

Banished is okay.

LordZoric
Aug 30, 2012

Let's wish for a space whale!
Those Geodes look amazing. I'd play as one in a heartbeat, great work!

Seven Force
Nov 9, 2005

WARNING!

BOSS IS APPROACHING!!!

SEVEN FORCE

--ACTIONS--

SHITPOSTING

LOVE LOVE DANCING

As a novice programmer what WOULD be a better alternative to the if/else statements? Switch statement?

LordSaturn
Aug 12, 2007

sadly unfunny

Normal people put their item lists in data files and read them in at runtime. If you're hardcoding your item list, well, that thing works okay. Switch statements are almost never appropriate for anything, ever, FYI.

deadly_pudding
May 13, 2009

who the fuck is scraeming
"LOG OFF" at my house.
show yourself, coward.
i will never log off

Seven Force posted:

As a novice programmer what WOULD be a better alternative to the if/else statements? Switch statement?

It takes about the same amount of work to either make a jillion subclasses of Item, one for each type of item, or to make a Dictionary of arrays that gets used to instantiate an Item on the key of either the item name or some other unique ID. The main difference is that doing it either of those ways is easier to read, and also easier to make changes/append things to, than a massive 30-page If/Else block.

LordSaturn posted:

Normal people put their item lists in data files and read them in at runtime. If you're hardcoding your item list, well, that thing works okay. Switch statements are almost never appropriate for anything, ever, FYI.

This works, too, but I'd prefer the hardcode version honestly in a game with online multiplayer support.

Thompsons
Aug 28, 2008

Ask me about onklunk extraction.

Rrussom posted:

Love the Geodudes

the lower row are clearly geodames :colbert:

Bel Monte
Oct 9, 2012
Geodudettes!

That's the proper surfer terminology, anyway.

Cicadas!
Oct 27, 2010


Thanks, guys :kimchi: The fact that you like them makes the whole project feel like a little bit less of a waste, even if they're never going to get used in the end.

Eonwe posted:

i will allow you to make a power rangers style video game, but with Geodes as the main characters

tia
This is actually a super great idea and seems really obvious in retrospect, given their technicolor qualities.

Rhopunzel posted:

This art is really really good and is pretty much game quality. You're really talented.
Coming from you, that means a lot. Thank you!

victrix posted:

I like the one with a pink butt head :3:
It was originally supposed to be the top half of a heart shape, but it really does look like a butt. I think I like your interpretation better.

dog kisser posted:

Yeah, these are amazing. I feel like I saw a very early version of these before I started work on the Peglaci - I was jealous then and I'm jealous now of your skill!
There was in fact a super early build on the site for a while, but when they updated everything changed and I felt like it wasn't worth sorting out so i shelved it.
But I could say the same to you! The Peglaci have always stuck out as one of if not the the most fleshed-out and impressive races around, and your upgradable guns and LUA wizardry with objects always made me really sour I never learned how to code.

Thompsons posted:

the lower row are clearly geodames :colbert:
Fun Fact: This was actually my internal name for the smooth varieties.

ToxicSlurpee
Nov 5, 2003

-=SEND HELP=-


Pillbug

Seven Force posted:

As a novice programmer what WOULD be a better alternative to the if/else statements? Switch statement?

Inheritance. You have an Item class that has all the things all items can do then inherit from that. So MeleeWeapon inherits from Item and adds the things all melee weapons can do. From there it depends on if you need the data to be malleable or not. In something like Terraria you could just create another class that inherits from MeleeWeapon for each type of weapon; as in you have ShortSword and BroadSword and the specific things and whatever. Cleaner, more readable way to say "ShortSwords behave this way while BroadSwords behave that way." Then in whatever tracks equipment you have a slot that can take a Weapon of some sort (you can, of course, have Weapon between Item and MeleeWeapon then have other stuff inherit from Weapon but that's also dependent on the game).

The instead of if/else crap you can just give each terminal class its attack code. Inheritance is like insanely useful for that sort of thing. Also has inherit sanity checking so you can prevent the game from even being able to let the player equip a helmet as a weapon.

Croccers
Jun 15, 2012
Do you think it was updated for the handful of console versions of the game when Engine Software ported it?

Slime
Jan 3, 2007

ToxicSlurpee posted:

Inheritance. You have an Item class that has all the things all items can do then inherit from that. So MeleeWeapon inherits from Item and adds the things all melee weapons can do. From there it depends on if you need the data to be malleable or not. In something like Terraria you could just create another class that inherits from MeleeWeapon for each type of weapon; as in you have ShortSword and BroadSword and the specific things and whatever. Cleaner, more readable way to say "ShortSwords behave this way while BroadSwords behave that way." Then in whatever tracks equipment you have a slot that can take a Weapon of some sort (you can, of course, have Weapon between Item and MeleeWeapon then have other stuff inherit from Weapon but that's also dependent on the game).

The instead of if/else crap you can just give each terminal class its attack code. Inheritance is like insanely useful for that sort of thing. Also has inherit sanity checking so you can prevent the game from even being able to let the player equip a helmet as a weapon.

No stop you're making me want to talk about code and about how inheritance is great and overriding is wonderful.

Seven Force
Nov 9, 2005

WARNING!

BOSS IS APPROACHING!!!

SEVEN FORCE

--ACTIONS--

SHITPOSTING

LOVE LOVE DANCING




I know this is OT but I appreciate the detailed responses. It's nice to know efficient ways to code stuff.

On topic: I can't believe I used to defend this game. :(

Seven Force fucked around with this message at 14:44 on Apr 6, 2016

egg tats
Apr 3, 2010

LordSaturn posted:

Normal people put their item lists in data files and read them in at runtime. If you're hardcoding your item list, well, that thing works okay. Switch statements are almost never appropriate for anything, ever, FYI.

Not necessarily from a game design point of view, maybe, but switch statements would be helpful for making a series of discrete input options. Like you've got a dropdown with several possible options, a switch statement can be more readable, and a little easier to expand.

Of course, there might be some reason at a low level to not ever use a switch statement that I just don't know, and hardcoding a list of items or w/e is the worst goddamn idea.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Switch statements are fine, use them if you want, or not. What that Terraria setup needed, though, was to store all that item data in a config file and load it all up into a data structure at runtime.

Inverness
Feb 4, 2009

Fully configurable personal assistant.
I looked at the notes for version 1.0.

I'm a bit excited and cautiously optimistic. I made sure not to play the game too much while it was still in development. That was also a long time ago, so I expect things will be relatively new by this point in time.

I did explore some planets, quests, and build a house before:

Ahundredbux
Oct 25, 2007

The right to bear arms

Inverness posted:

I'm a bit excited and cautiously optimistic.

Careful, we've been here before

Cicadas!
Oct 27, 2010


Ahundredbux posted:

Careful, we've been here before

More times than I'd care to admit :smith:

Orv
May 4, 2011

Inverness posted:

I'm a bit excited and cautiously optimistic.

There's nothing about making the Terraria parts of the game less tedious, so you shouldn't be.

Inverness
Feb 4, 2009

Fully configurable personal assistant.

Orv posted:

There's nothing about making the Terraria parts of the game less tedious, so you shouldn't be.
I've never played Terraria. What are those parts of the game?

Orv
May 4, 2011
The material collection and various excavation/exploration portions, which Tiy seems determined to make take several eternities.

Prop Wash
Jun 12, 2010



Inverness posted:

I looked at the notes for version 1.0.

I'm a bit excited and cautiously optimistic. I made sure not to play the game too much while it was still in development. That was also a long time ago, so I expect things will be relatively new by this point in time.

I did explore some planets, quests, and build a house before:


If you take them at their word then you should be cautiously optimistic, given that the patch notes consist of "literally every aspect of our game is going to be much better"

Unfortunately there's absolutely no specific information and no reason given past development that they can be taken at their word, so I'd recommend judging them by their actions instead of their words

your choice though!

GenderSelectScreen
Mar 7, 2010

I DON'T KNOW EITHER DON'T ASK ME
College Slice

Inverness posted:

while it was still in development

:lol::lol::lol:

What makes you think it'll leave development? This is just going to end up like Minecraft's move to beta: it's just going to be a raise in price and nothing else.

oddium
Feb 21, 2006

end of the 4.5 tatami age

Hitlers Gay Secret posted:

:lol::lol::lol:

What makes you think it'll leave development? This is just going to end up like Minecraft's move to beta: it's just going to be a raise in price and nothing else.

you mean when notch literally flipped a huge novelty switched and declared minecraft at 1.0 and released

Josuke Higashikata
Mar 7, 2013


hey


notch made sure to clarify at one point that the "all future versions for free" thing he said originally didn't count for new platforms before he flipped that switch.

he is not 100% lazy. only 99.9r%

randombattle
Oct 16, 2008

This hand of mine shines and roars! It's bright cry tells me to grasp victory!

Hitlers Gay Secret posted:

:lol::lol::lol:

What makes you think it'll leave development? This is just going to end up like Minecraft's move to beta: it's just going to be a raise in price and nothing else.

What makes you think development will continue much past 1.0? I think it's more likely the game gets its meager 1.0 patch and then development hibernates. That's usually how these things go.

nerdz
Oct 12, 2004


Complex, statistically improbable things are by their nature more difficult to explain than simple, statistically probable things.
Grimey Drawer

Inverness posted:

I've never played Terraria.

Why haven't you? If you have any passing interest on starbound, you really have to play it. They released the 1.0 quite a few years ago and kept working on extra, free content. Also it's dirt cheap these days.

Cicadas!
Oct 27, 2010


Terraria is very good, and you should play it.

With friends, preferably.

Inverness
Feb 4, 2009

Fully configurable personal assistant.

nerdz posted:

Why haven't you? If you have any passing interest on starbound, you really have to play it. They released the 1.0 quite a few years ago and kept working on extra, free content. Also it's dirt cheap these days.
I have a pile of games on my backlog, and now expansions for games I already have.

Buying more is the last thing I want to do.

nerdz
Oct 12, 2004


Complex, statistically improbable things are by their nature more difficult to explain than simple, statistically probable things.
Grimey Drawer

Inverness posted:

I have a pile of games on my backlog, and now expansions for games I already have.

Buying more is the last thing I want to do.

all the more reason to give up all hope on starbound and forget it exists.

LordSaturn
Aug 12, 2007

sadly unfunny

deadly_pudding posted:

This works, too, but I'd prefer the hardcode version honestly in a game with online multiplayer support.

And I'd prefer the softcode version in a game with mod support! Support your modders, guys, they're probably better at this than you are to begin with.

senae posted:

Not necessarily from a game design point of view, maybe, but switch statements would be helpful for making a series of discrete input options. Like you've got a dropdown with several possible options, a switch statement can be more readable, and a little easier to expand.

My main problem with switch statements is that I've never seen a language that makes them take up less lines of code than an if-else block. Their main feature is fall-through cases, which are mostly a great way to put invisible bugs in your code. Literally the first book I ever read about programming a computer included an example of a program with a broken switch block.

I guess I would use a switch block for things where I need 4 or more values to go to the same place, but as long as it's one-value-one-destination, if-else is going to be less likely to gently caress off and die.

Seven Force posted:

I know this is OT but I appreciate the detailed responses. It's nice to know efficient ways to code stuff.

gently caress this topic

Seven Force posted:

On topic: I can't believe I used to defend this game. :(

A true life lesson I have learned is never to ever defend a video game. Play it or don't.

LordSaturn fucked around with this message at 02:42 on Apr 7, 2016

nerdz
Oct 12, 2004


Complex, statistically improbable things are by their nature more difficult to explain than simple, statistically probable things.
Grimey Drawer
I'm a developer but I never attempted to get into game development. Sometimes I wonder how bad the code for indies developing with a very small team and very limited funding is. Then I see that if/else monstrosity and the guys from project zomboid losing almost a year of progress because their laptops with the (non-versioned) source code got stolen.

Sloppy Milkshake
Nov 9, 2004

I MAKE YOU HUMBLE

nerdz posted:

the guys from project zomboid losing almost a year of progress because their laptops with the (non-versioned) source code got stolen.

hahahahah what? at least like use dropbox. i want to believe that was just an excuse to spend a bunch of time refactoring or something because goddamn.

DrManiac
Feb 29, 2012



Sloppy Milkshake posted:

hahahahah what? at least like use dropbox. i want to believe that was just an excuse to spend a bunch of time refactoring or something because goddamn.



Zomboid still isn't done? It may be the first proto-EA game I ever got when I bought that $5 tech demo years ago

Slime
Jan 3, 2007

Sloppy Milkshake posted:

hahahahah what? at least like use dropbox. i want to believe that was just an excuse to spend a bunch of time refactoring or something because goddamn.

Not only can you just dump it on dropbox for an easy, lazy backup there's tools specifically designed to handle versioning, backing up and distributing your code for anyone who needs to access it. For my own dumb little coding projects I'm just dropboxing poo poo because it's just me and I don't need to keep anyone in the loop about changes to the code, but on a larger project with multiple contributors like a game would have I would 100% be using better tools to handle that stuff. The only reason you wouldn't use it is if security was a major concern, in which case whoever you're working for would have their own system for handling it because god damnit offsite backups are loving important.

Slime fucked around with this message at 14:54 on Apr 7, 2016

oddium
Feb 21, 2006

end of the 4.5 tatami age

project zomboid... in space !!

spiritual bypass
Feb 19, 2008

Grimey Drawer
Christ, it only costs like $7 a month for a set of private Github repos

Adbot
ADBOT LOVES YOU

oddium
Feb 21, 2006

end of the 4.5 tatami age

Private Github Repos, reporting in sir

  • Locked thread