# Blogs

## Our community blogs

• 21
entries
• 0
• 188
views

#### Recent Entries

Latest Entry

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics.

#### Look up in the sky…

It’s Coronium SkyTable! We welcome awesome community contributor Develephant back to the forums and he comes back with a bang, releasing not one but two new plugins to satisfy your online cravings. It didn’t take long for the community to start dreaming up ideas to use these new tools — in this post, learn how Coronium SkyTable might be a great way to push configurations out to client apps.

#### Manipulating tiles

No doubt platformers and overhead games benefit from tilesets. There are some great tools and libraries for working with a tileset, but how do you manipulate a tileset you already have that needs some work? This thread provides ideas and offers a free tool which can help with your graphics needs.

#### Making your game loop smaller

Corona’s concept of a “game loop” is an event that triggers every frame. Having an efficient “enterFrame” function is a healthy thing. In this thread, see how one developer ended up with a more optimized game loop.

Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.

• 43
entries
• 85
• 57380
views

#### Recent Entries

Latest Entry

Hi

I've done a lot of work on Empire Rising these last couple of months, Ive made various improvements to it but the biggest work was getting the real time combat working. With this all the planned gameplay features are in. What remains is a ton of polishing and fine tuning (and replacing placeholder assets) but this is a big milestone reached.

Here is a video I made while playing a 1v1 game. If you want to try it out you can play it at empirerising.net (I apologize we still do not have a tutorial)

You can also check out empire rising on indiedb at http://www.indiedb.com/games/empire-rising

• 22
entries
• 26
• 24987
views

#### Recent Entries

Latest Entry

It’s almost 2am and I’m sleepy, but I wanted to write this down while it’s relatively fresh in my mind.

I’ve been playing around with user authentication in Go.

While actual user interaction is not the primary part of the simulation and will not be the focus in the Go rewrite as I said in my previous post, there will need to be a few basic actions that a user will take before leaving the rest of the simulation to do its thing. This is why I mentioned implementing a very basic CLI to interact with the simulation earlier. The user will basically just need to sign up, log in, set some basic options for their snail stable (like the stable name and location), capture a snail or two, and leave them to do their thing from there. It is kind of like norn Wolfling runs in Creatures 3 - you have to hatch some norns before you let nature take its course.

## Design differences from the PHP version

The main difference from the way the concept of users is currently implemented in the PHP version of SnailLife is this: users will no longer be considered synonymous with owners. In the PHP version of SnailLife, users and owners are just one table - account details, moderator/BrainHub management access fields, and stable information are all stored in one location. In my opinion this isn’t the best approach. A user of the snail simulation will not neccessarily need to be an owner of a stable or of any snails. This is especially true considering I’m building this thing with multiple possible applications in mind.

## Approach

I haven’t worked much with authentication systems before - the PHP version of the app made use of the authentication features that came with Laravel. So this is largely going to be a matter of trial and error. The commit with the rough first stage of this can be found here. Here are the highlights:

• For the Go rewrite I am thinking of using Auth0.
• I suspect I may need different auth approaches for web and cli authentication, and my first thought is to separate these into plugins. I have added a client type enum to the Application struct that is populated on app init. If the application is of type CLI, the CLI authentication plugin will be loaded. If it is of type Web, the web authentication plugin will be loaded (but I am only implementing the CLI version for now).
• The CLI plugin is built like this: go build -buildmode=plugin -o cli.so, and the authorizer then imports cli.so (or web.so, which is currently not built)
• The plugin could potentially have multiple possible providers, but right now I am only implementing Auth0 - each provider is to implement the Provider interface defined outside of the plugin in the auth package.
• I have added an auth.json to the conf directory (in gitignore of course), and also added a separate credentials generator for auth0 testing (also gitignored).
• So far I have a registration and login test implemented - the test generates a random username (email) and password each run to test registration and login.
• Authentication package structure is currently as follows:
auth
├── authenticator.go
├── auth.go
├── cli
│   ├── auth0
│   │   ├── auth0.go
│   │   └── tests
│   │       ├── auth0_test.go
│   │       └── config_test.go
│   ├── cli.go
│   └── cli.so
├── provider.go
└── web

• 23
entries
• 30
• 42525
views

#### Recent Entries

Latest Entry

Recently I looked through a bunch of triangular cellular automata in which each (1) uses two states, (2) uses the simple alive cell count type of rule, and (3) uses the neighborhood around a cell c that is all the triangles that share a vertex with c; that is, the 12 shaded triangles below are the neighborhood around the yellow triangle:

These cellular automata have state tables that can be thought of as 13 rows of 2 columns: there are 12 possible non-zero alive cell counts plus the zero count and each of these counts can map to either alive or dead in the next generation depending on whether the cell in the current generation is alive or dead (column 1 or column 2). I looked at each of the 4096 cellular automata you get by filling the third through eighth rows of these state tables with each possible allocations of 0s and 1s and letting all other rows contain zeros.

A handful of these 4096 feature the spontaneous generation of gliders but one rule is clearly the triangular analog of Conway’s Life. I have no idea if this rule has been described before in the literature but it is the following:

On a triangular grid

• If a cell is dead and it has exactly four or six vertex-adjacent alive neighbors then it alive in the next generation.
• If a cell is alive and it has four to six vertex-adjacent alive neighbors, inclusive, then it remains alive in the next generation.
• Otherwise it is dead in the next generation.

The above exhibits the glider shown below and the “bounded growth” that characterizes Conway’s Life. (To see this rule in action see my external blog on which I have it running in an embedded web CA app) Tri Life gliders are slightly rarer than in Conway life because they are bigger in terms of number of alive cells in each glider “frame” but do show up randomly frequently.

• 6
entries
• 7
• 3031
views

#### Recent Entries

Latest Entry

Hey y’all!

Here’s yet another update on “Project SpaceVille”!

As you may already noticed, in these past few months, we’ve been absent from programming. This has mainly been because we were all busy finishing our university degrees and we’ve also been very busy with business and team management and consolidation side of things. (boring, I know) So, we haven’t touched the code for so long, and we didn’t quite remember how messy it was. (laughs) We know we’ll have a dozen of sleepless nights trying to figure this out, for sure.

Right now, we are focused on fixing all bugs related to the input of the game! We feel that this is one of the most important parts of a successful prototype.

Next, we’ll be replacing most of the current art assets with proprietary ones we’ve already developed. We’re really in a rush here; we applied for Indie Dome at Lisboa Games Week 2017, so we need these two things ready by next friday. (gasps)

Let me talk to you a little bit about Indie Dome: it supports producers of independent videogames, placing artistic, innovative and culturally relevant projects in one space. As organization, it promotes and publicizes emerging projects and the most praiseworthy through showcases with the help of our partners and for the general public in order to foster greater awareness and visibility of the Portuguese and the international independent movement. You can check out more info here: http://indiedome.org/

The submissions close on July 30th! (gasps) So, you understand why there is so little time! Besides that we are also fixing the game so we can release it to our official Insider Programme alpha testers. Please remember that if you want to be part of this community you can still join us! Just send us a message on Facebook or an email us at faximegames@gmail.com with the passcode SPACEVILLE-IP.

Finally, we’ll be going to Game Dev Meet @Porto this next friday (July 28th). We’ll be there to exchange knowhow and experiences with other game developers. And guess what... “Project SpaceVille” is also coming with us! (wink, wink) So, if you guys want you can come try it out and give us your precious feedback.

If are from around show up and say hi to us!

Until then,

The FAXIME Team

Follow us and keep updated at:

Instagram: https://www.instagram.com/faximegames/
Pintrest: https://www.pinterest.pt/faximegames/

• 17
entries
• 13
• 10331
views

Latest Entry

## Building Block Heroes - Characters

I've spent the last few features talking about what lead up to Building Block Heroes, but not much talking about the game itself. So for this feature, I discuss the characters in the game, their abilities, and how I designed them.

Since there are four block colours in the game, the four-colour motif appears repeatedly in the game. The character selection is no exception to this rule, and I designed the characters to represent the four elements, which themselves are represented by the four flavours of block in this game.

### Heatwave

Heatwave is the leader of the Building Block Heroes and represents the element of Fire, as well as the colour Red. I designed this character to come across as dynamic and flashy, kind of like fire itself. For this reason I gave him spiked red hair and popped his collar to make him appear more flamboyant and cocky, kind of like a 50's-era biker or something. The popped collar was actually a challenge when it came time to animating Heatwave's run animation, however.

Although the characters don't have limbs, I still animated their bodies rotating as they run. Not doing this made their run animations more awkward and stiff (with the exception of Dirtbag, which will be detailed below). The popped collar made it somewhat awkward when drawing Heatwave's body from different angles.

Heatwave's ability allows him to dash horizontally across gaps. He can dash across a gap one block wide from a standing position, and two blocks wide if the player is walking in the direction he dashes in.

## Ice Queen

Ice Queen is the token female teammate and represents both the element of Water and the colour Blue. To emphasize her uniqueness among the Building Block Heroes, I gave her a cute dress and made her walk animation more dainty than the others.

Ice Queen is probably the most difficult character for me to draw because her features are less exaggerated than the others. Apparently this is a common thing among artists - difficulty drawing the opposite gender. The main difficulty was getting the shape of her head right without making her look masculine. I tried to enlarge her forehead and emphasize the roundness of her cheeks in order to prevent this problem.

Ice Queen possesses the ability to create blocks of ice out of nowhere. These blocks act like normal blocks, but are "colourless" - they can be destroyed by any colour of breaker or any chain of blocks. This must be kept in mind when making use of her ability.

Airhead is the quiet one in the group and generally doesn't think too much about anything other than flying through the air. Naturally, he represents the element of Air, which is depicted by the colour Yellow because Blue was already taken. I designed him to look like a typical surfer dude, but gave him a winged helmet to emphasize his affinity with air and flight. If you look closely, the wings flap when activating Airhead's ability.

Airhead's ability allows him to soar through the air and overcome taller obstacles than normal. Depending on how long the player holds the ability button down, Airhead can leap over barries two or three blocks high.

## Dirtbag

Dirtbag is the oldest of the Building Block Heroes and is the comic relief of the group. He represents the element of Earth and the colour Green. He was meant to look like a jolly old man, so I gave him bushy hair and a neckbeard. His rotund body and comic relief role made it a bit easier to animate him, because it made it possible to exaggerate everything he does.

Dirtbag bounces a lot more than the others when he runs, and his body doesn't rotate in the same way because he basically hops around rather than running normally. His jump and fall animation were also simpler, because he just drops rather than trying to land on his feet the way his teammates do - Dirtbag doesn't give a damn.

Dirtbag's ability allows him to destroy blocks underneath him if he's standing still, or blocks to the side depending on which direction the player is holding. This allows the player to access paths that might normally have been blocked (no pun intended).

Long story short, the designs of the Building Block Heroes are meant to complement each other. The individual abilities of the characters reflect this concept. Heatwave moves horizontally, Airhead move vertically; Ice Queen creates blocks, Dirtbag destroys them. Push and pull. This is to encourage teamwork when playing with two players, and experimentation when playing alone.

• 8
entries
• 6
• 281
views

#### Recent Entries

Latest Entry

There are two different kinds of pleasures we experience every day, we have anticipatory pleasure or ‘wanting’ and consummatory pleasure or ‘liking’. ‘Wanting’ is pleasure for looking forward to future events. On the other hand we have ‘liking’, this is pleasure for things in the moment. Think of it this way: when you play a game right now and enjoying it, you experience consummatory pleasure (liking). You might experience anticipatory pleasure when you are at your day job or school but can’t wait to be home this evening so you can play your favorite game. It might surprise you, it certainly surprised me, but these two pleasures are very different from each other and even have their own neural system in the brain. This means that according to your brain, liking and wanting aren’t the same thing. The wanting-type pleasure relies of the dopamine system. Dopamine is released each time you’re looking forwards to something you enjoy. The liking-type pleasure relies on your reward-driven system. When you do something you enjoy doing, opiates such as endorphins are released as a reward. These chemicals of the brain make you feel good. While wanting and liking are very different, it’s good to realize that you have to like or enjoy the thing at first before the wanting system for that same thing kicks in. However, you can have liking without wanting and wanting without liking. Think about a party you are dreading to go to. You really don’t ‘want’ to go but you know that you will ‘like’ being there once you get to the party. Addiction is probably the best example of wanting without liking. An addict will ‘want’ his drug but he doesn’t ‘like’ the effect of the drug anymore.

So be careful with too much wanting though, this can create addiction (Berridge & Robinson, 1998). I realize it’s an ethical debate whether you as a designer are responsible for a player being addicted to your game. In most cases you simply want people to enjoy your game on a regular basis and a healthy player shouldn’t become seriously addicted (where gaming becomes a problem for their daily lives). While not everyone is equally susceptible for addiction it’s important never to design for it.

The difference between ‘liking’ and ‘wanting’ doesn’t seem to be very logical and not much research has been done. It’s only logical that I couldn’t find many games that apply this theory. The closest application of the wanting-system to a game I could find was

It takes forever before I can play again!

Candy Crush. Candy Crush and other similar mobile games want their players to come back every day. The design of these games is driven by retention and that’s why they often have a lives-system and short levels. The short levels encourage the player to try another level. Once the player fails too many levels and runs out of lives, he or she has to wait before they are restored. Most games with such a lives-system have cycles of about 20 hours. This means that if a player runs out of lives, it takes about 20 hours for all lives to be fully restored.

Both the wanting- and liking-systems  can be applied to all types of games. However, mobile games can probably benefit most from these different neural-systems. Chances are that you aim for high retention when you design a mobile game. The wanting system is important here, your players should look forward to play your game every day. And of course they should ‘like’ playing your game as well, especially the first time they play.

Games with micromanagement can also benefit from the wanting-system, especially if the player has to use a limited resource that replenished over time. Imagine that you have people as a resource and you can use them to build stuff. Of course building stuff isn’t instant, it takes time. There is nothing for the player left to do after a while because all people are building things. The player will than leave the game with the intention to come back when his people are finished building his stuff. The player won’t be annoyed or dislike the game because there is nothing left to do since it’s the nature of the game.

Some design ideas for you

References and further research

• 5
entries
• 2
• 118
views

#### Recent Entries

Latest Entry

Finals are coming up in my college, so obviously I wont be devoting major time to this for a week or so, but after that it's time to go ham!

I've been reaching out a lot more recently since I've been using this site and working on this project, and I've got to say that it's been a great idea. I'm learning a lot about how to better take advantage of OOP concepts. I've gotten pretty decent at  how to use procedural languages, and that's kind of the mindset I've been stuck in. Obviously I understand the concepts of OOP, but I didn't really put effort into really using them and maximizing my efficiency until recently. So, this project will also be a great learning experience.

I'm still working on basic player/enemy behaviors, and since I'm discovering how to maximize my efficiency, it's taking a little longer now that it usually would. But in the long run this will pay off with faster progress.

Here's some concept art for potential characters in the game

Stay tuned!

• 2
entries
• 0
• 149
views

#### Recent Entries

Latest Entry

Hi all,

In the last 2-3 weeks, I was working on the building sites of the game. This was a hard period honestly, and this is the first time that I had some real trouble around the game.

Please don’t forget that still, you can register to my newsletter, so you can win a free copy of the game before release on steam. Also, I will look for testers using this email list. http://eepurl.com/cG63JD

Also, I’ve just created a subreddit for my game, where I will constantly look for the feedback! https://www.reddit.com/r/ComputerTycoon/

So, getting back to the topic, haha! It was a long time ago when I last created 3D games. The tools and the surrounded problems evolved a lot, and well, my knowledge faded away. I needed some time to get back!
For some time I really wasn’t sure if I want 3D parts into Computer Tycoon or not. But I ended up to include it. Simply, I felt that people will like it. I think it’s always rewarding to actually “see your empire”, so I made it Computer Tycoon as well. I talked about this in earlier posts where I was talking about the country map of the game. I love strategy games where you can see your territory growing. But how about your company?
When people think about companies, even more corporates, they think about offices, factories. Yeah, kinda “workplaces”, right? So the best way to make your company be a living thing is to show those buildings, I guess. The problem is that this makes the game even bigger, and also I’m a bit afraid that thinking about other tycoon games, people will assume that you can freely build stuff on a map just as you do it in transport tycoon or rollercoaster tycoon.
But here, you won’t. This game isn’t about that kind of creativity. There is another line of tycoon games, where building/road/anystuff construction isn’t the main thing. Just remind to Game Dev Tycoon, where you create games, not roller coasters.
In Computer Tycoon the “building site” is where you see the buildings of your company. You can upgrade specific parts to get more productivity or research/marketing capability, new marketing methods and so on. And I decided to give you a living 3D animation representation of it. Simply, you just can’t put the buildings where you would like to because they have predefined positions. Maybe in the sequel!

But what was the problem? Well, I made you a so big and so detailed representation, with so many models, that the engine had some trouble. Of course, on my strong dev PC that was totally okay, but what about older computers? Tycoon games tend to have a small system requirement because they don’t have usually an impressive graphics quality. These games aren’t really about graphics.
So this was the dilemma… Should I keep this or not? Well, at this moment, I’m on the track to keep it. I made everything to optimize the graphics.

Using a Radeon HD 6850 card, you can get 58-60 fps on Full-HD (watching the biggest, most crowded scene). And using a Geforce 920M you can also get 30 fps on 1388×768 resolution.
The Radeon HD 6850 is a 5 years old video card, with a 2262 benchmark. The Geforce 920M is a mobile relatively new video card for laptops with a 711 benchmark. I hope that it’s enough. This is something that I will need to test out on more systems. Yes, I really count on you in that!  Getting to this point was hard, pretty hard with very long nights. I just really hope that this level of system requirement is still acceptable. Feel free to check your own hardware on the benchmark list and put it in the comments to me.

Check out these screenshots of the building site. I guess that’s what is the most interesting for you out there. On the pictures, ambient occlusion is turned off. I’m still thinking if I want it or not.

Please stay tuned, and recommend the game to your friends who like retro computers and tycoon/strategy games. I really need your help. Multiple friends of mine have flopped games recently, and telling the truth, I’m a bit afraid at this moment that I will end up the same way. I work _literally_ all day and night to make this happen. Thanks for reading!

http://www.computertycoon.com
http://www.progorion.com

• 16
entries
• 56
• 35919
views

#### Recent Entries

Latest Entry

For an introduction to my reasons for migrating from Windows to Linux, see my previous blog post. Here I will try to stick to my experience as a Linux beginner, and hopefully inspire other developers to try it out.

## Installing Linux

The first stage of course in migrating to Linux is to either install it on your PC, or try a 'live' version off e.g. a usb stick (or even try it on a virtual machine?). I can't say too much here, because I got my new PC with Linux Mint pre-installed, and there should be plenty of guides on google. I went for Mint because I had briefly tried Ubuntu a few years ago, and I liked the look of Mint and fancied a change. I knew it was based on Debian like Ubuntu so there should be lots of software.

My first stage after unplugging my windows machine was just to take baby steps to familiarize myself with it, without running away in fright. After plugging in my network cable, I was away with Firefox browser. But after a few minutes I decided to install Chrome, as I am a fan and used that on windows (going with familiar!! safe space!!). This entailed installing software.

## Installing Software

On windows, the process of installing software usually involves downloading an installer package from the internet and running it, and hoping it likes your machine windows version / hardware / dependencies. You can do this on Linux too (particularly for cutting edge versions of software), but there is also a far easier way to do it, via a 'package manager'. The package manager is actually the pre-cursor to all the various 'app stores' that have become popular on Android and iOS, but the idea is simple, you have a searchable database of lots of software you can install, usually simply with a click. It also has the magic advantage that it has a very good system for automatically working out the dependencies required by any software, and installing those for you too in the background, or for finding conflicts (if these do occur, when I have rarely had conflicts it has been because I've been trying to do something nonsensical!).

I don't know whether it is my new machine, or linux, but the process of installation (and removal) is orders of magnitude faster than windows. It honestly only takes a couple of seconds for most of these installations. Anyway suffice to say I was very quickly running chrome, installing my favourite plugins, running my favourite websites.

## Accessing Windows Hard Disks

The next stage was to get some of my data across from my old windows PC. This is where things get slightly interesting. Predictably enough, linux uses a different filesystem to windows, 'ext4' on my machine, whereas my windows external hard disk was formatted as NTFS. As is Microsoft's way (to discourage competitors, no doubt), NTFS is not public domain. The clever Linux devs have presumably reverse engineered much of NTFS, because you can mount and read from the NTFS disk. However, I am erring on the side of caution and not writing to NTFS for now, because from previous experience of exFAT on Android, it is possible that an incorrect write can bork the file system, and hence lose a LOT of work. My solution for now was to copy my working source code etc from the NTFS hard disk to my ext4 linux SSD. Longterm I intend to convert all my NTFS external hard drives to ext4. It would also presumably be useful if Windows could read from ext4 drives, but I don't know how easy this is as yet.

Great! I had some data on my new machine. I tried some movies and they worked great in the in-built player, and VLC (which I installed). Image files loaded fine in the in-built viewer and in 'the gimp', which is sort of like the linux photoshop. I've used the gimp a little on windows, and am hoping it can do a lot of the photoshop duties.

## Blender

For 3d models, I've been using blender on windows, and as luck would have it, this open source software is available and runs very nicely on linux. Was installed and loading my game models in no time.

For development, this just left an IDE and compiler for c++ (my language of choice). Linux has a very handy standard compiler which is easy to install (g++ / gcc). This is where I might mention 'the terminal'.

## The Terminal

Although the name windows has become synonymous with the windows GUI, it is important to realise that an operating system doesn't have to be irrevocably intertwined with a GUI system. In linux, the operating system can use several different GUIs, depending which flavour you prefer. Or none at all, if for example you are running a server. The way to talk to the operating system below the level of the GUI is a command line interface called 'the terminal'. There used to be one used commonly in windows too, the DOS prompt, but it is rarely used now. In contrast on Linux, the terminal is still very useful for a number of operations, unfortunately it can be a little scary for beginners but this is a little unjustified.

To get the terminal up I just press Alt-T. You can list what is in your current directory by typing 'ls'. You can navigate up a directory with 'cd ..'. And you can navigate into a directory with 'cd MyFolder'. It will also auto-complete the folder / filename if you press tab.

From the terminal you can do a lot of stuff you would also do from the graphical file manager (the excellent 'nemo' is built in to linux mint), such as copying, deleting, moving files. You can also manually tell it to install packages just like it would install from the package manager, with the command 'apt-get'. To install software, you need admin privileges (this is handy as it prevents malware from doing anything naughty without you typing in the admin password). To get admin you type 'sudo' before the command:

sudo apt-get install build-essential

This tells it to run as admin (sudo) to run apt-get, and install (or remove) the package called 'build-essential'. This contains the compiler and other building tools.

## IDE

Unless you fancy yourself as a hardcore compile from the terminal from the getgo type of guy, you will also probably want to use an IDE for development. As I use C++, there are several to choose from, such as Eclipse, Code::Blocks, KDevelop, Code Lite etc. I went for QT creator, as I have used it on windows (again, familiarity!! baby steps!!).

Once QT creator was installed, it was fairly easy to tell it to create a hello world app and test it, it worked great!

This is where things got slightly more interesting. My current project is an Android game. I had been maintaining both a PC build on windows, and the Android build, with the platform specific stuff isolated into things like creating a windows, setting up OpenGL, input, and low level sound.

## OpenGL ES

Where things got slightly confusing is that because I am developing for Android, I was using OpenGL ES 2.0, rather than the desktop version of OpenGL. On windows I had been using the ARM Mali OpenGL ES Emulator, which emulates OpenGL ES by outputting a bunch of normal OpenGL calls for each ES call. I was anticipating having to use something similar on linux, so I attempted to install the Mali emulator in Linux, however I had little joy.

I was getting conflicts with existing OpenGL libraries used in SDL (which I intended to use for platform specific stuff). Finally after investigation I realised that my assumptions were wrong, and Linux actually directly supports OpenGL ES AS WELL as desktop OpenGL, through the open source Mesa drivers. I eventually got a 'hello world' OpenGL ES program working, and was convinced I now had the necessary libraries to start work.

## 64 Bit Conversion

The next stumbling block was a biggie. For historical reasons, all my libraries and game code were 32 bit. I had been developing with the idea that a lot of Android devices were 32 bit, and I was hoping the 64 bit devices would run the 32 bit code (hadn't really tested this out lol). So I had been previously compiling a 32 bit windows version, and a 32 bit android version. And it soon became clear that my linux setup was compiling by default to 64 bit.

No problem I thought, I should be able to cross compile. With some quick research I managed to get 32 versions of the libraries, however I had no joy with 32 bit version of OpenGL. It refused to install, and being a linux beginner I was stuck. I did some little research, but no simple path, and realised that maybe it was time to convert my code to 64 bit. Or rather, to have my code run in 32 bit and 64 bit.

I had been (rather unjustifiably) dreading this, as I have a lot of library code written over quite a few years. As it happened, aside from some changes to my template library, the biggest problem was in the use of 'fixup' 32 pointers in flat binary files formats. I have been using this technique for a long time now as it greatly speeds file loading, and also helps prevent memory fragmentation.

## Fixup Pointers

Essentially the idea with a 'fixup' pointer is you store into the file an 'offset' from a fixed point in the file to a resource, often the start, because there is no point in saving a real pointer to a file as it points to a (changeable) memory location. Then you can load the entire binary file as one big block, and on loading 'fixup' the offset pointer to a real pointer by adding e.g. the offset to the memory location of the start of the file in memory.

This works great when the offsets are 32 bit and your pointers are 32 bit. But when you move to 64 bit, your offsets are fine (as long as the file is smaller than 4gb), but there is not enough room to store a 64 bit pointer. So you have a choice, you can either do some pointer arithmetic on the fly, or change your file formats to use 64 bit offsets / pointers.

After a trial with the first method, I have eventually settled on going with 64 bit in the file, even if it uses a little more space. Of course the disadvantage is that it has meant I have needed to re-export all my assets. So at the same time as converting my libraries to 64 bit, the game code, I also needed to convert my exporters to 64 bit, and re-export all the assets (models, sprites, sound etc).

This has been a frustrating big job, particularly because you are coding 'blind'. Normally when you program you will change a little bit, recompile, run and test. But with such a conversion, I had to convert *everything* before I could test any of it.

## Success!

It has been demoralizing doing the conversion, I won't lie. But I have been so impressed with the operating system I was determined to make it work. And finally bit by bit I got the exporters working, re-exported, then the game, debugged. Got some crazy graphical errors, errors in the shaders that the OpenGL ES implementation didn't like (that's a whole other story!) but finally got it displaying the graphics, then did an SDL version of the sound this afternoon which is working great.

One thing I will say is I should have been using SDL before, it is really simple and makes a whole lot of sense of taking out the eccentricity of setup code on different platforms (windows in particular is very messy).

So to summarize I now have (nearly) everything working, compiling and running on linux. I still have to install android studio and try debugging an android hardware device through usb but I'm very hopeful that will work. Even if it doesn't it's not a show stopper as I can always use a second PC. I am gradually becoming more familiar with linux every day and even feeling I might get tempted to learn QT so I can do some nice 'native' looking apps.

• 43
entries
• 79
• 37361
views

Latest Entry

## UI: character menu & build mode panel

Continuing with the UI, I have decided to implement a brand new character menu that includes all the player stats, player model and item slots for your dressing needs (will be implemented in the future). You can rotate your player model with the script that is provided below.

I have also changed the looks of the Build mode to make it as simple as possible.

New build mode outlook

## Generic mouse swipe script

It is time to give away some code for those in need of a solution when you want to do something with the mouse gestures, in this case a mouse “swipe” gesture, e.g. you wish to rotate your character model in the character menu with your mouse. The script provided can be used in your projects, free of charge, and can handle multiple things:

• Unity Event when moving the mouse in X direction only
• Unity Event when moving the mouse in Y direction only
• Unity Event when moving the mouse in XY direction
• Knowing if the mouse is “down” on the selected raycastable panel

To make things work create a UI panel, hide the image (do not disable the component), select the image as raycastable and add this script. What you have to do now is to populate your Unity events with your custom function calls. Do not forget when calling your function via this script the function getting called must take one (for X or Y only events) or two (XY event) arguments type of float. The last thing is to mark the event as dynamic, see image below.

mouse swipe script

using UnityEngine;

using UnityEngine.Events;

using UnityEngine.EventSystems;

namespace Floatlands.UI
{
public class MouseSwiper : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
public bool isHoldingDown;
public Vector2 totalDeltaVector;
public Vector2 deltaVector;
private Vector2 prevVector;

private Vector2 startPosition;
private PointerEventData eventData;

[SerializeField]
public SwipeSingleEvent OnSwipeXEvent;
[SerializeField]
public SwipeSingleEvent OnSwipeYEvent;
[SerializeField]
public SwipeDoubleEvent OnSwipeXYEvent;

public void OnPointerDown(PointerEventData eventData)
{
isHoldingDown = true;
startPosition = eventData.pressPosition;
prevVector = startPosition;
this.eventData = eventData;
}

public void OnPointerUp(PointerEventData eventData)
{
isHoldingDown = false;
}

void Update()
{
if (isHoldingDown)
{
Vector2 currentPosition = this.eventData.position;
totalDeltaVector = currentPosition - startPosition;

deltaVector = currentPosition - prevVector;

prevVector = currentPosition;

OnSwipe((int)deltaVector.x, (int)deltaVector.y);
}
else
{
totalDeltaVector = Vector2.zero;
}
}

void OnSwipe(int deltaX, int deltaY)
{
if (OnSwipeXEvent != null)
OnSwipeXEvent.Invoke(deltaX);
if (OnSwipeYEvent != null)
OnSwipeYEvent.Invoke(deltaY);
if (OnSwipeXYEvent != null)
OnSwipeXYEvent.Invoke(deltaX, deltaY);
}
}

[System.Serializable]
public class SwipeSingleEvent : UnityEvent<int> { }
[System.Serializable]
public class SwipeDoubleEvent : UnityEvent<int, int> { }
}

## Outfits and speakers

Mito created some outfits concepts for “techies” that would distinguish them from the “farmers”. So this week I was occupied with modeling and weight painting the new outfits. They put more metal pieces on themselves as armour is made of junk pieces of sheet metal.

various “techies” outfits

After that I modeled propaganda speakers, which will appear in the world. The speakers will emit propaganda messages and other sounds.

propaganda speakers

## Extra robot concepts

Currently there is only one type of enemy robots. Simple humanoid machines that wield various weapon types (from snipers to grenadiers etc), they roam around and attack anything in sight. In the near future we’ll add sturdy, hard to destroy robots that will challenge the player. In addition, we’ll also add small spider like robots that will be quick and unforgiving with their melee attacks. Those enemies will surely test your aim. You can see the first glimpse of concept sketches below.

a different kind of enemy robots

## Mining drone in action

This week I’ve been playing around with drones, particularly “mining” drone which Andrej beautifully modeled. Mining drone will represent a fine touch to resource collecting. Upon destruction its loot will be dropped and ready for collection, which allows the player to gather resources faster. Tweaking its avoidance system makes it fly smootly regardless of any obstacles on its path. Finishing touches were also made for the drill rotation. More nuts and bolts next week.

mining drone in action

## NPC battles

Humans are already alive and fighting each other (Farmers vs. Techies). They have 3 different weapons for now: fists, single shot pistol and revolver. They can also melee attack with pistols!

NPCs fighting

I also just started working on ‘Hint nodes’, which will have different geometric shapes. Those hint nodes will provide information about the world – safe spots, danger spots, sniper spots and so on.

basic gizmos

• 12
entries
• 0
• 96
views

#### Recent Entries

Latest Entry

I bought this little fella (http://www.wacom.com/en-br/products/pen-tablets/one-wacom-m) a while ago but i never found time to play around with it. This weekend was very hot so i was mostly home and i’ve drawn a background for the game, hope you dig it. Took me a few hours.

The post Backgrounds work appeared first on Fat Pug Studio.

• 7
entries
• 0
• 198
views

#### Recent Entries

Latest Entry

Hello hello!! It's me again with the week 8 development blog, this week we spent some time relocating our studio and discuss the future changes of the game.

Firstly, we have tried unit-count system which may not be the best resource management for our game, as unit-count may hinder and difficult to balance during progressing character level. On the other hand, we tried a new method of resource management which is a traditional "Mana Crystal" which you gain over-time and killing monsters.

This resource system will come with another feature "Light Source building", which players will only be able to build within the Light Source area. Our team thinks this system will increase the depth of gameplay and challenges player to solve it with their solution. These Light Source Building will also generate "mana crystal" and there will be mana crystal boosting upgrades.

We are building a prototype for this system, and if it is fun, we will implement into our next patch!

• 11
entries
• 4
• 8125
views

#### Recent Entries

Latest Entry

New video of this last week. Featuring progress on two games and also showing another one.

The video is really cool ( i think ), i'm doing better the videos each week.

Enjoy it :

If you know some videos about weekly devlogs please tell me about, i know only about the indie called thinmatrix, his videos are great.

• 7
entries
• 1
comment
• 2646
views

#### Recent Entries

Latest Entry

I've finally hit a new milestone. Farkle Friends is finally ready for some closed alpha testing. I'm finally getting close enough to releasing this game I can now taste it. I haven't posted recently as I have been working feverishly over the last few weeks to get to this point.

Alpha testing will start in the next day or 2. Unless there is a major issue I plan about 2 weeks of alpha testing to work the kinks out. I'll make sure its working good on all the platforms I plan to support. Android, Windows, Mac OS, and Linux. Once all the initial play testing is done, and I have worked out any bugs found, I will then be moving on to some open beta testing.

For the beta testing I plan on using GamingBetas and/or AlphaBetaGamer. During the alpa testing I plan to investigate these two sites and will choose one or both to help out with some beta testing. I will have another blog later letting you know my choice and how, if possible, you can join to help with the testing. I'm planning another 2 weeks, baring any major issues, for this step. Then I will start preparing for release.

So if all the testing goes well, and there are no major issues I'm planning to release in about 4 weeks. For sure I will be releasing to the Google Play store. I have a list of other sites to host the PC/Mac/Linux version of the app as well. Here is a list of release site I'm considering. If anyone has any experience with these I'd love to hear about it. I will be investigating them and deciding over the next few weeks. I plan on releasing to Google Play store plus 2-4 others.

1. gamejolt.com
2. itch.io
3. indiegamestand.com
4. Steam
5. indiedb.com
6. gog.com

I'm really excited to be at this point and looking forward to releasing this to the world. I already have ideas for more games and for future updates to Farkle Friends.

Happy Gaming

• 41
entries
• 137
• 49977
views

#### Recent Entries

Latest Entry

Hey everyone - long time no post. Sorry about that. I landed my dream job over a year ago and have been pretty busy since then. I'm working at Harebrained Schemes on the new turn-based Battletech game. The last one was over 20 years ago! Come check it out at:
http://battletechgame.com/

Today I'm going to talk a little bit about a metadata database (That's really fun to say btw) and how you might use it in your projects.

## What is a metadata database?

Let's start with a couple of definitions. Metadata is just data about other data. And a database is just a structured way of storing and accessing data. So... a metadata database is a structured way of storing and accessing data about other data... Is your mind blown yet?

## Why use a metadata database?

I'm going to look at our units for this example. We have a bunch of units with lots of data stored in separate files. Our unit metadata contains things like the filename, the type of unit: mech, vehicle, turret - and tags that describe the kind of unit that it is: medium, sniper, jump_capable. Instead of hard coding our unit spawn points to a specific unit, we configure the spawn point to ask for a unit with the tags "mech" and "medium" to change things up a bit. Without a metadata database, we'd have to load up every single unitdef into memory, and then loop through all of the data to build a list of the units that match, then select a random entry. With a MDDB, we can write a query that returns the list of units that qualify without having to load every single file and load the unit that we need to spawn.

Also, once you put this type of data in a database, you can start writing sql queries to easily get at information. How many maps implement a particular encounter? How many contracts are written for the Escort contract type. Are there any events that can't be triggered because they rely on tags that are never awarded.

## Some Library Options

We're using C# and Unity for our project, and these are the main tools we're using for our SQL needs.

## Some TagSet Query Code

Here's some C# I wrote that builds a dynamic bit of sql based on the number of required tags and excluded tags. It wasn't trivial so I figured I'd share it. One requirement I'm not completely happy with is that the tags you ask for have to be in the database. At the start of the function I insert the ones that weren't present. It made the sql a little bit cleaner to look at and get right.  For our needs it's not a big deal because we'll only be asking for tags that we care about, but if an end user is typing in random stuff you'll want a slightly different approach.

Also I made one change to the Schema since after the graphic was made. I dropped the TagID and just use Name as the primary key. TagSetTag then drops its TagID column and gets a TagName column to point to Tag. I recommend that datamodel instead of the one shown, but our fans made the graphic for the data model and I didn't have a way of updating it easily. The code presented matches the old way.

public static List<TagSet_MDD> GetTagSetWithRequiredTags(this MetadataDatabase mdd, TagSetType tagSetType, TagSet requiredTags, TagSet excludedTags)
{
// Get the tag rows for the specified tags so we can get their database ids.
List<Tag_MDD> requiredTagRows = GetOrCreateTagsInTagSet(mdd, requiredTags);
List<Tag_MDD> excludedTagRows = GetOrCreateTagsInTagSet(mdd, excludedTags);

// Here's what the query will look like for 2 requried tags and 1 excluded tag
/*
select
ts.*
from TagSet as ts
-- Required Tags
inner join TagSetTag as tst0
on ts.TagSetID = rtst0.TagSetID
inner join TagSetTag as tst1
on ts.TagSetID = rtst1.TagSetID
-- Excluded tags
left join TagSetTag as etst0
on ts.TagSetID = etst0.TagSetID
and etst0.TagID='tag id 3'
where
rtst0.TagID = 'tag id 1'
and rtst1.TagID = 'tag id 2'
and etst0.TagID is null
*/

string queryText = "SELECT ts.* FROM TagSet ts ";
string joinText = string.Empty;
string whereClause = string.Format("WHERE ts.TagSetTypeId = {0} ", (int)tagSetType);

// Join to one instance of TagSetTag for each required tag.
for (int i = 0; i < requiredTagRows.Count; ++i)
{
joinText += string.Format(GTSWRT_RequiredInnerJoinFormat, i);
whereClause += string.Format(GTSWRT_RequiredWhereClauseFormat, i, requiredTagRows[i].TagID);
}

// Join to one instance of TagSetTag for each excluded tag
for (int i = 0; i < excludedTagRows.Count; ++i)
{
joinText += string.Format(GTSWRT_ExcludedLeftJoinFormat, i, excludedTagRows[i].TagID);
whereClause += string.Format(GTSWRT_ExcludedWhereClauseFormat, i);
}

// Assemble the query text and return the results.
queryText = queryText + joinText + whereClause;

List<TagSet_MDD> tagSetList = mdd.Query<TagSet_MDD>(queryText).ToList();

return tagSetList;
}
• 2
entries
• 1
comment
• 107
views

#### Recent Entries

Latest Entry

It's the weekend, so that means I get to share all I worked on last week in another edition of the Developer Diary Digest!

# EVENT & HOLIDAY SYSTEM

It seems like I've been putting off a holiday / event system for at least the last 6 months. It's one of the systems I've been most anticipating, but it relied on too many other moving pieces to work on...well, until now!

At the dawn of each day, the game now checks if there's an event scheduled, and if so it fires off any scripts related to it. It's pretty robust, and the scripts can do things like create holiday-specific visitors, add new music or decorations, change dialog, and a lot more.

As I wrapped it up, I realized that I needed a way to inform the player about upcoming events and what they were all about. This naturally lead into the next thing I worked on...

# A POSTAL SERVICE

You can now receive letters from villagers, visitors, and other friendly monsters in the game. The goal is to integrate the mail system into as many other parts of the game as I can. For example, you'll get a flyer the day before each holiday that explains it:

Letters you receive from villagers will reflect their personalities as well as their disposition toward you. Most will be helpful or friendly, but others, like Taswell,

probably won't be at first.

As I said above, I want mail to be integrated into as many other systems as I can. As I was browsing my list of features I got to "The ability to submit feedback from in-game" when I suddenly had an idea...

# SENDING FEEDBACK VIA IN-GAME POSTAL SERVICE

...wouldn't it be cool if you could write letters to the developer from inside the game itself?

Now obviously there's a lot of things to consider here - security, spam protection, etc. - but the idea is so cool to me that I'll do whatever it takes to make it work.

It's hard enough to encourage users to submit feedback, so providing something in-game that's also contextualized via a system they're going to be using every day can only help!

# BIRD SONG

Finally, I'll end this week sharing a new 'flavor' feature.

If you've played any of the demos you've likely seen birds flying about every so often. But unlike real life, they've been totally silent.

Well not anymore! Birds that fly overhead will now chirp and caw and sing. I obviously can't record sounds via gifs, so I tried my best to provide an alternative:

Well that'll do it for this week. Enjoy your weekend, y'all!

• 85
entries
• 56
• 27856
views

#### Recent Entries

Latest Entry

In this daily blog (and video)-series I take a first impressions look at the best mobile games that I come by. Be sure to share your favorite mobile game with the rest of us in the comments below!

Race Kings is the first racing game I have enjoyed playing in quite a while! It is a racing game based around drifting, in which you bet in-game cash to battle an opponent player (live), and whoever wins, gets the cash.

There's plenty of cars, the graphics are awesome, several events and fresh maps, and no stamina system. But! A part of whoever wins a battle depends on who has the most "Edge", which is a speed bonus added whenever you upgrade parts of your car. Edge resets every 30 minutes, meaning that you're forced to keep upgrading your car to keep winning. Upgrading your car, however, costs cash, which you conveniently can buy for real life money.

So where does the game land? In my opinion, the game is still worth checking out, as the gameplay is rather unique and had me sitting on the edge of my seat while playing.

My thoughts on Race Kings:

Subscribe on YouTube for more commentaries: https://goo.gl/xKhGjh
Or Instagram: https://www.instagram.com/nimblethoryt/

• 5
entries
• 0
• 200
views

#### Recent Entries

Latest Entry

I made a lot of progress in the past week. Waypoints, acts, and Quests – three of the features I wasn’t sure how to implement into Project Peril, resulting in much procrastination. I finally took the time to sit down and think through how these systems will be implemented neatly while keeping it easy to create acts, quests, and waypoints via script or internal tools. I’m quite happy with the result, and it took me just a few minutes to whip up a an act with a few waypoints and a quest that requires new heroes to kill a monster standing at the gate before being granted access to the town of Act 1.

I’m also rewriting how inventories are managed on the client.  The way the inventory system was previously coded made it really hard to display stashes, trade screens, and NPC screens because it was kinda hard-coded to support only the player’s inventory.  As soon as this feature is complete I will begin working on trading and NPCs who sell items.  Something to look forward to next week, I suppose.

• 14
entries
• 0
• 476
views

#### Recent Entries

Latest Entry

We just started 3D modeling the #ColoredWoman from the book introduction to Game | Book Charly Men's BIZARRE.
Simultaneously, we create the main-character in 3D, and we are also in the process of furnishing the first game location, Clearwaters appartment, in 3D as well.

The colored woman is going to dance in our next video that is planned to be published after summer.

She is a vision of main-character of the game, Charly Clearwater, who will therefore start to write his novel Exzess. We recreate this book scene as a sequence in the game.

Common girl! Dance for me!

• 20
entries
• 176
• 20194
views

#### Recent Entries

Latest Entry

We're approaching the time when reputation for all members will be re-indexed.

As has previously been described, in our previous system reputation had a fuzzy definition. While a member could earn reputation through the usual up/downvotes, a member's activity could also generate reputation. For example, logging in on a daily basis would give you +1 reputation each login. Posting a blog, voting in the screenshot showdown, or posting an article would also generate reputation (at times +100!).

But activity is not representative of how others in the community gauge your helpfulness, knowledge, or general contribution. In addition, the previous system does not match the new system where your reputation is only representative of your up/downvotes, which means the reputation still is not a representative value.

To correct this, we will re-index the reputation for all members and remove all reputation points not earned through up/downvotes. Meaning, your reputation value will no longer include your site activity points, but it will include all of the up/downvotes you've received.

A lot of members have a lot of reputation points, and in most cases the re-index will result in a severe drop in reputation value.

So what about those reputation points based on activity? They have to be worth something, right?

They are. All the activity reputation points will be converted into Pixels. We're finalizing how those points will be converted, but the current plan is for the conversion to align the activity with the Pixel awards in the new system. Site note: If you haven't figured it out yet, you earn Pixels through activity on the site. More activity through contributions to the community = more Pixels.

We'll go into more about Pixels later. For now, I wanted to communicate this upcoming change and give the community an opportunity to provide feedback or ask questions.

• 11
entries
• 6
• 4410
views

#### Recent Entries

Latest Entry

Hey guys and gals!

Its been an very busy week, and it will continue to be so for the next months. Alot of things has been taken care of regarding animations, music, models and so forth and its very exciting to get things in order, so production can go smoothly and efficiently. Also, from now on the updates will come monthly (unless there is something extremely important to get out).

So here is some screens for you to enjoy and dream about for about a month until the next update.

Concept art of the cook, he has a pretty cool narrative story and its going to be cool to get your feedback on that in the full version of the game, he will not show up in the vertical slice.

Textured fiddel character in some variations. He is looking great, this is actually one of my favorite part for you to experience ingame.

Game ready version of the whale, he is a lean mean killing machine. Old Grumpy. He has been hunted before but always managed to escape, he has years of experience. (Unity render)

So this is it from the art side, cant show you everything so will be little drops here and there. When we have a trailer ready it will show only in game gameplay. Its going to be super cool, I can promise you that!

See you again in august!

• 68
entries
• 294
• 117728
views

#### Recent Entries

Latest Entry

Below is my preliminary draft design for the AI system within Spellbound. I'm slowly migrating away from scripted expert systems towards a more dynamic and fluid AI system based on machine learning and neural networks. I may be crazy to attempt this, but I find this topic fascinating. I ended up having a mild existential crisis as a result of this. Let me know what you think or if I'm missing something.

# Artificial Intelligence:

Objectives:
Spellbound is going to be a large open world with many different types of characters, each with different motives and behaviors. We want this open world to feel alive, as if the characters within the world are inhabitants. If we went with pre-scripted behavioral patterns, the characters would be unable to learn and adapt to changes in their environment. It would also be very labor intensive to write specific AI routines for each character. Ideally, we just give every character a self-adapting brain and let them loose to figure out the rest for themselves.

Core Premise: (very dense, take a minute to soak this in)
Intelligence is not a fixed intrinsic property of creatures. Intelligence is an emergent property which results directly from the neural topology of a biological brain. True sentience can be created if the neural topology of an intelligent being is replicated with data structures and the correct intelligence model. If intelligence is an emergent property, and emergent properties are simple rule sets working together, then creating intelligence is a matter of discovering the simple rule sets.

Design:
Each character has its own individual Artificial Neural Network (ANN). This is a weighted graph which uses reinforcement learning. Throughout the character's lifespan, the graph will become more weighted towards rewarding actions and away from displeasurable ones. Any time an action causes a displeasure to go away or brings a pleasure, that neural pathway will be reinforced. If a neural pathway has not been used in a long time, we reduce its weight. Over time, the creature will learn.

A SIMPLE ANN is just a single cluster of connected neurons. Each neuron is a “node” which is connected to nearby neurons. Each neuron receives inputs and generates outputs. The neural outputs always fire and activate a connected neuron. When a neuron receives enough inputs, it itself fires and activates downstream neurons. So, a SIMPLE ANN receives input and generates outputs which are a reaction to the inputs. At the end of neural cycle, we have to give response feedback to the ANN. If the neural response was positive, we strengthen the neural pathway by increasing the neural connection weights. If the response was negative, we decrease the weights of the pathway. With enough trial runs, we will find the neural pathway for the given inputs which creates the most positive outcome.

The SIMPLE ANN can be considered a single cluster. It can be abstracted into a single node for the purposes of creating a higher layer of connected node networks. When we have multiple source inputs feeding into our neural network cluster and each node is running its most optimal neural pathway depending on the input, we get complex unscripted behavior. A brain is just a very large collection of layered neural nodes connected to each other. We’ll call this our “Artificial Brain” (AB)

Motivation, motivators (rule sets):
-All creatures have a “desired state” they want to achieve and maintain. Think about food. When you have eaten and are full, your state is at an optimally desired state. When time passes, you become increasingly hungry. Being just a teensy bit hungry may not be enough to compel you to change your current behavior, but as time goes on and your hunger increases, your motivation to eat increases until it supersedes the motives for all other actions. We can create a few very simple rules to create complex, emergent behavior.
Rule 1: Every creature has a desired state they are trying to achieve and maintain. Some desired states may be unachievable (ie, infinite wealth)
Rule 2: States are changed by performing actions. Actions may change one or more states at once (one to many relationship).
Rule 3: “Motive” is created by a delta between current state (CS) and desired state (DS). The greater the delta between CS and DS, the more powerful the motive is. (Is this a linear graph or an exponential graph?)
Rule 4: “relief” is the sum of all deltas between CS and DS provided by an action.
Rule 5: A creature can have multiple competing motives. The creature will choose the action which provides the greatest amount of relief.
Rule 6: Some actions are a means to an end and can be chained together (action chains). If you’re hungry and the food is 50 feet away from you, you can’t just start eating. You first must move to the food to get within interaction radius, then eat it.

Q: How do we create an action chain?
Q: How do we know that the action chain will result in relief?
A: We generally know what desired result we want, so we work backwards. What action causes desired result (DR)? Action G does (learned from experience). How do we perform Action G? We have to perform Action D, which causes Action G. How do we cause Action D? We perform Action A, which causes Action D. Therefore, G<-D<-A; So we should do A->D->G->DR. Back propagation may be the contemporary approach to changing graph weights, but it's backwards.
Q: How does long term planning work?
Q: What is a conceptual idea? How can it be represented?
A: A conceptual idea is a set of nodes which is abstracted to become a single node?

Motivators: (Why we do the things we do)
Hunger
Body Temperature
Wealth
Knowledge
Power
Social Validation
Sex
Love/Compassion
Anger/Hatred
Pain Relief
Fear
Virtues, Vices & Ethics
Notice that all of these motivators are actually psychological motivators. That means they happen in the head of the agent rather than being a physical motivator. You can be physically hungry, but psychologically, you can ignore the pains of hunger. The psychological thresholds would be different per agent. Therefore, all of these motivators belong in the “brain” of the character rather than all being attributes of an agents physical body. Hunger and body temperature would be physical attributes, but they would also be “psychological tolerances”.

Psychological Tolerances:

{motivator} => 0 [------------|-----------o----|----] 100
A            B           C    D    E`

A - This is the lowest possible bound for the motivator.
B - This is the lower threshold point for the motivator. If the current state falls below this value, the desired state begins to affect actions.
C - This is the current state of the motivator.
D - This is the upper threshold point for the motivator. If the current state exceeds this value, the desired state begins to affect actions.
E - This is the highest bounds for the motivator.

The A & E bounds values are fixed and universal.
The B and D threshold values vary by creature. Where you place them can make huge differences in behavior.

Psychological Profiles:
We can assign a class of creatures a list of psychological tolerances and assign their current state to some preset values. The behavioral decisions and subsequent actions will be driven by the psychological profile based upon the actions which create the sum of most psychological relief. The psychological profile will be the inputs into an artificial neural network, and the outputs will be the range of actions which can be performed by the agent. Ideally, the psychological profile state will drive the ANN, which drives actions, which changes the state of the psychological profile, which creates a feedback loop of reinforcement learning.

Final Result:
We do not program scripted behaviors, we assign psychological profiles and lists of actions. Characters will have psychological states which drive their behavioral patterns. Simply by tweaking the psychological desires of a creature, we can create emergent behavior resembling intelligence. A zombie would always be hungry, feasting on flesh would provide temporary relief. A goblin would have a strong compulsion for wealth, so they'd be very motivated to perform actions which ultimately result in gold. Rather than spending lots of time writing expert systems styled AI, we create a machine learning type of AI.

Challenges:
I have never created a working artificial neural network type of AI.

Experimental research and development:

The following notes are crazy talk which may or may not be feasible. They may need more investigation to measure their merit as viable approaches to AI.

Learning by Observation:
Our intelligent character doesn’t necessarily have to perform an action themselves to learn about its consequences (reward vs regret). If they watch another character perform an action and receive a reward, the intelligent character creates a connection between an action and consequence.

Exploration Learning:
A very important component to getting an simple ANN to work most efficiently is to get the neurons to find and establish new connections with other neurons. If we have a neural connection topology which always results in a negative response, we’ll want to generate a new connection at random to a nearby neuron.

Exploration Scheduling:
When all other paths are terrible, the new path becomes better and we “try it out” because there’s nothing better. If the new pathway happens to result in a positive outcome, suddenly it gets much stronger. This is how our simple ANN discovers new unscripted behaviors.

The danger is that we will have a sub-optimal behavior pattern which generates some results, but they’re not the best results. We’d use the same neural pathway over and over again because it is a well travelled path.

Exploration Rewards:
In order to encourage exploring different untravelled paths, we gradually increase the “novelty” reward value for taking that pathway. If traveling this pathway results in a large reward, the pathway is highly rewarded and may become the most travelled path.

Dynamic Deep Learning:
On occasion, we’ll also want to create new neurons at random and connect them to at least one other nearby downstream neuron. If a neuron is not connected to any other neurons, it becomes an “island” and must die. When we follow a neural pathway, we are looking at two costs: The connection weight and the path weight. We always choose the shortest path with the least weight. Rarely used pathways will have their weight decrease over a long period of time. If a path weight reaches zero, we break the connection and our brain “forgets” the neural connection.

Evolutionary & Inherited Learning:
It takes a lot of effort for a neural pathway to become developed. We will want to speed up the development. If a child is born to two parents, those parents will rapidly increase the neural pathways of the child by sharing their own pathways. This is one way to "teach". Thus, children will think very much like their parents do. Other characters will also share their knowledge with other characters. In order for knowledge to spread, it must be interesting enough to be spread. So, a character will generally share the most interesting knowledge they have.

Network Training & Evolutionary Inheritance:
An untrained ANN results in an uninteresting character. So, we have to have at least a trained base preset for a brain. This is consistent with biological brains because our brains have been pre-configured through evolutionary processes and come pre-wired with certain regions of the brain being universally responsible for processing certain input types. The training method will be rudimentary at first, to get something at least passable, and it can be done as a part of the development process.
When we release the game to the public, the creatures are still going to be training. The creatures which had the most “success” will become a part of the next generation. These brain configurations can be stored on a central database somewhere in the cloud. When a player begins a new game, we download the most recent generation of brain configurations. Each newly instanced character may have a chance to have a random mutation. When the game completes, if there were any particular brains which were more successful than the current strain, we select it for “breeding” with other successful strains so that the next generation is an amalgamation of the most successful previous generations. We’ll probably begin to see some divergence and brain species over time?

Predisposition towards Behavior Patterns via bias:
Characters will also have slight predispositions which are assigned at birth. 50% of their predisposition is innate to their creature class. 25% is genetically passed down by parents. 25% is randomly chosen. A predisposition causes some pleasures and displeasures to be more or less intense. This will skew the weightings of a developing ANN a bit more heavily to favor particular actions. This is what will create a variety in interests between characters, and will ultimately lead to a variety in personalities. We can create very different behavior patterns in our AB’s by tweaking the amount of pleasure and displeasure various outputs generate for our creature. The brain of a goblin could derive much more pleasure from getting gold, so it will have strong neural pathways which result in getting gold.

AI will be able to interact with interactable objects. An interactable object has a list of ways it can be interacted with. Interactable objects can be used to interact with other interactable objects. Characters are considered to be interactable objects. The AI has a sense of ownership for various objects. When it loses an object, it is a displeasurable feeling. When they gain an object, it is a pleasurable feeling. Stealing from an AI will cause it to be unhappy and it will learn about theft and begin trying to avoid it. Giving a gift to an AI makes it very happy. Trading one object for another will transfer ownership of objects. There is no "intrinsic value" to an object. The value of an object is based on how much the AI wants it compared to how much it wants the other object in question.

Learning through Socialization:
AI's will socialize with each other. This is the primary mechanism for knowledge transfer. They will generally tell each other about recent events or interests, choosing to talk about the most interesting events first. If an AI doesn't find a conversation very interesting, they will stop the conversation and leave (terminating condition). If a threat is nearby, the AI will be very interested in it and will share with nearby AI. If a player has hurt or killed a townsfolk, all of the nearby townsfolk will be very upset and may attack the player on sight. If enough players attack the townsfolk, the townsfolk AI will start to associate all players with negative feelings and may attack a player on sight even if they didn't do anything to aggravate the townsfolk AI.

• 3
entries
• 1
comment
• 919
views

#### Recent Entries

Latest Entry

Hero Toon Tower Defense It is a tower game, but it is not the typical tower defense, where buildings are built along a path.

In this game you have to build a village first, then you have to add your system of defenses like walls, towers of arrows and towers of fire.

And like any strategy game, you have to build barracks to recruit troops. These units serve to defend the town from the attacks of enemy hordes.

The game has a level that develops inside the underworld in dungeons, where the mission is to rescue the princesses of the evil elves.

The game was developed in Unity 5.4 and use purchased characters in unity asstes store.

• 1
entry
• 0
• 78
views

#### Recent Entries

Latest Entry

Before we start our development blogs, we want to share our insight about us and the game.

What is Alchemica?

Alchemica is a game being worked on by a development team consisting of two people for several years.

It is a free RPG game for Android with some unique takes. Players take the role as Charlotte, a young alchemist striving to become a successful merchant.

During the course of the game, she can use materials taken from the world to craft various potions and bombs. These items can then be used for battles. The main idea is that she doesn't use conventional weapons, instead relying on her own expertise in crafting items to defeat monsters and gain loots in the form of more materials from them, thus repeating the cycle.

Charlotte also owns a store, the one she wants to build reputation on. She can directly sell loots taken from dungeons for gold, or use the time to craft better items as they are worth more. Visitors will come to her store, and she must haggle with them to win her hard-earned gold coins.

What does Alchemica looks like?

As a die-hard fans of classic JRPGs, Alchemica is entirely made with hand drawn pixel-art to emulate that retro look that we hold dear. Battles are drawn out in that classic turn-based style, while dungeons are randomly generated.

Hare are some screenshots of the game for people who are curious.

Where can I try Alchemica?