Is there a Farm / City - Sim type tutorial out there?

Hi;

I was wondering if there is a farm/city-sim type tutorial out there for Corona that I could look at? Where you can build buildings and come back after a certain amount of time and they are done, harvest resources, visit other player’s farms/cities and the like?

Cheers!

Im looking for something like this aswell but i dont think ill find one, guess one of us will be the first to make something like that in corona. Give me 12 weeks.

Yeah I haven’t seen anything like this yet.

Corona is awesome and so far I haven’t come across anything it can’t do… so, I’m sure it won’t be *that* hard to figure out. :slight_smile:

Let me know how you make out 86lemonade68.

Cheers!

Well, it is basically a tile map with ‘intelligent’ tiles. The hard bit with anything like this is getting the model of your farm/town/whatever correct.

tbh, initially I would forget about everything other than lua and work on the model - use a simple text representation or something very quick and dirty - perhaps a tile which rather than representing a piece of grass, have it show as a little bar graph showing the state of that tile - that way you can visually see how the game progresses - once you have this working it is not too difficult to graft a display and interface onto it.

But the effort should go into the simulation. I plan to write a Cricket game (English sport if you didn’t know) and the problem with, well, all of them is the core model of the game is not play tested to destruction so it ‘feels right’. If you are creating a farm sim (say) and the simulation part is not good the game will be rubbish no matter how pretty it looks.

L8R: I wrote a tutorial on Model-View-Presenter (see coronadev.blogspot.co.uk, April posts) - this is a classic example of when this separation of model (what you are actually representing) and view (what it looks like on the screen) is a really good idea. 

@paulscottrobson

Yes that was the approach I would plan on taking. Write the model first - make sure it works then make it look good.

It’s basically tracking time and when it reaches a certain time the “upgrade” or “collect” is ready / done, shows a status msg or new image or whatever, updates the player stats and moves on.

I will check out the tutorial you mentioned.

Cheers!

PS> Cricket is interesting. I haven’t watched it much but when I do I enjoy it.

What I found is that with this sort of thing, you will spend a lot of time tweaking it. It is worth having a pile of ‘sliders’ in there that scale things like ‘growth’ whatever, so you can tinker with them. It is a bit challenging :slight_smile: but it is worth it because the end game is playable. 

I sold quite a lot of the first one I ever released (shareware at £5/time) and then main reason was not that it looked pretty, but that when you played it it actually felt like the real thing as far as possible rather than being an arcade-type simulation.

Yes sliders are a good idea, I use a text label (e.g… building is 88% ready) or something along those lines.

Was that written in LUA? I would love to take a look at it.

Just reading your tutorial on Model-View-Presenter - very good stuff.

Cheers!

I like  (known as the “Tyra Banks design pattern” …). :wink:

​Part 6 and 7 really outline the benefit of this Programming Model - changes in code are sometimes infectious and have a ripple effect. I like the idea of changing the view without having to change the core logic etc.

Great job. Cheers!

Thanks. :smiley:

Doing something similar in spare time - I would seriously encourage the use of a data-driven approach using JSON files, this makes tweaking values (very important to get the simulation feeling right) much easier then if you’ve hard-coded it…

@SegaBoy

Yeah data-driven I agree is the way to go. That way adjustments can be “on the fly” sort of thing.

Cheers!

Im looking for something like this aswell but i dont think ill find one, guess one of us will be the first to make something like that in corona. Give me 12 weeks.

Yeah I haven’t seen anything like this yet.

Corona is awesome and so far I haven’t come across anything it can’t do… so, I’m sure it won’t be *that* hard to figure out. :slight_smile:

Let me know how you make out 86lemonade68.

Cheers!

Well, it is basically a tile map with ‘intelligent’ tiles. The hard bit with anything like this is getting the model of your farm/town/whatever correct.

tbh, initially I would forget about everything other than lua and work on the model - use a simple text representation or something very quick and dirty - perhaps a tile which rather than representing a piece of grass, have it show as a little bar graph showing the state of that tile - that way you can visually see how the game progresses - once you have this working it is not too difficult to graft a display and interface onto it.

But the effort should go into the simulation. I plan to write a Cricket game (English sport if you didn’t know) and the problem with, well, all of them is the core model of the game is not play tested to destruction so it ‘feels right’. If you are creating a farm sim (say) and the simulation part is not good the game will be rubbish no matter how pretty it looks.

L8R: I wrote a tutorial on Model-View-Presenter (see coronadev.blogspot.co.uk, April posts) - this is a classic example of when this separation of model (what you are actually representing) and view (what it looks like on the screen) is a really good idea. 

@paulscottrobson

Yes that was the approach I would plan on taking. Write the model first - make sure it works then make it look good.

It’s basically tracking time and when it reaches a certain time the “upgrade” or “collect” is ready / done, shows a status msg or new image or whatever, updates the player stats and moves on.

I will check out the tutorial you mentioned.

Cheers!

PS> Cricket is interesting. I haven’t watched it much but when I do I enjoy it.

What I found is that with this sort of thing, you will spend a lot of time tweaking it. It is worth having a pile of ‘sliders’ in there that scale things like ‘growth’ whatever, so you can tinker with them. It is a bit challenging :slight_smile: but it is worth it because the end game is playable. 

I sold quite a lot of the first one I ever released (shareware at £5/time) and then main reason was not that it looked pretty, but that when you played it it actually felt like the real thing as far as possible rather than being an arcade-type simulation.

Yes sliders are a good idea, I use a text label (e.g… building is 88% ready) or something along those lines.

Was that written in LUA? I would love to take a look at it.

Just reading your tutorial on Model-View-Presenter - very good stuff.

Cheers!

I like  (known as the “Tyra Banks design pattern” …). :wink:

​Part 6 and 7 really outline the benefit of this Programming Model - changes in code are sometimes infectious and have a ripple effect. I like the idea of changing the view without having to change the core logic etc.

Great job. Cheers!

Thanks. :smiley:

Doing something similar in spare time - I would seriously encourage the use of a data-driven approach using JSON files, this makes tweaking values (very important to get the simulation feeling right) much easier then if you’ve hard-coded it…