Prvi draft igrice #2 je objavljen. Trebat će malo podesiti i tjunati da se postigne maksimalna igrivost. Igrica postane monotona kad se poveća razmak u ovim prolazima. Vidit ću s vremenom koliko povećati rupe, podesiti gravitaciju i pad … Igricu možete igrati ovdje.
I whipped up this little game for my friend’s kids as a gift, and it was such a blast I decided to give it a proper polish and release it under a free software license! Since I built it on the fly, not expecting anyone else to see the code, it’s a bit messy. I made a few parser and interpreter mistakes early on, but I’ll fix those up later.
In the video kid’s pictures are blurred. Game has audio but I did not record it.
I used Python, Pygame, Pygame GUI, and SLY (Sly Lex Yacc) to build it. To program your tanks, you use a language that’s a bit like C/JavaScript, and your code gets compiled into bytecode. To keep things fair, the interpreter runs one instruction for each tank per cycle. So, writing clever, compact code means your tank can process more information and react faster than others. That way, everyone starts on an even playing field!
Each tank has a small crew: a captain and a driver. They have different views from the tank, so you’ll have to choose which one will scan the area. Once you spot some movement, you can move toward it and fire. Just remember, your gun needs to reload before you can shoot again, so plan your attacks carefully!
You can also tweak parameters on the fly, which lets you try out the same code on different tanks with varied inputs. It’s perfect for all your experimenting!
Here’s a quick peek at the code. First bot behaves in random way:
The code is full of places where you’re forced to put semicolons, and that’s going to change. My other plan is to create a web application that makes it easy for multiple people to play with each other’s code, organize tournaments, and have a scoreboard. And yes, a WASM player will be used to show the battles.
Will make a new post once I clean up the code and publish first version on GitHub.
“Eins, Zwei, Šaban” je igrica o mojem dragom prijatelju Josipu Šabanu. Dapače, nije ovo čak ni prva igrica o Šabici. Prva je nastala dok smo zajedno radili u Alfatecu. Fora je bila da ga se natjera instalirati Firefox. U igrici je Šabica bježao od odijela (posla, obaveza, …) i skupljao šampite i ženske gaćice.
Šabicu je život nakon Alfateca u jednom trenutku odveo u Beč, pa zato ova igrica i ima Bečku temu. Opet postoji neka caka. Prije nije radilo u IE a ova ne radi na mobilnim uređajima. Za sad na svima ali ideja je da ne radi samo na Androidu. Zašto? Pokušajmo Šabicu natjerati da kupi iPhone!
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.