How i made StockCrypto


I recently published the first StockCrypto version, 0.12, and i would like to tell a story of how i made this game.

One day, i woke up with the idea of making a game with Lua, because i recently learned Lua and now i can use it for some game projects made by me, though i still needed a graphics library, so i went on Stackoverflow to see if there was a Lua graphics library, but then i learned that you can't program graphics from a Lua program itself, but there was an option i saw that was "easy to program", Love2d. I immediately downloaded the interpreter and runned it. I saw the "No Game" screen, as i didn't know how to start a Love2d game from source code. Though, i looked up the tutorial and i saw that the tutorial reccomends an editor called "ZeroBrane Studio", so i used downloaded it, wrote a simple program that prints Hello World on the screen, and then i went off like a rocket, which means i moved on from the tutorial and started making complex routines myself using graphics commands, and i was able to create a cool red pixel scrolling lines effect. But then, i looked at the Itch.io jams and i saw the "This Game Is Way Too Long" jam. I immediately joined the jam and came up with an idea for my game: A money simulator where you invest on a cryptocurrency (of course not a rl one) that costs a lot, starting with 1000 money.

So, i immediately started programming a title screen (bc that's the thing i program first on every game i make), though i wanted this game to stand out, to have a cool effect, but first i had to select a font. I browsed in Dafonts until i found the Nesatho font. I immediately though this was a cool enough font for this game and started programming the effect. I decided to use a sine effect where there's a for loop that spawns one letter at a time the game logo, and basically much more complicated stuff that is hard to explain. I also programmed the 1 key to start the game, because why not?

Then i started making the game itself. I had no idea for a GUI for my game, though i tried to make a border for the stocks view but it just looked bad and glitchy so i removed the border (for now), and i had an idea for a Cookie Clicker style GUI, but for a line graph i didn't feel that fit well. So, i put some text that tells you how much Cryptocoins (yes, i got the idea from bitcoins) and money you have, and because the font was way too large for that text, i scaled the text by half, and moved on from the GUI. I wanted to create a function that would display and generate randomly stock values, so i used a table for the stock values and i used complicated math to display that table as a line and also i shifted all the values of the table and set the last value to the previous value +/- a small random number, and i called it a day for that function. Though i still needed a way to play the game itself, and of course that was Investments. I programmed the buttons I, J, and K to give you 0.01, 0.1, or 1 CryptoCoins respcetively and E, S, and D to give you the stock value of 0.01, 0.1, and 1 CryptoCoins respectively, though i found out you could get infinite money/CryptoCoins by letting the other variable go into the negatives. I immediately fixed that bug, and made sure that you can only invest if you have enough money/CryptoCoins, else the game would not let you invest. There was also a bug where the code was checking wheteaver a key is pressed, and thinks that every frame it a separate click. Of course, i don't want this but occurring, so i fixed it by setting a variable to true if the user presses a key and only doing the action the key does when that variable is false, and setting the variable to false when no key is pressed.

So, after all that developing, bug paching, and playtesting, i was finally done with the first prototype of the game. So, i published the game, added some screenshot, and- oh wait! I forgot to say how i "compiled" the game.

So, after developing this game, i created a Love2d file from the game's source code, and fused it with the love.exe executable to make a Windows EXE file. Then, i distributed the source code, the Love2d file, and the Windows EXE file. I also tried making a single executable that contains everything necessary to run the game but Love2d just refused to run the game in that all-in-one EXE file.

If you're wondering where is v0.10 and v0.11, if i get enough requests i will post the Love2d files of these versions after the voting period of the Jam.

Files

StockCrypto v0.12.zip 9 MB
Nov 29, 2021
StockCrypto_v0_12.love 290 kB
Nov 29, 2021
StockCrypto v0.12 Source Code.zip 290 kB
Nov 29, 2021

Get StockCrypto

Leave a comment

Log in with itch.io to leave a comment.