Tag: javascript

  • crapslesscraps.com

    crapslesscraps.com

    I recently returned from a work trip in Las Vegas, Nevada. I’ve always enjoyed playing live craps, but I discovered a new fondness for bubble craps, specifically the crapsless variant. If you aren’t familiar with craps in general it’s the famous game where everyone stands around a table and make bets on numbers while one of the players, called The Shooter, rolls the dice.

    A lively crowd gathered around a craps table in a casino, with players engaged in the game and a dealer presenting the dice.

    A lot of folks shy away from craps because they find the game confusing, but it really isn’t. At its core, it’s just making bets on the outcome of the dice roll, which can be any number between 2 and 12. As there are the most ways (6) out of 36 possible outcomes on two die to make 7, it is the most commonly rolled number. On a regular craps table, the way most people play is on the Pass line. On the pass line, 7 or 11 wins on the first phase of the game or the “come out” roll, while rolling a 2, 3, or 12 loses. Any other number becomes the point. From then on, the goal is to roll the point number again before rolling a 7. That’s it.

    So now that you’re a craps expert, crapsless craps is basically the same game except 2, 3, and 11, 12 can also be points. That’s really it. If you roll one of those numbers on the come out, they become the point, and you’re trying to roll the point number again before a 7.

    Like I mentioned above though, craps is just making bets on the outcome of the dice roll. So you don’t have to play that way. You can bet on any single number, multiple numbers, all the numbers, or even that all the low numbers or all the high numbers, or all the numbers that are not 7 will roll before a 7 appears (called the ATS bet) which I managed to hit during my business trip on the last night I was there:

    Display screen showing a hand pay amount of $3,006.89 for a craps game with betting options for low rolls, high rolls, and 'Roll'em All' on a green background.

    Anyway, when I got back home I wanted to play more, just for fun with play money. I looked, and there are different craps games I found online, but no crapsless craps! So I decided I would just write the game myself from scratch using some new frameworks while having an opportunity to test out some different AI tools and development patterns. Whenever I do this kind of stuff, I always have a strong instinct to make whatever I end up making available to other people, free of charge and free of ads or anything like that, just like other tools I’ve built for myself like my 5/3/1 workout program generator or any of the little games I made like Draw! or Lucy’s Adventure (Speaking of Lucy, my dog the game was named after, passed away 2 weeks ago at 16.5 years old 🥲).

    A dog sitting in a car, looking happy with its tongue out, next to a red water bottle.
    👼

    Anyway, I found the domain crapslesscraps.com was unregistered so I registered it then set up an auto deploy pipeline for merges to my master branch in version control to deploy the game there:

    Screenshot of the online Crapless Craps game interface showing dice rolling area, betting options, and player bank balance.

    So, if you like craps or want to learn more about it by playing online with play money, there is now a crapsless variant available for free at crapslesscraps.com 😊. If you have feedback for me about the game or find a bug, feel free to contact me.

  • Global Game Jam 2021

    Global Game Jam 2021

    As I mentioned in my last post, I was able to hook up with a local team from The Greater Gaming Society of San Antonio and participate in this year’s Global Game Jam. Global Game Jam® (GGJ) is the world’s largest game creation event taking place around the globe. This year’s theme was “lost and found” and the team decided that a private investigation / noir type game would be fun. So my teammate Ansley spun up some art and Wes composed some music and we got to work. We ended up naming the game “Chase Ventura: Kid Detective” – a mystery game where you have to find clues as the neighborhood kid sleuth to “solve cases”.

    Animated title screen for "Chase Ventura: Kid Detective" - our team's submission for the Global Game Jam of 2021
    The game’s title screen

    Overall it was a super cool experience. I was lucky to have a great team; they produced super quality assets to work with and were great at communicating and providing feedback. I wish there had been more time to implement all of the ideas, there was just too much to do in such a short amount of time. I guess that’s the nature of game jams though. I also wrote the game’s systems from scratch and that detracted a lot of time as well. Unfortunately with four hours to go and tons to do, I had to strip virtually every idea out of the game to get something shipped, so you basically get a cut-scene, and then walk around the neighborhood and talk to the various characters Ansley created. Fortunately I feel like our team was on the same page and the game, the art, and the music fit well together. Here are some stills from the game:

    I put up a little time-lapse of the last four hours of the Jam condensed to 10 minutes (the deadline was at 5pm CST and I think I submitted at 4:56pm):

    I’m super thankful to my wife for being supportive as I basically spent 48 hours binging over code. Also a big thanks to John and his team over at the Greater Gaming Society of San Antonio for putting on the event and helping me get on a team to participate.

    If you haven’t ever done a game jam I think it’s a great exercise from a development perspective for a few reasons:

    • Even though I broke every programming best practice, from DRY to bad spaghetti code, the time constraints force you to move forward with the mistakes and take the least path of resistance at every turn, forcing you to write a lot more code and figure out problems quickly on the fly.
    • Letting your team dictate the idea and direction of the game takes you out of your comfort zone for games or projects you would normally make.
    • Reviewing your own code after the fact gives you an opportunity to review what you could have done to make the code better / more extensible if you had ideal conditions.

    While it was stressful, It’s also great fun in general. We also ended up taking second place out of our portion of the GGJ, and I am pretty happy about that 😀.

    Here’s the link to the Jam Page:

    https://globalgamejam.org/2021/games/chase-ventura-kid-detective-8

    And here’s a link to play the game online (recommended browser: Chrome)

    https://ggj2021.rudyfaile.com/

  • Svelte is cool

    Svelte is cool

    I am always looking into other languages and frameworks for learning and new projects. I have been more interested in the web space lately after porting Draw! from C to web using Web Assembly, and have been curious how other tools in the space have been progressing as well.

    Not to begin a holy war, but I have never been a fan of React. Aside from the super-mega-corporation thing, I have never found it intuitive, easy, or fun to use. Angular? *laughs* 🤣. I have been seeing Vue seemingly becoming more popular as of late.

    So on Friday in the #developers Slack channel at work I asked a simple question:

    A very interesting discussion about frameworks and web development in general ensued. I love chatting about theory, opinions, and perspective on all things programming, and it was really cool to hear folks whom I consider some of the top developers in the industry contribute to the discussion.

    Along the way, two of my teammates brought up https://svelte.dev/. I had not seen it before, and the second I clicked the link I thought: “this is so cool!” I thought the syntax looked pretty straightforward, it looked intuitive, and I love the idea of less boilerplate *cough* react *cough* and no virtual DOM.

    While we talked about lots of other stuff during the discussion, I decided to spend part of my weekend refactoring one of my web apps – https://strong.rudyfaile.com – using Svelte. Previously this application was written in PHP (and I blogged a bit about it here.)

    I had been thinking about refactoring the program for some time, mainly because it doesn’t really need to make a request to the server after it loads since all of the data could be available on the front end, so sending a form -> POST request every time the program generated simply wasn’t ideal. So this application was a prime candidate for the work.

    Here was sort of how the old architecture worked. A full reload was required every time the user needed new information from the application:

    And here was the intention for the refactor:

    I found it surprisingly easy and straightforward to learn Svelte. I would honestly say there wasn’t even that much of a learning curve. I didn’t really watch a tutorial or dig too deep into it. I just checked out some of the examples and built a brand new project with npm and started hacking away, occasionally checking the Svelte docs to achieve a desired result.

    As much as I hate the bloatiness and general misuse and abuse of npm, it is pretty nice to start a project with a one-liner and have a live hot-reload development server up and running.

    so easy!

    Not too long later I had the entire app done and ready to replace the PHP app on the server. Building for production was trivial with npm run build – the kicker? The built files to be hosted on the web server were only .10Mb (100 kb!) larger than the previous files on the server!!

    Now that’s a bloat I can get behind! While I don’t think I’ll be npm install savemeplz for every single project in the future, I definitely will be using Svelte again sometime soon. Stay tuned 🤠!

  • Lucy’s Adventure call for testing!

    Lucy’s Adventure call for testing!

    I made a recent post about my progress working on this game.

    If you’d like, you can play the work in progress 👉 here!

    Feedback/comments/suggestions welcome 😄

    I’m still working on the final art/sounds/music and adding more levels. I’ll have controller support in soon as well 🙂