Archive of the Gamebuino Classic forum (2014-2018), rebuilt from the pages kept by the Wayback Machine: only part of the topics and pages were captured. Read-only. Removal on request: hi@gamebuino.com.
Forum › Project Guidance & Game development
[BETA] Artillery (Worms Like)
frakasss Thu Jun 11, 2015 1:47 pm
Hey,
Here my (not finished) project 'Artillery'.

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!
Here my (not finished) project 'Artillery'.

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!
erico Thu Jun 11, 2015 1:50 pm Re: [WIP] Artillery (Worms Like)
Uau, looks super charming! Specially the movement. 8-) 8-)
Will give a try later and let you know.
Will give a try later and let you know.
frakasss Thu Jun 11, 2015 1:51 pm Re: [WIP] Artillery (Worms Like)
Waw! I wasn't expecting a so quick answer! :D
Thanks erico!
Thanks erico!
clement Thu Jun 11, 2015 3:20 pm Re: [WIP] Artillery (Worms Like)
The game look good.
just my 2cent advice :
You should replace all your if(gamestatus=="XXX")
by a switch case
And you should dont use string for your game status bu a byte
With this you can save memory/cpu and no lost clarity in code :)
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 :)
Marcus Thu Jun 11, 2015 3:43 pm Re: [WIP] Artillery (Worms Like)
Wow, this looks great! Worms was one of my favorite games back then. Keep up the good work!
erico Thu Jun 11, 2015 6:08 pm Re: [WIP] Artillery (Worms Like)
I wonder if it would be too hard to make it link-multiplayer as the pong example. :)
fazo96 Thu Jun 11, 2015 6:32 pm Re: [WIP] Artillery (Worms Like)
It looks extremely cool! Multiplayer would be awesome in this game! Also, how many levels do you think fit in the memory?
erico Fri Jun 12, 2015 4:36 am Re: [WIP] Artillery (Worms Like)
If they are Sd card loaded, maybe an "eternal" amount?
There could even be an editor.
There could even be an editor.
frakasss Fri Jun 12, 2015 6:27 am Re: [WIP] Artillery (Worms Like)
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.
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.
frakasss Fri Jun 12, 2015 2:15 pm Re: [WIP] Artillery (Worms Like)
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
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