Epidemy by JBS

Advice on general approaches or feasibility and discussions about game design

Epidemy by JBS

Postby JBS » Tue Jul 15, 2014 5:10 pm

Hi !
I created this topic to present you my game idea and ask for help to realize it. I want to create a GB version of a great iOS game, PATHOGEN, but as this is my first game, I have a lot of questions to ask to the skilled programmers around here.

First of all, this is a board game, turn by turn, in which the aim is to take as much space as possible. To do so, you'll have to capture the enemy's pawns while avoiding the contrary. The main mechanic here is the chain reaction. You'll have four types of pawns:

- the basic cell: you can use it at each turn, placing it on another basic cell creates a medium one.
- the medium cell: you'll get one every 4 turns, creating it will place basic cells on every adjacent cell (except in diagonal), and placing one on another will create a upgraded one.
- the upgraded cell: you'll get one every 8 turns, creating it will place medium cells on every adjacent cell (which will create basic cells), and placing one on another will create a wall.
- the wall: cannot be placed (other way than two upgraded cells), taken, destroyed, and will not place upgraded cells everywhere, it will just expand to every upgraded cell adjacent to the first one upgraded.

To take your opponent's pawns, you'll have to place a stronger cell on one of his, or upgrade an adjacent cell, doing so will propagate the upgrades because of the ability of the cells to place weaker ones around.

Finally, your can destroy cells using the virus. (It will only affect same connected cells)

Image
A gif to illustrate, you can see the differents types of cells on the left and right

Sorry for the large and messy explanations, but I needed it for you to understand the questions.

1- I want the screen to be gray, in order to keep black and white for players colors. I don't own a GameBuino, so i can't check, but do you think it's clear to see ? I mean, the pawns are small, will we see them ? I'm worried mostly for the white ones ...

2- The grid is 14x12. I was thinking in creating an object for each of the 168 spots, with data for color, type of cell, and drawing in consequence. Is it a good way of dealing with all those spots?

3- I saw that grey is generated by blinking black, and you guys used the frame rates to make it happen, but my aim is to make the game compute slowly so you can see each step of the upgrades (and not being a mess as the gif is). Can I do like
Code: Select all
if (gb.update)
//draw Black
if (gb.frameCount%2)
//draw Grey and White
if (gb.frameCount%20)
//compute


4- I was planning to code each spot with its coordinate, but then I need to check adjacent cells, so I was wondering, will the program understand (x+1;y), (x-1;y) (x;y+1) (x;y-1) if spots are defined as (4;4) (2;4) (3;5) and (3;3) ? (where (x;y) is the center point as (3;4))

Thank you for reading, my next posts will not be as long as this one :)
JBS
 
Posts: 4
Joined: Sat Jun 21, 2014 2:50 pm
Location: France

Re: Epidemy by JBS

Postby treflip » Tue Jul 15, 2014 5:57 pm

Hello JBS! I don't really know if I can answer your questions but I really like the game idea. I look forward to seeing it in action!

P.s. I wouldn't mind helping with the graphics though! ;)
treflip
 
Posts: 83
Joined: Fri May 30, 2014 4:50 pm
Location: Florida

Re: Epidemy by JBS

Postby DFX2KX » Wed Jul 16, 2014 8:13 pm

There's a framecount function that you can use to skip frames, and therefore slow down the actual 'ticks' used to count the progression of the gameplay. there are a few other clever things one can do as well. I like the basic gist of the game, though I've never played the IOS version
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: Epidemy by JBS

Postby rodot » Wed Jul 16, 2014 8:40 pm

Just my 2 cents:

1 - You can obtain gray by blinking black/white at 40 FPS. It works on some displays, you need the contrast to be finely tuned, varies depending on the viewing angle, and flickers. So... you might want to give it a try, but I personally don't believe in gray (just my personal opinion). I mean, you could get it to look nice on your Gamebuino, but not all screens will be able to display it. Maybe could you scale everything up to be able to draw different cells depending on the team (using only black and white) and use scrolling to navigate through the board ? I know, that's not ideal either, but it's more likely to work on every Gamebuino.

2 - For each cell you have to store its kind, a value between 0 and 4 (0 - inactive, 1 - basic, 2 - medium, 3 - upgraded, 4 - wall) which requires 3 bits (2^3 = 8 possible values) and the color between 0 (white) and 1 (black) which requires 1 bit (1^2 = 2 possible value). It sums to 4 bits per cell, which is perfect as it's a nibble. So you can store your 168 cells in an array of 168/2 = 84 bytes (or in an array of 168 bytes to make your program simpler). The sprite of each kind of cell is simply stored as a bitmap.

3 - yep you got it, use gb.frameCount with modulo to time your events.

4 - yep sure that would work. Do you want you world to be toroidal (to wrap around)?
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Epidemy by JBS

Postby JBS » Thu Jul 17, 2014 3:19 pm

Thanks for your feedbacks

@treflip Thank you but the art is all done, I'll keep the design I used on the gif ...

@rodot I will give it a try, because no grey means either reducing the board to fit custom cells (which would make the game so much easier) or a moving camera, which is far beyond my skills for now :lol:

By toroidal do you mean like without edge ? If you get on the eastern edge you end up on the west one ? If so the world shouldn't be as it could confuse players

Ok so now programming questions. I used Arduino for like a month but I realize I only scratched the surface: I used to program it like take the sensor value, map it, output it, display on a LCD ... And now I see all the games' programs on the forum and I'm like WTF was I doing ?

Arrays. I saw they are kind of lists where your put data in order to access or change it later. I was thinking in using two bi-dimensional ones (type and color) for the board grid and then I saw your post and I didn't understood: is it possible with a single array to store two data types and still be able to determine the cells adjacent to another (as each one will have an associated number between 0 and 167) ?


I took a peek at several games as I mentioned earlier and in Ripper121's Snake I saw
Code: Select all
typedef struct {}

What is exactly this doing ?
JBS
 
Posts: 4
Joined: Sat Jun 21, 2014 2:50 pm
Location: France

Re: Epidemy by JBS

Postby DFX2KX » Fri Jul 18, 2014 10:33 pm

JBS wrote:I took a peek at several games as I mentioned earlier and in Ripper121's Snake I saw
Code: Select all
typedef struct {}

What is exactly this doing ?


struct builds a custom datatype, you may pass it in or out of functions, and the like.

examples:
Code: Select all
typedef struct vector{
int x,
int y,
int z}
//then you can call it like
vector myvector = {1,5,3}


I do believe that's how it's used.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am


Return to Project Guidance & Game development

Who is online

Users browsing this forum: No registered users and 85 guests

cron