Autor Tema: Worklog  (Leído 8504 veces)

Hokutoy

  • Moderator
  • *****
  • Mensajes: 196
  • Karma: 19
Worklog
« en: Diciembre 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:
Código: [Seleccionar]
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.
« última modificación: Diciembre 04, 2009, 05:12:37 pm por Hokutoy »

Hokutoy

  • Moderator
  • *****
  • Mensajes: 196
  • Karma: 19
Re: Worklog
« Respuesta #1 en: Diciembre 05, 2009, 05:24:22 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.
Código: [Seleccionar]
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.

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: Worklog
« Respuesta #2 en: Diciembre 05, 2009, 06:13:11 pm »
Looks like recursion might be your friend.
-- Sandman

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Worklog
« Respuesta #3 en: Diciembre 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
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: Worklog
« Respuesta #4 en: Diciembre 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... ;)
-- Sandman

Drumpi

  • Hero Member
  • *****
  • Mensajes: 6187
  • Karma: 157
  • Odio el periodo "entre proyectos"
    • La web de Drumpi
Re: Worklog
« Respuesta #5 en: Diciembre 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).
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: Worklog
« Respuesta #6 en: Diciembre 06, 2009, 08:39:33 pm »
Functions are the same as processes, they just keep the parent waiting.
-- Sandman

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Worklog
« Respuesta #7 en: Diciembre 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.
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Hokutoy

  • Moderator
  • *****
  • Mensajes: 196
  • Karma: 19
Re: Worklog
« Respuesta #8 en: Diciembre 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!
« última modificación: Diciembre 11, 2009, 11:08:27 am por Hokutoy »

Hokutoy

  • Moderator
  • *****
  • Mensajes: 196
  • Karma: 19
Re: Worklog
« Respuesta #9 en: Diciembre 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

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Worklog
« Respuesta #10 en: Diciembre 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.
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

josebita

  • Administrator
  • *****
  • Mensajes: 4039
  • Karma: 257
    • BennuGD Mobile Worklog
Re: Worklog
« Respuesta #11 en: Diciembre 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!

Hokutoy

  • Moderator
  • *****
  • Mensajes: 196
  • Karma: 19
Re: Worklog
« Respuesta #12 en: Enero 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!







Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Worklog
« Respuesta #13 en: Enero 04, 2010, 02:38:19 pm »
Awesome :o
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

FreeYourMind

  • Hero Member
  • *****
  • Mensajes: 5563
  • Karma: 125
    • GECA soft
Re: Worklog
« Respuesta #14 en: Enero 04, 2010, 06:48:39 pm »
Amazing the new Logo :)