[BETA] Artillery (Worms Like)

Advice on general approaches or feasibility and discussions about game design

[BETA] Artillery (Worms Like)

Postby frakasss » Thu Jun 11, 2015 1:47 pm

Hey,
Here my (not finished) project 'Artillery'.
Image

Still have to create IA and, for sure, fix a lot of bugs... and see if I can improve all my dirty code :D !

Here is the game:
https://github.com/Frakasss/Artillery

Enjoy and don't hesitate to give any (positive or negative, but always constructive) feedback!
Last edited by frakasss on Sun Jul 05, 2015 7:11 am, edited 1 time in total.
User avatar
frakasss
 
Posts: 97
Joined: Thu Dec 11, 2014 10:20 am
Location: France

Re: [WIP] Artillery (Worms Like)

Postby erico » Thu Jun 11, 2015 1:50 pm

Uau, looks super charming! Specially the movement. 8-) 8-)
Will give a try later and let you know.
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: [WIP] Artillery (Worms Like)

Postby frakasss » Thu Jun 11, 2015 1:51 pm

Waw! I wasn't expecting a so quick answer! :D
Thanks erico!
User avatar
frakasss
 
Posts: 97
Joined: Thu Dec 11, 2014 10:20 am
Location: France

Re: [WIP] Artillery (Worms Like)

Postby clement » Thu Jun 11, 2015 3:20 pm

The game look good.

just my 2cent advice :

You should replace all your if(gamestatus=="XXX")
Code: Select all

if (gamestatus=="selectMap") {
      fnctn_checkbuttons();
      outpt_selectMap();
    }

    // create level
    if (gamestatus=="newLevel") {
      screen=gamelevel-1;
      fnctn_nextPlayer();
      fnctn_newlevel();
    }
   
    // loading screen (needed to avoid having unexpected action)
    if(gamestatus=="loading" || gamestatus=="loadingPause"){
      fnctn_checkbuttons();
    }
   
    // pause / weapon select?
    if (gamestatus=="pause") {
      fnctn_checkbuttons();
      outpt_pause();
    }
   
    // game running
    if (gamestatus=="running") {
      outpt_landscape();
      outpt_players();
      outpt_power();
     
      if(allPlayer[currentPlayer-1].team==0){
        fnctn_checkbuttons();}
      else{
        fnctn_ia();
        gb.display.print(cpuMem[currentPlayer/2].target);
        gb.display.print(allPlayer[cpuMem[currentPlayer/2].target].dead);
      }     
     
      fnctn_checkJump();
      if(jumpStatus<3){fnctn_checkPlayerPos();}
      if(allPlayer[currentPlayer-1].dead==1){
        fnctn_checkDead();
        fnctn_nextPlayer();
      }
     
      if(power==0 && jumpStatus==0){outpt_cursor();}
    }
   
   
    if(gamestatus=="animFire"){
      outpt_soundfx(0,0);
      outpt_landscape();
      outpt_players();
      fn_nextProjPosition();
      fn_checkCollision();
      outpt_projectile();
    }
   
    if(gamestatus=="boom"){
      outpt_soundfx(1,1);
      outpt_landscape();
      outpt_players();
      outpt_power();
      outpt_boom();
      fnctn_checkbuttons();
      if(timer>=7){
        fnctn_nextPlayer();
      }
    }
   
    if(gamestatus=="missed"){
      outpt_landscape();
      outpt_players();
      outpt_power();
      outpt_missed();
      fnctn_checkbuttons();
    }
   
    if(gamestatus=="gameover"){
      outpt_landscape();
      outpt_players();
      outpt_gameOver();
      fnctn_checkbuttons();
    }


by a switch case
Code: Select all

switch(gamestatus)
{
    case "selectMap"
      fnctn_checkbuttons();
      outpt_selectMap();
   break;
}



And you should dont use string for your game status bu a byte

Code: Select all

#define SELECT_MAP 1
#define BOOM 2
#define GAME_OVER 3
...

byte gameStatus;

// change game status :
gameStatus = GAME_OVER;


//switch work with byte,   but with string i don't know

switch(gameStatus)
{
   case GAME_OVER :
       //YOU LOOSE
    break;
}



With this you can save memory/cpu and no lost clarity in code :)
clement
 
Posts: 161
Joined: Sat Oct 25, 2014 8:06 am

Re: [WIP] Artillery (Worms Like)

Postby Marcus » Thu Jun 11, 2015 3:43 pm

Wow, this looks great! Worms was one of my favorite games back then. Keep up the good work!
Marcus
 
Posts: 143
Joined: Fri Jan 09, 2015 6:51 pm

Re: [WIP] Artillery (Worms Like)

Postby erico » Thu Jun 11, 2015 6:08 pm

I wonder if it would be too hard to make it link-multiplayer as the pong example. :)
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: [WIP] Artillery (Worms Like)

Postby fazo96 » Thu Jun 11, 2015 6:32 pm

It looks extremely cool! Multiplayer would be awesome in this game! Also, how many levels do you think fit in the memory?
User avatar
fazo96
 
Posts: 9
Joined: Thu Jun 04, 2015 6:33 pm
Location: Italy

Re: [WIP] Artillery (Worms Like)

Postby erico » Fri Jun 12, 2015 4:36 am

If they are Sd card loaded, maybe an "eternal" amount?
There could even be an editor.
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: [WIP] Artillery (Worms Like)

Postby frakasss » Fri Jun 12, 2015 6:27 am

Thanks all for you feedback!
So many things to do now!

Thanks Clement for tech advice! I'll look at my code to improve this. I'll also try to introduce some classes (at least for characters)...

Marcus, Worms was (is!) one of my favorite game as well! (I mean the 2D version only!)

About the link-multiplayer version, I was already thinking about it... I'll probably work on this, but later, and in another version of the game (I mean, not included in this one, as I'm already fighting to save memory :) ) Also, I don' know how to test it since I only have 1 console..
But if anybody want to work on the multiplayer version, feel free! :D

About the number of levels, I don't really know.
So far, I'm storing 10 (21x12) images in memory, and I'm 'unzipping' the one selected during the game (I was inspired by LunarLander project).
My plan is to complete the game first, and add maps until memory is full!
I'm interested your solution, erico (SDcard loader) but I'm afraid that I'm not enough good gamebuino dev. yet :).

So, action plan is:
- improve dirty code :)
- Fix bug001: characters can be born-dead (due to the map)
- Fix bug002: characters can die by jumping out of the upper side of the screen
- Fix bug003: characters can climb just by jumping
- Fix bug004: characters can fall out of the map by the shot loader (bottom left isn't a good position)
- Complete IA
- Add life to characters (?)
- Display char info (?)
- Allow player to quit the game.
User avatar
frakasss
 
Posts: 97
Joined: Thu Dec 11, 2014 10:20 am
Location: France

Re: [WIP] Artillery (Worms Like)

Postby frakasss » Fri Jun 12, 2015 2:15 pm

Ok, I moved a bit forward on this:

I improved my code, following Clement's advice.

Bug fix:
- bug004 nearly fixed: power only appear when player / cpu start to launch the rocket.
- bug003 fixed: jump doesn't mean 'fly' anymore.

New feature:
- Added some sounds for jump, fire, explosion, win and loose game.

Still have to do:
- Fix bug001: characters can be born-dead (due to the map)
- Fix bug002: characters can die by jumping out of the upper side of the screen
- Fix bug005: when player's last guy is falling in a hole, game crash...
- Complete IA
- Add life to characters
- Display char info
- Pause menu
User avatar
frakasss
 
Posts: 97
Joined: Thu Dec 11, 2014 10:20 am
Location: France

Next

Return to Project Guidance & Game development

Who is online

Users browsing this forum: No registered users and 27 guests

cron