Welcome to the Bitcave! Nerdiness, Jokes, Mods, Ideas, and coding!

Ease of use, and power mainly. Also C#/Obj-C are effectively a microsoft/apple pairing respectively, so C# was made by microsoft and is primarily a windows thing and Obj-C is primarily for mac os x/ios development. I’m only learning C# and C++ at the moment and I haven’t learnt any others so I can’t really offer advice but I can say that knowing how to program will help you learn how to code. Also some things like automatic memory management (really huge) aren’t in all of them, but that’s just related to the whole levels of power thing.

It will depend on what your goal in learning them is, if you want to learn them for a specific reason than that would help you decide. I’d just google around though and try to decide what to go for, just be warned though that C# isn’t actually a C variant and it’s just based off C so may not be quite as useful as the others for C in specific.

C is a nice place to start. I don’t know much about C++, there is something about it I don’t like, I feels unnecessary bloated to me. Objective-C is really easy if you know C, since it’s just C with a bit of fluff on top. :smile:
C# is quiet nice, though I always thought it felt more like Java than C.

It would be easier answering your question if you told what you planned to use it for.

If I remember correctly I really like this text about C:
http://beej.us/guide/bgc/
His network programming guide is(was) also quiet nice, even though it might be outdated now.

Thanks for the awesome site!
Many of those problems are quite hard :s I’ve already done 8 in python but man are they challenging.

I mean, C is one of the most popular languages, if not THE most popular, so I just thought it would be good to have some sort of basis in it.

aye, getting a good grasp on C is pretty much one of the best programming foundations you can have… i dont personally use or care for it, but its very prevalent…

@ManOfRet do you have any other experience programming? else it might be better starting with a language like Lua or Python, C is not the most beginner friendly language around. I tried it as my first language many many eons ago, before even the Pentium was born, and my Mac with a 33MHz 68030 processor was a monster, not a big success. But then again I was only about 11 and english is a 2nd language for me.

edit: forgot the age :smile:

@wolfen I do have some HTML, CSS, and Lua experience, and I tried to play around with Python for a few minutes, but other than what I’ve learned in the past 4-5 days, no experience.

Hello gentlemen.

I have been sent by the almighty @SteveAdamo, all fear his modliness!

Anyway, on my thread I challenged any coders with how you would go about programming the roulette table I’ve designed. I don’t want to put an image up for I feel like I’m hijacking this thread if I do, so if you want to see it, it’s here. It’s basically a square roulette table, with all numbers as standard on a roulette table.

Basically since you guys are all geniuses with all this guff, I’m eager to know if any of you have any idea how to code it, is it actually possible? I would hopefully be able to write the code myself, but I am simply looking for any suggestions for mechanics that I could use. :smile:

1 Like

No. Not realistically at least as roulette tables with the spinning and stuff kind of rely on the fact that they’re round, like a wheel. Also because standard roulette wheels only have 36 b/r + 1/2 green, you’ve got 4 green. Assuming you can deal with all the various little bits like animation and rule changes though than it’s pretty much just a matter of randomly choosing a random number which is really easy. The main hard part will be the animating as the others are just a matter of choose a number and give results based on that number which are easy. If you’ve got any more questions just ask but my main suggestion is to make the table more round because otherwise it will look weird and be hard to animate.

On the green you are right, I’ve already encountered that problem and took a fairly lame way out by saying one will be 0 and the other 3 will just return you your stake.

As for being round, I’m not sure I could even model that. It is enormous as it is (the whole thing adding up to 150x6x150) and would have to be even bigger. Plus, as @Tom says, circles aren’t great in Stonehearth. I know exactly what you mean and it’s frustrating that it can’t be circular, but the spaces wouldn’t be even so it still wouldn’t be great as the odds wouldn’t be straight up.

It’s a bit of a lame way out, but my only option so far is your suggestion: random number selection. This triggers the appropriate, premade animation (of which there would MAYBE be multiples but no promises) and changes the value for the variable of last spin, which is then chewed up and whether it’s black or red, 1-12 etc. is also calculated.

If anybody has a stroke of genius I would be delighted to hear it though. :smiley:

Yes they would, as the result will be chosen by an rng it will only suffer from psuedo-random bias which barely matters at all and can’t be avoided. My idea for animation was to just have like one or two animations of the ball bouncing and stitch them together randomly at runtime, wouldn’t be too easy but it would look the best. It would even be possible to pull off for a square table if not somewhat harder.

Think about alternatives to a circle then, remember that the more sides there are the better and then try out a few things like octagons that would still work fairly well.

I do like that idea actually, thanks for that one :smile:

I tried an octagon and whilst it was okay, the numbers on the diagonal looked rather odd. I don’t know. It didn’t look very good at all. Maybe I should keep plugging on that one.

Maybe roulette just isn’t a game for the citizen of stonehearth. That would just leave the question of what games of chance they are playing.

pin the tail on the lagomorph?

I do believe that leads to factional warfare :rabbit: :gun:

2 Likes

ok, im sorry, but you earned a few points for best derailed comment of the day… :smile:

@wolfen raises a good question though… perhaps @Smokestacks can devise an entirely new game, more fitting for our Stonehearth citizens, and the voxel world they inhabit… :+1:

1 Like

It really should be dice of course

There I was thinking if only there was a gambling game where you throw cubes around…hmmmm :game_die:

but in seriousness someone should create a mod for a card game like Pazaak or the one from Rage.

2 Likes

Dice! Of course! Plus I think I can get my slot machine to work…so yeah maybe no roulette :crying_cat_face:

Thankyou @Xavion though for the suggestions :smile:

there is always the possibility of russian roulette :ghost:

Isn’t that a little dark for Stonehearth? :wink: