Bennu Game Development

English Forums => First Wiz/PC contest => Projects => PUZSION => Topic started by: Hokutoy on December 04, 2009, 05:10:24 PM

Title: Worklog
Post by: Hokutoy on December 04, 2009, 05:10:24 PM
Hi! Worklong incoming! As always, forgive my bad english  ;) Coments and help in the other post. Thanks!

Background History:
I'm not a programmer. I don't have any informatic/mathemathic/aritmethic studys at all... so things like an Arrays, a Struct or a Pointer it's a thing i never heard berfore.
Puzsion is a perfect chance to learn about that things because the main core of the game is a struct:

STRUCT TABLERO[56]
INT X,   Y,   GRAPH,   ARRIBA,   DERECHA,   ABAJO,   IZQUIERDA, GLOW, DESTRUIR ;end=

This simple code will be used to generate a 8*7 table of jewels (first row of 7 jewels offscreen... to feed destroyed jewels).
Using this struct each process got his  X, Y, his GRAPHic, and his neightbourn jewel (UP, RIGHT, DOWN, LEFT), GLOW variable to know if the jewel is selected and DESTRUIR variable to mark the jewel for destruction.

This start it all few day ago... and now the core of the game is almost finished and works quite well.
For now i'm thinking in a way to check if there are any valid chain of 3 jewels to make the game "reshufle" if there is not more legal moves avaliable.

More ranting later.
Title: Re: Worklog
Post by: Hokutoy on December 05, 2009, 05:24:22 PM
Quote from: Hokutoy on December 04, 2009, 05:10:24 PM
This start it all few day ago... and now the core of the game is almost finished and works quite well.
For now i'm thinking in a way to check if there are any valid chain of 3 jewels to make the game "reshufle" if there is not more legal moves avaliable.

Done!
This little code has took me some time of serious thinking...  ??? But now works well. It search the main struct for a posible valid chain of 3 jewels. It compare the type of one jewel with his adjacent jewels and if is the same type, it compare again his type with the adjacent jewels of the maching jewel. Basic but it works well.
FOR(CONTADOR=8;CONTADOR<57;CONTADOR++);

  IF(CONTADOR>14) //--> PARA EVITAR EL CHEKEO DE LA "LINEA 0" REFILLER
IF(TABLERO[TABLERO[CONTADOR].ARRIBA].GRAPH==TABLERO[CONTADOR].GRAPH);
IF(TABLERO[TABLERO[TABLERO[CONTADOR].ARRIBA].ARRIBA].GRAPH==TABLERO[CONTADOR].GRAPH and CONTADOR>21); check_who=contador-7;CHECK_SI=1; frame; RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].ARRIBA].IZQUIERDA].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=1;frame; RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].ARRIBA].DERECHA].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=1;frame; RETURN; END
END
  END
IF(TABLERO[TABLERO[CONTADOR].ABAJO].GRAPH==TABLERO[CONTADOR].GRAPH);
IF(TABLERO[TABLERO[TABLERO[CONTADOR].ABAJO].ABAJO].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=2; frame;RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].ABAJO].IZQUIERDA].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=2; frame;RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].ABAJO].DERECHA].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=2; frame;RETURN; END
END
IF(TABLERO[TABLERO[CONTADOR].IZQUIERDA].GRAPH==TABLERO[CONTADOR].GRAPH);
IF(TABLERO[TABLERO[TABLERO[CONTADOR].IZQUIERDA].ABAJO].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=3; frame;RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].IZQUIERDA].IZQUIERDA].GRAPH==TABLERO[CONTADOR].GRAPH);check_who=contador-7; CHECK_SI=3; frame;RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].IZQUIERDA].ARRIBA].GRAPH==TABLERO[CONTADOR].GRAPH  and CONTADOR>21); check_who=contador-7;CHECK_SI=3; frame;RETURN; END
END

IF(TABLERO[TABLERO[CONTADOR].DERECHA].GRAPH==TABLERO[CONTADOR].GRAPH);
IF(TABLERO[TABLERO[TABLERO[CONTADOR].DERECHA].ABAJO].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=4; frame;RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].DERECHA].DERECHA].GRAPH==TABLERO[CONTADOR].GRAPH); check_who=contador-7;CHECK_SI=4; frame;RETURN; END
IF(TABLERO[TABLERO[TABLERO[CONTADOR].DERECHA].ARRIBA].GRAPH==TABLERO[CONTADOR].GRAPH  and CONTADOR>21); check_who=contador-7;CHECK_SI=4;frame; RETURN; END
END
END


For now, i need to think in some game mechanics to make the game more variated.
Title: Re: Worklog
Post by: Sandman on December 05, 2009, 06:13:11 PM
Looks like recursion might be your friend.
Title: Re: Worklog
Post by: Windgate on December 06, 2009, 12:21:12 PM
About recursion in Bennu, the fact of having lots of local variables that are not really needed, I think it "overloads" a little bit, isn't it? I tried a recursive Fibonacci and I feel it slow...

I have though about a new type of FUNCTION/PROCESS called PROCEDURE that could avoid having local variables... But I don't know if such a thing is posible in Bennu right now :P
Title: Re: Worklog
Post by: Sandman on December 06, 2009, 01:12:48 PM
Very true indeed and there's been thought about a new lighter 'procedure'. Maybe it will come.
In this case though it doesn't really matter, as the recursion is only about 3 deep. And saves a lot of headache... ;)
Title: Re: Worklog
Post by: Drumpi on December 06, 2009, 06:32:09 PM
You can use functions, they are more lighter than process... i think, they not use graphs, files or  else, so they must be more faster... but just thinking (i don't know how Splinter made them).
Title: Re: Worklog
Post by: Sandman on December 06, 2009, 08:39:33 PM
Functions are the same as processes, they just keep the parent waiting.
Title: Re: Worklog
Post by: Windgate on December 06, 2009, 08:42:34 PM
Yes, and returns what you want instead of the process id, but the load is the same. The idea is having a "light" process with no local variables, it will be very usefull for complex functions like IA and recursive procedures.
Title: Re: Worklog
Post by: Hokutoy on December 11, 2009, 11:06:52 AM
Hi! The game is going nicely!
Next time i will put a video to show how the gameplay works.
Ok! time to think about some game modes:

- Quota mode:
      You must get the fixed quota of jewels to progress to next level (like Zookeeper)
       In addition, you must get the fixed quota of "chains" too. Like you need a quota of six "Chains of 10   jewels".
       You get a GAME OVER when time runs out and, maybe, when you get no more moves.

- Glass mode:
      Every time you destroy a jewel, it don't fall down. The jewel is respawned semi-transparent (glass mode). You must get all the jewels of the boad semitransparent to get to the next level.
       You get a GAME OVER when time runs out and, maybe, when you get no more moves.

- Rush mode:
      You race with the clock. The goal of the game is to go from "Chain of 3" to "Chain of 20" one by one (in crescent order) with the best possible time.
      No GAME OVER in this mode. No more moves = time penality and reshuffle of the board.

- Arcade mode:  Your objective is to get as many point as yo can in a time limit... or something like that.

Byes!
PD: Sorry for my bad english!
Title: Re: Worklog
Post by: Hokutoy on December 12, 2009, 08:31:45 AM
Hi!
I made some video to show you how the gameplay looks.

http://www.youtube.com/watch?v=uPrb7EFleDA


It's a pity but the cool SF2 skin is out for the contest because of the rules but my friend Amzg is making some great gfx for the game.

Byes
Title: Re: Worklog
Post by: Windgate on December 12, 2009, 12:13:17 PM
Looks really good, it is a good idea to having puzzle games... I don't remember a previous puzzle game on this game.
Title: Re: Worklog
Post by: josebita on December 13, 2009, 01:06:33 AM
The game looks perfect, just one note: be sure to find good free graphics for the final version, as the ones you're using are copyrighted! (I read the other post on this :))

But great work!
Title: Re: Worklog
Post by: Hokutoy on January 04, 2010, 12:14:13 PM
Hi!
After all the happy days... comeback to work!

My friend AMZG has done a incredible good work with the graphics of Puzsion.
Some screens of the "intro"... screens for gameplay are still a "surprise".
Almost all work is finished now... find a good free music, some gameplay tweaks, intensive betatesting and ready to go!

Byes!

(http://www.gp32spain.com/foros/attachment.php?attachmentid=19827&d=1262605703)

(http://www.gp32spain.com/foros/attachment.php?attachmentid=19828&d=1262605703)


Title: Re: Worklog
Post by: Windgate on January 04, 2010, 02:38:19 PM
Awesome :o
Title: Re: Worklog
Post by: FreeYourMind on January 04, 2010, 06:48:39 PM
Amazing the new Logo :)
Title: Re: Worklog
Post by: josebita on January 07, 2010, 05:21:19 PM
Wow, it reminds me a lot of GLtron :)
Title: Re: Worklog
Post by: Hokutoy on January 31, 2010, 04:24:08 AM
Hi!
I finished my game today! Hurray!  ;D
Some screenshots of the game to generate some hype  ;D


(http://www.gp32spain.com/foros/attachment.php?attachmentid=20008&d=1264910188)

Byes!

PD: Amzg has done an amazing good job with the graphics  :o
Title: Re: Worklog
Post by: Drumpi on January 31, 2010, 02:25:40 PM
Congratulations!! now you got a level up on game programming ;D
Looks great, i hope the game was coded as good as graphics ;)

Finally, a touchscreen is finally needed?
Title: Re: Worklog
Post by: Hokutoy on January 31, 2010, 03:58:59 PM
Quote from: Drumpi on January 31, 2010, 02:25:40 PM
Congratulations!! now you got a level up on game programming ;D
Looks great, i hope the game was coded as good as graphics ;)

Finally, a touchscreen is finally needed?

THANKS!
The game looks amazing and, even with my lack of skills at programing, plays very well.
The games uses the touchscreen for all things so is a must. Sorry Gp2x users!
Maybe, after the contest, you get a Wiz  :)