Creating a civiliation / civ5 - like game on codea ?

I’ve only started to code on codea this past month, and I was wondering if it were possible to create a game like civilization 5, reduced to the basics of course. If so, I was wondering if I could get some help on how/where to start. I’ve already started creating explorers and settlers but I wonder what could be the limit and where should I stop considering I’d like my project to be finished near end-february.

PS: I’m new to this forum so tell me if my discussion belongs to another category :slight_smile:

@Kostia - It’s impossible to answer that question because it depends on so many things, not least what you are capable of programming.

You are probably best advised to build it in layers, starting with the simplest skeleton of the game and building it up. But if you do this, and you aren’t used to programming, you are likely to get into a mess.

It generally isn’t a good idea to take on a big project when you are just beginning. It’s kind of like taking up running one week, and trying to run a marathon the next week. It’s better to start with very small projects and work up. Programming, even using Codea, is difficult.

@Kostia Look thru some of the examples. Those will give you an idea of what’s possible, but your programming skill are the most important.

Thank you everyone for your tips, and don’t worry @Ignatz I have an IT teacher that is here with me when I code sometimes to help me out and to advise me on how to make things cleanier, less messy etc.

It’s just that I was searching online and found that alot of civ5 stuff was done on Lua and I was wondering if it could be applicable on Codea since it runs on Lua.

Thanks for the input anyways, I’ll come back with some more tangible questions next time I suppose :tongue:

I’m sure it can be done, but maybe not by the end of February!

I’m not that delusional to think I could finish such a huge project in only a month don’t worry :mrgreen: I was only thinking of two-three things that I was wondering could be implentable (ie here, and explorer who wanders the terrain, a warrior who can battle the AI (also wondering if AI is possible and how hard it is in codea), a settler who can create a city in which you can choose to create one of those three characters)

Thank you ^-^

One last question, does codea have all the Lua functions ? Meaning I can paste a Lua code into my tablet’s codea app and it would work ?

You can pretty much use Lua code in most cases

But I think your limitation is going to be picking up Codea quickly enough to make something by end of Feb.

@Kostia one of the things you need to remember is that Lua is a scripting language, one that is designed to be integrated into other programs (usually written in C/C++) as a way of controlling aspects of those games.

For instance in Codea (and the other similar platforms), the app creator just created a library of graphical draw functions and exposed them as functions that the lua runtime can understand (ok, it’s an over simplified explanation but it suffices).

In games like Civ 5 (and World of Warcraft) it’s elements of the core game functionality that can get exposed, so those apps might offer things like path finding, data structures, storage, networking, communication, object hierarchies and all other sorts of integration that would be exposed and be callable within the context of the lua implementation in that app. A lot of this functionality will probably be written in a lower level language as it wouldn’t be efficient enough or practical to write them in Lua.

A lot of in game AI is written in Lua, simply because you can create “scripts” (hence the term scripting language) easily that responds to events and follow sequences and can make decisions based on data exposed from other parts of the app. There’s nothing in Lua that you couldn’t create in C/C++ it’s just that it’s often easier (and more importantly quicker) to be able to edit you Lua code whilst your app is running and see immediate results rather than having to wait 20 mins for a full build cycle to complete - it’s also used as a way to provide players with the ability to change / mod the game once it’s been released without having to give away the source code (do a google search on the dev diary and how they used Lua in the Legend of Grimrock -

If you want to create a complex sim like Civ you first need to start with a design and an idea of the functionality you want to provide, then look to see how that can be implemented in Codea’s version of Lua (and the functionality that Codea provides) - it’s possible to create pretty much anything in any language that provides the basic core concepts of sequence, selection and iteration and the core Lua language certainly provides all of that functionality. What you’ll find is that eventually your ideas / needs will exceed (Codea) Lua’s capabilities (in terms of memory and execution speed) and ability to replicate what you want in the desired frame rate / time.

As others have said - start simply, take baby steps, build on prior successes and take your time. Civ 5 wasn’t created in a day - it’s been 20 plus years in development (by very experienced dev’s learning as they went) you won’t recreate that any time soon.

But you can start and you can certainly progress and most importantly you can have fun doing it (and learn a lot to boot).

+1 @TechDojo

@TechDojo, a bit too long I give you a woot if shorter + 0.5 @techdoho

I’d love to create a civ-like game. However, after about 3 years of dabbling with code and creating prototypes, I’ve come to the conclusion that it would be best if I started with a much smaller, full-featured app.

Civ is a turn-based game, therefore it would be ideal to start creating a board game app for practice.

I’ve decided to start work on Checkers/Draughts. Now, as simple as Checkers might seem to you, it is a lot tougher to tackle in terms of coding. Trust me, I’m going through this process, and I’m no where near completing this project. However, each victory that comes with overcoming a bug, error or obstacle brings great joy to my heart, and is ultimately a stepping stone towards the path to success.

Take your time in learning to code and develop efficient algorithms. Try not to rush things, and start small so you can grow big.

@the_dude Couldn’t have said it better myself, +1 and good luck with the coding.

@TechDojo Thanks for the kind words, much appreciated.

@the_dude board/ card games are really interesting because they feel as if they ought to be simple, but they’re actually pretty complex to code. I remember writing a Connect 4 game and being surprised by how much more complex it was than I was expecting. Good practice though.

@yojimbo2000 Indeed. Besides implementing the rules in a board game, other features that may be added further increase complexity of the project. In my Checkers project, I wish to add board notation, and the ability to view older games played by the player(s).

I initially thought that going through this project wouldn’t take me more than a couple of months. At this point, it seems that it would take me at least a year. Let’s not forget about implementing AI opponents, each with different personalities/varying degrees of difficulty!

It definitely is good practice.

I guess it’s gonna be a long run then, since I want to make it turn based as well. I haven’t done much in terms of figuring how to make a turn based game but at least I made a board haha

@the_dude @yojimbo2000 I completely agree. Very good words there. Good luck with the game! Hope it works out!