Jump to content
  • Advertisement

Tom Larkworthy

  • Content Count

  • Joined

  • Last visited

Community Reputation

129 Neutral

About Tom Larkworthy

  • Rank

Personal Information


  • Twitter
  1. You can run Unity in a serverless function-as-a-service (FaaS), with graphics, in less than 70 lines of code! Full demo code is on github. I think this is useful to game developers and robotics researchers alike. But why? FaaS spin up resources to execute them per execution. It completely eliminates idle serves saving money. It’s stateless, it’s simple to use, and it scales massively when you have traffic bursts or bulk operations, yet scales to zero (i.e. free) when you have no usage! We managed to get a stack working which we use to generate thumbnails for our game. Unity is a pain to get working in a Docker, so instead we used Node.js and off-the-shelf browser automation. To do this we used a few tricks: Unity builds can be compiled to Web Assembly (Wasm) and WebGL, which can be hosted in a Cloud storage bucket as a website. Inside a function you can pilot an automated Chrome session using using Puppeteer. Chrome ships with a WebGL software rendered called swift shader, so you can take live screenshots. So, putting it all together, you run Chrome in a function, which navigates to a webpage that hosts the Unity WebGL build and runs it. At this point you have your game running in a function! You can you pass data in and out of the running game by reading the Unity log via the Chrome console and reading the URL parameters from within Unity. Whilst this was useful for us to keep the Unity build as the source of truth for game development, I think this approach could also be useful for machine learning training simulations too. The development ergonomics are very nice, as you can navigate to the webpage using Chrome to experience what the function sees, and development of the simulation is done in a commercial tool designed for this very purpose (Unity). This, hands down, beats using academic tooling. Furthermore, it scales horizontally when you need it (e.g. a massively parallel training batch), and costs nothing when idle! Read the full article at corepox.net
  2. Tom Larkworthy

    Early Access is LIVE!

    Wow it’s been years but you can now get Corepox in the Android app store. Corepox is the manifestation of a hypothesis that programming games can be fun. As game enthusiast, I feel let down by mobile the mobile platform, I want a good game for mobile. As a father, I want a game that teaches. As a software engineer, I want a game that enables computational thinking. Corepox is this mix of what I want from a game. In Corepox, you design and battle space ships. These space ships fight autonomously through the logic you wire up at design time. The drag and drop interface suits touch controls. The fact you don’t need to actually control the ships suits playing while commuting. To get good, you need to understand computational thinking but without the laborious process of typing. Because the programs are built out of modular components that take up physical space and weight on your ship, the game discourages complex programs. Programming is distilled to its essence, a few choice non-linearities is all you need for complex behaviour. Also, as a ship takes damage and individual components explode, the space ship malfunctions, sometimes in hilarious ways. This early access is just the beginning. I hope, with your encouragement and feedback, to add features that go beyond what we typically expect from a game: a programmable API, physics lessons and real neural networks. Give it a shot, and let me know what you think! P.S. you don’t need to be a programmer to play it, it has a tutorial Read the full article at corepox.net
  3. Google App Engine Flex can run most docker workloads, for instance, it is able to run headless Unity linux builds unlike Google Cloud Functions or Cloud Run which are on the gVisor runtime. However, you cannot scale-to-zero, which usually implies a GAE flex application will cost you around $50 a month. This is too expensive if I only need it running occasionally but over a long time period. In Corepox’s case we evaluate a ship’s strength by battling against other ships. We regularly get new ships, but we don’t need to run battles 24/7. Instead, running benchmarking battles twice a day for one hour is enough. This is potentially a 12x cost reduction to less than $5 per month! To do this I use a Google Cloud Scheduler job firing once every hour, notifying a Cloud Pub/Sub topic, that triggers a Google Cloud Function. The Cloud function, using ambient authentication (no keys to manage!), calls the Google App Engine Admin API to: List all the versions of a GAE application and find the latest one Depending on the hour of the day, either sets the servingStatus field to STOPPED or SERVING via a PATCH request Voila, my GAE usage graphs. Money saved! Read the full article at corepox.net
  4. At last, success, I have inspired my children with a technological marvel. I’ve combined their two favourite tech toys. I’ve improved usability, and exposed the kids to what makes computers special. One toy is Dash the robot by Wonder Workshop. Dash is operated through a mobile app. Its a good tool to teach basic programming concepts, my kids enjoyed the lessons, but they could not get the hang of the manual touch controls. The other popular tech toy we have is the Kano Computer Kit. Its an attractively packaged raspberry PI which has very child friendly educational apps for young kids. What’s cool with Kano, is that not very far under the hood, is a real Linux system. You can call Terminal from the homescreen, and it’s internet connected. So here is the story of when I thought it would be great if they could control their robot from their computer. We wrote a couple of programs together, and built a pretty rugged self-contained programmable robotics system too. And here is how we did it! Install Morseapi dependancies Getting dependancies installed and working was painful. Damn you numpy! This is the worst bit. Anyway, get into a shell on the Kano (classic > K > Code > Terminal) and > sudo apt-get install bluez python-setuptools libatlas3-base libatlas3 libc-dev python-dev libbluetooth-dev Then install a load of python packages > pip install wheel pybluez numpy I had problems with numpy so built from source at some point. Maybe helpful? > pip install numpy --upgrade --no-binary :all: I also had problems with pygatt manifesting as connection problems which a downgrade fixed > pip install pygatt==3.1.1 Find Dash’s Bluetooth device ID bluetoothctlr > scan on Find out your Dash’s bluetooth ID by scanning it using Linux tooling. You need this for setting up the API. Prepare workspace Obtain the Corepox fork of the Morseapi API (the fork adds concurrent driving and steering) I did not setup ssh keys so I downloaded the zip > wget https://github.com/Corepox/morseapi/archive/master.zip > unzip master.zip Run Morseapi’s setup > python setup.py -e . Open a code editor > geany . & GATHER THE CHILDREN! Now it gets fun! Prepare the children for failure, but give them hope that the next time they press enter, it might work. Success is born of failure. You know, life. First up, get the test program working. Put the collected device id in a variable for later use. Then try the test program > DASH="32:E3:54:20:60" > python examples/clock.py $DASH # raise hope here Once you have the connection working, now to try your own SDK client. I started with something super simple, glitch.py. This is easy to type, and, it makes the robot act very weird, seizing my kids focus. Run with, get your kids to press enter. Don’t forget to update the device ID in the source. > python glitch.py ACT II The next program took several hours to develop. I wanted to give the kids greater control than the touch joysticks. My idea was to drive Dash using the arrow keys, which is something they already learned from one of Kano’s games. The life lesson: programming is genuinely useful. It took a few attempts to get right, but the code is fairly simple in the end. You can move the robot around by holding down the relevant direction like a gamepad. You can also press the spacebar to make Dash say “Hi”. > python drive.py The proof that this was not a waste of time, my children immediately took to the keyboard controls. It’s renewed interest in Dash, and, for the first time, they are able to deliberately direct Dash. Most importantly, the process of setting it up has given them a little hint of the power of computers! Read the full article at corepox.net
  5. Tom Larkworthy

    Corepox Explained: the Core

    In this devlog, we will focus on the Core: a critical component of each spaceship. The core represents you, the AI pilot. It is very important that the core remains intact during battles. The loss of the core will lead to defeat. Here is what it looks like when a core is destroyed. Read the full article at corepox.net
  6. We just rebuilt the Corepox website to improve performance and to extend our functionality with custom pages generated from game data. The website scores 99/100 on a page speed test, and cost less than $5 to host and can be extended and scaled horizontally We think the architecture might be of interest to other indie developers who are looking for highly customizable, high performance but low cost serving technology. Read the full article at corepox.net
  7. Tom Larkworthy

    Corepox Explained: the Lazer

    Today, we will discuss the lazer: a component that can help you destroy your enemy. A lazer shoots when its’ input is greater than zero. If no input is provided, then the lazer’s input is assumed to be 1. If the input is zero or negative, then the lazer does not fire. Here, you can see a small demonstration of the lazer. The lazers with positive or no input, fire a long range pulse of damage with the same shooting power. The actual value of a positive input is not proportional to the power of fire. The lazer with zero input, doesn’t shoot at all. Read the full article at corepox.net
  8. Tom Larkworthy

    Corepox Explained: the Engine

    In today’s devlog we will be talking about the engine: a vital component to any moving spacecraft. The engine gives a propulsive force proportional to the numeric value of its’ input. If the input is lower or equal to zero, then it is counted as zero and the spaceship remains idle. Here, you can see a brief demonstration on how the input of each engine affects the speed of each spaceship. As you can see, the bigger the input is, the faster the engine is. Read the full article at corepox.net
  9. Tom Larkworthy

    Website Upgrade Complete! Mobile Users Rejoice

    Yay, we have migrated to a new provider. Quite a lot of new pipes were installed, which has improved our page speed a fair bit, particularly for mobile users. The old Wix site was particularly annoying for having a jerky cursor which is the terrible input latency. It took 30 seconds before you could interact with the page too!!! Mobile Page Speed for Wix siteDesktop users were not treated quite so bad, but still noticeable input latency.The new site is a vast improvement, though still room for improvement on mobile. No more jankyness! Mobile latency is smashed, most stats are improved except time-to-paint. I think Wix games that metric though.Wow, the desktop site scored 99/100The other improvements are that the site is responsive now, and I added some proxying so I can mix-in Google Cloud Functions under the same domain and behind a common CDN. I’ll explain that stack in another post. It took 4 full days to build migrate, which is time I would prefer to use coding on the game, but I think the results are worth it! Read the full article at corepox.net
  10. Tom Larkworthy

    Web site migration

    Thanks! Wix was a good first pass for understanding what I wanted. Now I am building it properly. I have a reverse proxy setup with Firebase hosting, which merges a managed wordpress install for the blog, and some serverless dyanmic pages that query the game content. I leverage Firebase Hosting's CDN to cache the website pages and serverless pages under a single domain. I will write up this stack properly soon, I just been waiting for a decent enough site to be worth posting the content too! Soon! See this for what I wanted merged on a single domain:-
  11. Tom Larkworthy

    Web site migration

    Hi, our Wix.com website performance has not been satisfactory. Pages are slow, sometimes content does not load, the mouse jerks around etc. So I have been preparing to move host, which should go live over the next day. I've been testing the new site and there are a few things to get right that I can't test in advance, and the consequence of misconfiguration is emails get marked as forged. Fingers crossed I can do this correctly, but if you see some weirdness tell me about it at tom@corepox.net and know that its probably just a symptom of the move. Here is our bad google page speed test at the moment. Fingers cross those numbers go up soon! I particularly dislike the input latency slowness, this is Wix using a lot of clientside javascript rendering on the main thread which is causing the jerky pages. Wix has a lot of great features. I love the speed I built the site, and the widgets are gorgeous. However, the site isn't responsive and I can see mobile users are abandoning the site. So reluctantly I have to say goodbye to Wix. Read the full article at corepox.net
  12. Tom Larkworthy

    Top ships

    Some are monolithic, some are swarms, some use hyperdrives, some do not. The design space is massive! These are a selection scraped from our tester’s leaderboard. Read the full article at corepox.net
  13. Tom Larkworthy

    Corepox is now on #instagram

    You can now follow Corepox on Instagram @corepox.game. On Instagram, we will be sharing pictures & stories giving you a sneaky peak on what happens behind the scenes during Corepox development. Follow us now! Read the full article at corepox.net
  14. Tom Larkworthy

    Corepox explained: the Constant

    Today we look at the most used component in Corepox spaceships, the constant. A constant is basically a numeric output. It is one of the simplest components in Corepox. However, its meaning and magnitude changes according to the number configured & the part that is connected to. Below there are two cases that show how the constant’s meaning and power, changes in different situations. Engine <-> Constant Constant connected to an engine An engine has an input which symbolizes its thrust. When connected to a constant, the speed of the engine is proportional to the value of the constant. If the constant is zero or less, the engine is off. Engine <-> Lazer Turret Constant connected to a lazer turret The lazer turret has an input that defines the direction the turret shoots. This input is called the angle input. When a constant is connected to the turret, then the turret will fire in the direction the constant specifies. Depending on each spaceship design, this component can change power and magnitude. Now, it’s up to us to discover how to use it wisely to make our battles victorious. Read the full article at corepox.net
  15. Tom Larkworthy

    The Joy of Player Designed Ships

    I am overwhelmed by the variety of designs that early testers have developed. Some of these ships solve problems in less components than I thought possible, and this is the point of Corepox. We are exploring the design space together! Here are a few choice designs I found today The Turreted Tank This medium sized ship features three turrets. The outer turrets are steered by dedicated radars, while the center turret is steered by averaging the two adjacent radars! It also has two unguided explosive missiles pre-launched. This ship is likely to remain partially operational even when a radar is destroyed thanks to the redundancy. It just keeps fighting. The Hunter This compact small ship is brimming with lazers. It has an innovative reversed radar guidance system which increases its turn speed. This means this ship will be able switch to new targets very quickly. It has additional armor protecting its critical binary component. The Multiship This is likely the strongest ship of the three. In battle, enemies will tend to concentrate firepower on the top left gun drone. Meanwhile, the fixed turret station is using a radar to aim a single lazer accurately. The gun drone shows some serious engineering by possessing a guidance system that doesn’t require a binary function! That’s a pretty smart size optimization that illustrates how thoughtful ship design provides advantages in Corepox. I can’t wait to see other unexpected innovations in the Corepox universe! Read the full article at corepox.net
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!