Hacker News new | ask | show | jobs
by Adam13531 2450 days ago
Hey all,

I've been working full-time on a game called Bot Land for the last four years, and it just launched: https://bot.land/ In the game, you can make bots with a Scratch-like interface called Blockly or use a subset of JavaScript. Either way, bots are fully automated.

Here are some screenshots of the game: https://imgur.com/a/Rs2OWFg

Almost all of the development process (~5000 hours) was streamed live on Twitch: https://www.youtube.com/watch?v=RS5Va996Exg&list=PLSM9PbIe-9...

It's free to play, so please try it and tell me what you think!

10 comments

I’ve been wanting to play/build this exact game for years!

Congrats on launching. After four years that’sa huge accomplishment.

One problem I'm having, when manually editing the code, is using Math functions. Ideally, I'd like to calculate the square root of an expression, but whenever I try to use Math functions I get the error "The Callee's type is MemberExpression which is not allowed".

Any advice?

Hey, so one thing to keep in mind is that BotLandScript is a subset of JavaScript. Member expressions (e.g. "entity.life") are only allowed in extremely narrow scenarios.

Second, all available functions are accessible by clicking the question mark that shows in the script editor. Some Math functions like "abs", "floor", and "ceil" are exposed to users, but "sqrt" is not. This means that you would have to either write your own implementation or convince me to add it to the game. When I hear "sqrt" in Bot Land, I assume you want to find the distance between two objects, in which case you may be able to use the built-in "getDistanceTo" function. It can either take in an entity or two arguments representing (X, Y) coordinates and returns the Manhattan distance between the bot and the target.

If there's another scenario where you'd like the square root, I'd be glad to consider either accommodating the scenario or just adding access to Math.sqrt directly. If we go that route though, you wouldn't have access to whatever results from it before ~Tuesday of this week at the earliest.

What's the rationale for excluding sqrt? And, do you allow Math.pow (since that's the same thing)?
> What's the rationale for excluding sqrt?

That's a great question, and one with a non-obvious answer! For any potential function in Bot Land, including utility functions like Math.sqrt and Math.pow, I purposely wanted to provide as few as possible until someone expressed a desire for them, that way I could ask about the scenario they were trying to accomplish (as you saw in this thread). From there, I try to figure out if there's an even easier way of supporting their scenario so that everyone (i.e. even Blockly users) could enjoy it.

For example, if we find out that Math.sqrt was needed solely to find distance and that getDistanceTo was sufficient, then I could treat it as an education problem on behalf of Bot Land. In other words, I may want to include more snippets that use "getDistanceTo" or maybe make more tutorial content around that function.

Another philosophy would be to just add whatever functions I can think of and see what users do with it. That would probably have worked too; I'm not saying mine is better, it's just what I was thinking.

Thanks for the reply and the explanation. You're right that I was trying to calculate distance.

One thing that confused me though, when I was trying to figure out how to square root is that one of your code blocks seems to translate into Math.pow, which made me think that I could use it too.

For the same reason you gave, equality between block-based and text-based programmers, I'd suggest any function that the blocks translate into should be allowed.

If it would help you I can find the specific block I'm referring to latter today.

> You're right that I was trying to calculate distance.

Oh good! Thanks for following up on that.

> one of your code blocks seems to translate into Math.pow, which made me think that I could use it too.

The way that the blocks work is that they convert into JavaScript under the hood. This means that there's no way to do something through the blocks that you can't do in code (although the converse isn't necessarily true). This means that if there is a block that converts to Math.pow, it's broken, so I'd definitely like to know about that if you find it.

Got to say, I love your approach here.
> Another philosophy would be to just add whatever functions I can think of and see what users do with it.l

Well, the middle ground could be allowing the basic PEMDAS mathematic functions and their inverses, just to allow common manipulations

Awesome. This one goes in my collection of programming games. Thank you. I hope it gains traction.
The visuals look great, will play it in a bit. And wow 5000 hours-- incredible!
Congrats, Adam! I've been following your stream for years, and I'm always impressed and inspired by your programmers' log and note taking.
How the hell did you have the ability to drop 5000 hours on this?
I think the other comments were interpreting this as "where did you find the time?" rather than "where did you find the other resources to support that time?" (e.g. money and motivation). I've been maintaining a huge FAQ since I've gotten these questions a lot over the last four years, and this one in particular should answer the question: https://github.com/Adam13531/BotLand/wiki/FAQ#how-are-you-af...

I linked that rather than copy/pasting it because you may find other answers interesting on that page. :)

EDIT: I should clarify that 5000 hours is roughly the number of hours that I streamed, not the number of hours that I worked on Bot Land. There were way more hours spent in the background doing all sorts of things (including coding), but the majority of the actual development was on-stream.

I've been in the industry 8 years and worked on maybe a half dozen games but none of the projects was >400 hours.

I don't see how to make the commitment to spend multiple years without like an income coming from it and a team to work with. By myself it just becomes unbearable after a while.

I want to make a living off games. I'm almost 30 and things aren't getting easier.

Ahh, I see what you're saying. I think the answer to that is that I had set up my entire life around Bot Land. It was my full-time job, I had the stream for accountability, and I'd dumped my savings into the production of the game. I couldn't just walk away from that. Plus, it's been a lifetime goal of mine to make a successful game, and I'd always said that the one true way to definitively fail was to not finish Bot Land (I hadn't had such a definition of failure for other projects).

Without getting too rambly/preachy here, I'll say this: there are lots of things in my life where I think, "I'd like to do that, so I'll get to it eventually". After a long enough amount of time, you realize that "eventually" doesn't just hit you in the face—you have to carve out time for the things that you want to do. At the end of my last traditional job, I realized that my career goals weren't being met. Primarily, I wasn't learning. I talked to my wife about what I should do, and she suggested that I productize Bot Land. That's when I had to realize that the concept of "eventually" was peaking through the cracks probably trying to hit me in the face, and I had enough momentum to just go with it.

You mentioned that you're almost 30 and that things aren't getting easier. I can't say that they will get easier. What may help you take one of your many games to completion is simply scoping it down way further than you think you should. Cut out multiplayer, cut out innovative AI, cut out randomly generated dungeons, and just focus on a couple of solid aspects.

I don't know if any of that advice resonates with you, but if not, perhaps defining what barriers you feel like you've hit would help identify what patterns may be stopping you.

The barriers i repeatedly hit seem to be due to my lack of competence or inexperience at the tools im using.
I feel like most people have that much time assuming they cut out time wasting things like Facebook/YouTube/etc.
Self-care and wasting time or not equivalent things.
True. But for a lot of people, Facebook is the opposite of "self care"...
5000 hours is a long time, but you can do it in 5 years with under 3 hours per day. That's within most people's means though you would have to make sacrifices.
Actually about 4 hrs/day...when figuring out approx billable hours in a year a good estimate is 50 weeks @ 40 hrs/week, so 2000 hrs/year full time (8 hrs/day) or 1000 hrs/week half time (4 hrs/day)...
Where did your EULA come from? Seems a bit brutal :)
A combination of a lawyer and some minor touch-ups I've made over the years as things have changed.

Do you mind clarifying what you find brutal? I am very far from being a lawyer, so I just wanted to make sure I'm protected, which is why I contracted the work out in the first place.

Why do you have the videos unlisted?

This is amazing, congrats.

> Why do you have the videos unlisted?

Two reasons:

1. By making them public, they show up for all of my subscribers on YouTube, but I assume most subscribers on YouTube want to watch "major" update videos like announcements, recaps, etc. 2. I didn't want a new person coming to the channel to get lost in the ~800 development videos rather than seeing the important ones.

> This is amazing, congrats.

Thank you! It's surreal to have spent this long developing something and finally launch it.

What about the two channel system that is so common on youtube? One for major productions, the other for faster-release-but-narrow-appeal videos like behind the scenes or development progress? That way super fans can follow the bonus channel without having to go through your website to find videos.
That probably could have worked, although I don't think I was the best at advertising things. :( As a streamer, I felt like one of the most difficult things to do was to alert people about news/changes for basically anything (my vacation schedule, a bug, the current task I was working on, etc.).

Now that the game has launched and my streaming schedule is up in the air, I don't know if I'll be changing anything with the YouTube channel. It's been around for so long now, and I don't think many people want to watch the past VODs anyway beyond skimming to see what's changed in that amount of time.

really like the scratch style snapping chunks of logic! nice trailer too
Nice. I had a idea a few years ago, but never got around to working on it. Let me know if you ever want to buy the aifighter.com domain off of me.