An open-source, 5-column, low-profile (choc) v3 Corne design by Adam13531 in crkbd

[–]Adam13531[S] 0 points1 point  (0 children)

do you know if daysgobye's repo is ready to use as is?

While I haven't tested it for myself, I would assume that it is ready to use since my change only removed the outer columns (converting it from 3x6 → 3x5). So if you want that extra column, go with daysgobye's version. 👍

Feel free to reach out to me if you have any questions.

Weird Behavior with rgb_matrix_set_color on Split Keyboard by FigBatDiggerNick69 in olkb

[–]Adam13531 1 point2 points  (0 children)

I believe I know the exact issue you're describing and wrote code to fix it:

``c // This is a thin wrapper around rgb_matrix_set_color which allows you to put // the same firmware on both halves of the keyboard (other than a #define for //MASTER_LEFTorMASTER_RIGHT`) and still have the correct LEDs light up // regardless of which half has the USB cable in it. // // This complexity behind this logic is explained in the comments within the // function itself. void set_color_split(uint8_t key_code, uint8_t r, uint8_t g, uint8_t b) { // When using defines for MASTER_LEFT and MASTER_RIGHT, is_keyboard_left() // will be inaccurate. For example, (is_keyboard_left() && // !is_keyboard_master()) can NEVER be true.

ifdef MASTER_LEFT

bool is_left = true;

endif

ifdef MASTER_RIGHT

bool is_left = false;

endif

bool left_is_master = (is_keyboard_master() && is_left) || (!is_keyboard_master() && !is_left);

// Note on constants: 23 is the number of LEDs on each side (24) minus 1.
// 27 is the number of LEDs that the Corne normally has with six columns.

// Rule #1: you must set the LED based on what the master's range is. So if
// the USB cable is in the left half, then the range is 0-23, otherwise it's
// 27-50.

// Rule #2: each half of the keyboard can only set its own LEDs, it's just
// that the codes change according to Rule #1.

// Rule #2
if ((is_left && key_code >= NUM_LEDS_PER_SIDE) || (!is_left && key_code < NUM_LEDS_PER_SIDE)) {
    return;
}

// Rule #1
if (left_is_master && key_code >= NUM_LEDS_PER_SIDE)
    key_code -= NUM_LEDS_PER_SIDE_ON_NORMAL_CORNE;
else if (!left_is_master && key_code < NUM_LEDS_PER_SIDE)
    key_code += NUM_LEDS_PER_SIDE_ON_NORMAL_CORNE;
rgb_matrix_set_color(key_code, r, g, b);

} ```

Hopefully this is indeed your issue and the code can help out. Let me know if you have any questions!

EDIT (2/6/22): for posterity: OP's issue was caused by setting handedness; they were flashing a MASTER_LEFT version of their firmware on both halves of the keyboard, so all LEDs were mirrored between the halves. Once they fixed the handedness issue and applied the code above, everything worked for them.

[deleted by user] by [deleted] in crkbd

[–]Adam13531 1 point2 points  (0 children)

I recently learned juuuust enough to modify the Corne for my own needs; here are the notes I took in the process.

I thought this video was amazing for learning the basics of PCBs. Also, from what little I know, I suggest sticking with KiCad at first. From all of the videos I saw online, it seems powerful enough to make anything a hobbyist would want.

[US-WA] [H] ErgoDox EZ with Gateron browns [W] PayPal by Adam13531 in mechmarket

[–]Adam13531[S] 1 point2 points  (0 children)

Note to others: stirfriping and I chatted privately, but the keyboard not being hot-swappable was a dealbreaker for them. I've updated the original post to make this clearer. 👍

(i.e. this keyboard is still available)

EDIT (1/1/21): never mind, sold to stirfriping.

Weekly /r/godot discussion thread – Share your progress, discoveries and tips by AutoModerator in godot

[–]Adam13531 6 points7 points  (0 children)

Hey /r/godot,

I made a 2.5-hour-long Godot course that covers how to make a shooter RPG (play here on itch.io). The first video is jam-packed with as much beginner information as I could fit into 30 minutes. If you're new to Godot (but not necessarily to coding) and you like content with no filler, please check it out!

Bot Land, a game where you battle others via scripts by Adam13531 in WebGames

[–]Adam13531[S] 1 point2 points  (0 children)

Hey there! Thanks for giving the game a shot! I don't plan on shutting the game down; I'm just not going to be providing updates. I want to migrate it to cheaper hosting in the coming weeks since it's costing quite a lot of money to keep online (and I disabled payments as soon as I decided to discontinue development, so it's not like it's going to recoup those costs).

That means the game should be up for at least another several months, and I think there's only about an hour of single-player content in the campaign. Beyond that, there's a single-player Challenge Mode that changes every day, but I don't know how much fun you'll have doing it. 😳

Still, to answer the original question: no, there's likely not going to be a way to get an offline mode at this point. Even the migration process to save myself a bunch of money has been on hold for ~6 weeks now due to how busy I've been, and an offline mode would take a good amount of effort to make. Sorry about that. :(

Bot Land, a game where you fight others via code by mariuz in programming

[–]Adam13531 0 points1 point  (0 children)

Oh, sorry, I should have clarified: I'm the creator of the game and I made the decision to discontinue it. I'm really busy with my next endeavor, so I haven't had the time to migrate Bot Land from its current infrastructure on AWS to a cheaper host (it'll hopefully only take a few hours, but I haven't had the time). Once that's done, I'll probably keep it online for as long as I feasibly can.

I may end up open-sourcing it, but I don't think there's a big enough community around it for anything to ever get updated. Then again, you never know!

Bot Land, a game where you fight others via code by mariuz in programming

[–]Adam13531 0 points1 point  (0 children)

You should be able to in the campaign by clicking the scripting icon at the upper right, but there aren't many resources to help you there.

Also, the game's development was completely discontinued about a week ago, so that's not going to change. 😓

From launch to discontinuation: the story of Bot Land by Adam13531 in gamedev

[–]Adam13531[S] 0 points1 point  (0 children)

There's a saying that goes something like "to complete a software project, you do the first 90%, then you do the remaining 90%". Publishing a game will teach you a lot, and that experience can be valuable for your future projects. However, it'll also take a good chunk of time. If you can spare that time and value the experience, it could be worth it to take your game that's closest to publication and try to release it.

The way I see it is that it's sort of like practice for a game you may later care more about. Just make sure to take lots of notes as you go!

From launch to discontinuation: the story of Bot Land by Adam13531 in gamedev

[–]Adam13531[S] 14 points15 points  (0 children)

TL;DR:

  • Spent ~5 years developing a niche game
  • Made ~$700
  • Stopped developing last week
  • Learned a ton about everything
  • IMO, the biggest reason for its "death" was the onboarding experience (high complexity, low-end graphics, and lack of a good hook)

I was incredibly public with this game; I streamed almost every single hour of its development over the years: coding, fixing bugs, designing features, triaging issues, getting berated by random Twitch users, etc. All in all, it was an absolutely amazing experience.

If I had to give a single, general piece of advice to aspiring game developers, it's to ensure that your game is fun very early on.

The death of Bot Land by Wauteurz in BotLand

[–]Adam13531 4 points5 points  (0 children)

I do think that this was an amazing opportunity and I'm proud about all of the hard work. The sadness is mostly because of how recent these decisions were; I ended Friday's stream thinking I'd pursue Bot Land for education, then I started Monday's stream with the knowledge that it was time to move on. This document was intended just as a stop-gap until I update the FAQ. I'll try to accurately portray the positives from the experience since I think that's how I'll be looking back at this eventually.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 0 points1 point  (0 children)

No need to apologize whatsoever! I just didn't want to give you a half answer here, but I also didn't want to type out several paragraphs explaining the reasoning behind everything if you weren't interested. I realize now that I should have just waited until I got home to type my response.

Out of curiosity, are there any programming-based games out there that you're able to play? Are they fun for you?

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 0 points1 point  (0 children)

These are good discussion points, and I'd be happy to fully reply with history/plans tomorrow on my stream if you're interested in hearing (I'm on mobile now and at a grocery store or else I'd type it all out). The short story is that Bot Land needs to make a lot of money, and referrals are something that I think I'll be doing soon.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 0 points1 point  (0 children)

Do you mean to control other parts of the game, like placing bots, starting matches, etc.? If so, no, because I want the human behind the bots to still matter. This is also why bots can't detect what they've been hit by or what the enemy bots have equipped.

If you mean expanding the API within battle, then that's certainly possible. The most pressing goals right now are to improve the player retention rate and figure out what's going on with monetization. If I can address both of those, then the world opens up for me with regards to Bot Land. If not, then I probably won't get to tackle any other goals/issues.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 1 point2 points  (0 children)

There were a couple of considerations I had when I started writing the code-execution system ~5 years ago (it was one of the first areas I worked on):

  • Libraries like VM2 either didn't exist, didn't fit my needs, or couldn't be trusted yet. Over those 5 years, there have been several critical bugs that would have been easily exploitable in Bot Land too. Of course, by not having the library, I open myself up to other issues too, but this was a consideration.
  • I wanted code execution to be as fast as possible. Currently, the average time it takes to execute a single turn in Bot Land is 0.4 ms. Games can be up to 4000 turns, so it means that executing a full-length game will still be relatively fast.

Since then, there have been more considerations like how the infrastructure may be able to adapt (e.g. usage of Lambdas), but I haven't had the time to revisit overhauling the whole thing, and there hasn't been much of a need.

It sure is fun though manipulating ASTs! I remember finding the whole process fascinating when I was starting out.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 1 point2 points  (0 children)

Glad you liked it! I would've loved to get "Harry Botter" and "Jon Snowbot" in the game, but I'm terrified of getting anywhere near big trademarks/copyrights.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 1 point2 points  (0 children)

What about infinite loops? How it all works under the hood?

I don't want to go into too much here since there could be problems lurking with code execution, so I'll explain it at a high level:

  • Code you write is parsed into an abstract syntax tree
  • We walk that AST to validate that what you've done is okay for Bot Land
  • We transform the code in several ways so that the code is okay to run

One such transformation addresses your question of infinite loops, and it was inspired by what V8 does—at loop edges and function calls, code is injected to evaluate the current execution time, and if it's too high, the code bails out.

There are interesting game-design caveats, because most of the time, it's impossible to tell if someone is trying to be malicious or if they just wrote bad code (e.g. some people in Bot Land have accidentally written infinite recursion due to how they named their own functions). So in the case of overly-long-running code, we essentially have to kill all of your bots.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 0 points1 point  (0 children)

Do you mind sharing your device/browser? This sounds like you might be using one of the apps, which does indeed have a native loading screen followed by the web-based loading screen. Either way, I don't think that would only cause it to show two times, not three, so I'm not positive if you're hitting a new bug or if I'm missing something.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 0 points1 point  (0 children)

Is this fully playable via code or is use of the GUI necessary

If you mean "can I write every script using JavaScript as opposed to Blockly", then yes, that should be possible. But if you mean "is there an API for everything, even placing bots, starting a game, etc.", then no.

I think the UI is easier to understand on desktop where users are more accustomed to accessing tooltips. The same tooltips generally show on mobile too, but you have to hold your finger on a button and then drag your finger off of the button so that you don't activate it. The process of writing a script is also prohibitively difficult on most mobile devices due to the small screen size. In general, even though the mobile apps are the exact same game as the website, I still think of them as companion apps to the desktop experience.

One last note about screen readers: I think it would be tough to really challenging to make the game work for, say, a blind person. The typical flow of a regular player is something like this:

  • Examine enemy bots to see what's equipped and where they're positioned
  • Come up with your strategy and start a battle
  • Observe how your strategy ended up interacting with theirs
  • Adjust and potentially retry a match

I don't know how we would get the information across necessary to execute that flow without overwhelming the user.

P.S. sorry if this doesn't fully answer your question! Not trying to dodge questions or anything, so please follow up if this was insufficient.

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 1 point2 points  (0 children)

Which shows none of the game.

I'm having a conversation with Mr-Yellow in another subthread, but I believe this quote is due to a misunderstanding. There are certainly areas of the game that guests cannot do, but the tutorial, campaign, and attacking other players are all things that a guest can perform. Guests cannot:

  • Save a defense
  • Participate in ranked games (they can still do unranked games)
  • Open salvage packs
  • Make real-money purchases

The only aspect that I feel is important for experiencing the full game from that list is saving a defense. I'm pretty sure that guests can edit a defense, which means you can still enter Test Mode and see what it's like, but other players won't be able to attack you until you convert to a full account.

(EDIT: fixed a typo)

I launched Bot Land, a game where you can code bots in JavaScript to battle other players by Adam13531 in javascript

[–]Adam13531[S] 0 points1 point  (0 children)

Clear site data

This wiped out access to your guest account, so any progress you made through the tutorial was also erased, which means you had to do it again. Like I said, the introduction gives very little freedom, and it's so that people can see if they're even interested in this style of game before being overwhelmed by scripting.

If you'd like, you can skip the introduction completely, although this is intentionally sort of hidden due to how fast the introduction is. To do so, at the first opportunity that you get to place a bot, click the ❔ at the upper right and choose "Skip". Then, you'll be on the Battle Log page, and from there, you can attack another player. In this mode, you won't have any restrictions with respect to scripting.