Xerra's Blog

Drunken coder ramblings

Mancala & stepping back in time. —

Today was possibly the most productive day I’ve had programming in possibly as much as a year. If any of it is of practical benefit, apart from the pursuit of knowledge and keeping the mind sharp, I’d very much doubt, but I like to think that any time spent in front of the computer putting code together, working with development systems, and just generally plugging away at getting it right is always a good thing.

I’m not so sure that writing such long sentences is also productive, from a creativity point-of-view, but I’m going to let it go because I hate editing stuff I write when it’s a blog post, as I believe it’s meant to be straight to the point and puts your current mood across.

Initially I started the morning with an idea of getting Parallels up and running again so I could tinker some more with Visual studio 2015 on the PC and work further through my book on C# to try out at least some of the code in there. I don’t want to get too specific and work through the entire thing generating windows applications and the like but just a general feel for the syntax of C# when putting it into Unity scripts. This way it would be how to do something with Unity rather than how to get the code right and then fudge it into Unity each time I did anything more than the stuff Unity can do for you.

I’ve mumbled to pretty much anyone who’s ever been interested enough in game development – and asked me about it – my reservations of using bloated game engines or frameworks for simple games because I am not a fan at all. At present the idea of Aaron and I using Unity to recreate Paradroid is almost insulting. It feels like almost cheating in some ways with the tools we have at our disposal compared to Andrew Braybrook just having a buggy assembler and a basic debug monitor. But also it’s a burden as there’s so much you need to know just to do sometimes really basic stuff that you’ve done in other dev systems in seconds without even thinking about it.

Maybe I’m just set in my ways whereas my partner in development is a lot more open to chopping and changing technology as and when the need arrives. We’re approaching Paradroid as just an example to learn Unity in greater depth than our silly Mario projects we both created working from a book to try it out.

I’m very averse to using a 3d engine to create a top/down 2d game but aware that Unity does cater for that and it’s supposed to not be too difficult to do, even though logic screams at me to use something more 2d environment friendly for a project like this. But Unity is used by a lot of people for a lot of games now, and a lot of people thus consider it to be the way forward so you should just use it for everything. The more games you write with it then the better you’re going to get, even if it does mean they’re going to be bloated games with code in them you will never even see, let alone edit.

For me there’s a loss of control there which doesn’t appeal to me too much. But I’m digressing from what I’ve actually been up to – which is the point of this blog – so back on topic.

My idea is to create something relatively simple in gameplay and hopefully coding to work with C# and get to know the language. I wanted to use the Visual Studio on the PC environment on my Mac to do this as games need a window to run in and I want that side of things taken care of for me at this stage so i can just concentrate on the basic syntax stuff and progress up from there. I googled around for a while and finally came up with the idea I wanted to use which was Mancula.

Mancula is the African number one board game of choice apparently, and has been around for many, many years. I first came across it on my Nokia 3310 mobile phone back in 2001, where it was called Bantumi, and used to play it a lot on train journeys to and from work. I’d had an idea to develop a clone of it with Blitzmax after I finished writing the Rock/Paper/Scissors game I was doing at the time. I did finish that game but then moved onto Gravity Force before jumping over to Swift so I never got much further than a few notes back then.

So the basic idea of the game is sound and I could approach it as just being a 2 player game or maybe get clever and put a simple AI in there which, based on how the game works, shouldn’t be too tricky in code. I googled around for a while and found a web version to play for a bit just to remind myself of the rule set so it’s time for a couple of images to look at so you all know what I’m talking about.

If you look at that then you can instantly get the basic idea of the layout.

Here’s the basic rule set from my notes I jotted down as i played a few games. Just for the record I got murdered four games in a row until I got the gist again and then pulled a couple of games back. I was playing on the easy AI level as well. This is a very clever strategy game, for such a simple implementation, so I was more than keen to have a crack at it.

Starting from scratch with this as a C# project is a bit daunting for me, being completely new to it, so I then considered the idea of putting the game together with a language I do know and then approaching it as a conversion from ready-written code. This possibly isn’t that logical to some, as I will be essentially writing the same game twice, but this doesn’t really worry me as it’s all still banging out the code. And I feel I’ve been very lacking with that recently since we started looking at Unity.

My most productive coding was during my days of owning a PC and using BlitzMax along with Blide as a development environment. This was the system I used literally just before Aaron and I got together to form Dexterity Design and I was so comfortable with it by then that I knocked out Gravity Force in 30 days using my half-cocked framework to build it from. GF isn’t a great game but any game I write from start to finish I’ve always been proud of.

As I’m using parallels now for Visual studio, testing out Game Studio 2 – as there’s no Mac version yet, and ProgEd for C64 retro coding fun, it was no great hassle to get Blide back on the machine and start the new project from there. As I suspected the old framework is an absolute mess of a project but I can still use some of it to build from to save time so I did. Screenshot below of Mancala running from the framework and also the development environment of Blide with all the source files that will become the game once I’m done.

Don’t expect to see much in the screenshot of Mancala itself. That’s the frameworks code running only. Most of the code I’ve already written to support the game isn’t to do with the actual display side so that will be in the next post. I’ve got basic public domain images for the game board and pegs but I’m not at the stage where they are going to be on screen as yet. The IDE screenshot is a lot more interesting as I’m currently using a few source files from my crap framework and I’ll probably approach the C# project the same way once I finish this and start on that.

Small steps and all that.

Considering I’m using Blitz again to do the first draft here I did have a look at NG again, in the hope that it’s a bit less kludgy with it’s Xcode projects and I could work with that and put in IOS conditional code so I had the option to dump the game onto the phone again for the memories. Unfortunately, despite lots of hacking around, rebuilding modules, creating new builds of the binaries from git hub and hours of time hacking about with other stuff, I still can’t even build the project I used to build to IOS with a year ago now. It feels almost like stepping backwards with that now, which is a shame as I don’t even have any original builds of other games I used it to convert to the phone now. I’ll have to email Brucey and see if we can bang heads together and get me going again.

 


Categorised as: Blitz | C# | Development | Mancala



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.