Hey, this is kyren from Cucklefish

So, one of our next projects is codenamed "Spellbound", and you can read little bit about it here. It's still pretty early in development, but I got the go-ahead from the boss to talk a bit about development here, in case anybody is interested.

Mostly I want to talk about the technical aspects of development so far in rust, and some things that we've run into along the way. A big part of this is that one of the goals for development on Spellbound has been to focus on console development very early in the process, rather than focusing on PC and then porting at the end, as we've done in the past. Something that I've had working for quite a while now but so far had been mum about was that we have a nontrivial rust project working on all three major consoles, and I have just been dying to talk about this. I have to be pretty careful, because of course I can't talk about specifics due to legal agreements that all console developers are bound by, but I believe I can explain quite a lot of what went into it and how easy / not easy it was without running into trouble.

I sort of intend this as an AMA, so feel free to ask me anything you're curious about regarding rust gamedev, or getting rust to run on consoles, or anything technical really. First though, I'll try and talk about some of the pretty obvious stuff:

1) Who are you, and why are you talking at me and why should I care?

I'm "kyren", I was the original lead programmer of the game "Starbound", and I'm working as the technical lead on one of the two current Cucklefish projects, "Spellbound".

2) Why did you decide on rust for developing a new game?

I think Cucklefish falls into a very specific niche in game development where using "alternate" languages is viable, and after exploring the space of alternatives to C++, I chose rust.

3) But rust is too young, there are no game engines written in rust, why don't you use Unity, etc?

Like I said, Cucklefish just so happens to be well suited to push boundaries a bit, because we focus on 2D games and don't really use any existing game engines. I don't want to start a huge debate about the merits of game engines like Unity for 2d development, but for us it has never really seemed terribly attractive. YMMV.

4) Why not C++? Why not a different language?

We're very very familiar with C++, Starbound was written in C++, and Cucklefish's other current project "Wargroove" is also written in C++. I feel that rust solves a lot of the problems and matches a lot of the lessons that I learned making Starbound, and I'm more comfortable making new projects in rust rather than C++ from here on out. There are not TOO many languages to choose from though, because for practical reasons, you need a language that can has no runtime, no gc, and can more or less pretend to be C.

Other urls found in this thread:

blog.chucklefish.org/about/
pcgamer.com/new-details-and-screens-from-stardew-valley-publishers-magic-school-rpg/
reddit.com/r/rust/comments/78bowa/hey_this_is_kyren_from_chucklefish_we_make_and/
hopooo.tumblr.com/post/160452455554/devblog-1-our-next-project-weve-been-working
github.com/kyren/flat-hash-table
twitter.com/NSFWRedditVideo

5) How did you get rust to run on three consoles, was it difficult? Are you using 'std' or 'no_std'? Is this something that is feasible for other people to do?

Spellbound is built as a static library using some high level interfaces that define just enough of an Application / Audio / Rendering API. On the PC, this is pretty easily implemented in SDL2, on consoles, it is implemented roughly half in C++ (to interface with the console APIs) and half in rust, with the specific balance depending on the specifics of console APIs that I cannot talk about. We patch 'std', 'libc', and 'rand' to build with custom targets for each console, so that we can more or less use stock rust with 'std' and a whole bunch of crates without difficulty. I can talk about this more in detail depending on what people want to know. I would estimate the total amount of extra time that I spent getting Spellbound running on consoles vs if this was a project in C++ rather than rust at around 2 weeks of just my time. It was actually easier than I expected, but it does require quite a lot of domain knowledge.

6) Rust is not ready for game development, this was a bad decision!

That's not a question :P For us, for this project, it honestly seems to be working out pretty well. The last real concern was platform portability, and that's no longer really a concern. There's not REALLY any more roadblocks related to choice of language, which is why I'm talking about it here now.

7) This means rust is 100% ready for game development for everyone!

Hey, that's not a question either! I would emphatically say NO to that, but honestly I'm not sure I would say yes to that about literally any platform. Everyone is different, every game is different, everyone's requirements are different. If you want to make something in Unreal 4, you might have a bad time? Maybe not, I don't know!

8) I think [insert other platform / engine] would have been a better choice!

Still not a question! That's very likely to be true for you, that may even have been true for us, who knows. That's just like, your opinion, man.

9) Does this mean that your next game will 100% for sure immediately come out on all three consoles on release day?

The game is running on all three consoles with input / audio / rendering, but that is not all that goes into releasing for a console. I'm not really allowed to talk about it in tremendous detail, but I can pretty much say that there shouldn't be anything technically in the way. We're still pretty early in the development process though, please do not construe what I'm talking about to be a promise about scheduling or releases or anything like that.

10) What crates do you use?

So far, in no particular order, at least lazy_static, log, rand, num, smallvec, serde (+json +yaml), strum, rental, regex, backtrace, itertools, error-chain, sdl2, gl, png, ogg-sys, vorbis-sys, vorbisfile-sys, twox-hash, rlua, and probably some I've missed. Cargo is a godsend. Edit: I also forgot 'smallvec', and there's a transitive list in the comments below.

11) Open source your engine, I want to use it!

I wouldn't consider the engine spellbound is being made in to be general purpose exactly, but it may be general purpose if you limit yourself to 2d games. Closer to release, I think I may be able to swing open sourcing more of the engine than is currently, but right now our main open source contribution is the 'rlua' crate.

blog.chucklefish.org/about/
pcgamer.com/new-details-and-screens-from-stardew-valley-publishers-magic-school-rpg/
reddit.com/r/rust/comments/78bowa/hey_this_is_kyren_from_chucklefish_we_make_and/

Is there a CoC in the game too?

k

You know, I don't mind [meme language]. It has some good points and I can see why someone would want to use it.

But, but... I just want those people to die. I want them to die a painful, drawn out death. And I want to watch them suffer. I want to look into their eyes when they get a taste of the pain and anguish their wickedness brings to the world. I want to watch them die, so I can know that justice it not just something you long for when you notice its absence.

that is fucking edgy bro. are you sure that you dont belong to 4chan?

I cant post there anymore. Snacks banned me for calling him a pedo.

I was about to say I've never heard about any of your games but Oh shit you made Risk of Rain ?

Just started playing it again. Can I hope your next project would be in the same vein ?

I know it's not really a technical question but I'm not that much into code yet. I didn't even knew what is rust before this topic.

how do we know you aren't larping, fucker? and why did you choose Holla Forums instead of 4chan?

They published Risk of Rain. If you want to see cucklefish quality look at Starbound.

We know OP is just pajeeting from reddit because he calls the company Cucklefish.

Mmh, I'm not into farming that much but it does look nice.

I actually DO have one major regret though, and that is that when I was exploring alternatives to C++, I didn't start with rust. I actually built quite a lot of a 2d game engine in Haskell first, before deciding against it for various reasons, and I feel like I wasted a lot of time.

Nothing good can come out of the same fags who managed to make a 2D game that drops at single digits FPS when the engine is slightly stressed with particles and that SLOWS DOWN TO A FUCKING HALT WHEN RUN WITHOUT DBUS.


Fun fact: RoR was made by some pretty cool guys at 4/agdg/. A shame it is programmed with GameMaker and it freezes when you reach the hardest difficulties.

How is this news?

fucking piece of shit

Do I have a surprise for you. Your milage may vary on the route they're taking, but I'm cautiously hype.

hopooo.tumblr.com/post/160452455554/devblog-1-our-next-project-weve-been-working

muhdick.jpg

That's where you should have learned to never trust in The Cloud™, and to back up stuff you care about. But blaming other people for your own mistakes is more convenient, I guess.

...

Yes, the customer is not always the king. Sometimes he is just a whiny little faggot.

Just post in Holla Forums's agdg thread instead. You're not going to get anything but shitposts here.

>>>/r9k/

You're the cunts that made Starbound?
The ones that ate a shitload of kickstarter money and then crapped out that excuse of a game?

My advice is for you to kill yourself.

Remember that time they released a starbound update with a 80MB "json asset unpacker" binary that contained the entire main program and most of its source code as debug sections? Complete fucking hacks.

I love Rigs of Rods!

wtf source?

THE HIPSTEREST

kyren is such a hack
github.com/kyren/flat-hash-table

have you not seen the "don't be clever" part?
fuck off with your ableism.

Hey that's cool, I've got a new board to check for some nice stuff. Thx.

I have no problem with the game so far. I just can't seem to save for some reasons, I'll look up if there's a way to manually do it.

Stop making excuses for shitty programmers producing shitty code, faggot

Snacks was the only not-pedo tbh.