Metapatrol need help -- By geed


Author :  geed

Hello world !

I continue to learn and training, slowly, but it's very interesting.

I started a new project. A small and simple clone of moon-patrol. 

I want add some UFOs, rocks and holes.

At this point, my differential scrolling is working. My rover can jump and go left or right. But i have two problems and i don't find solution :(

Update : 17/09/18 

Complet re-write of the code. No tile mapping or complicated thing ... I'm not enough experienced ... ;)

Update : 13/04/18 

I resolved my problems ! 

Now with : rocks, holes, gravity and weapon ! I want a game less difficult than Oubliette, so i add a "regeneration" of life (like in modern fps game for example).

Next : add UFOs and works on sprites (boom, player, etc.) !

Update : 17/04/2018

This time, i experiment tilemapping and scrolling. I find the definitive form of the "rover" (become a Walker ! )

What do you think ?

Update : 15/05/2018

I have many collisions problems. I upload my code. I want to use tilemapping, but i don't know how to detect correctly collision. My player "stick" on ground or bug :(

See more
Author :  exocet

Nice project! I can't really help you with programming but I hope we'll be able to play your game soon!

Author :  clement

hello ,

you have error in your for statment 

You define your array with 11 element but you run 12 time in your array : 

#define NUM_BLOCS 11
Box bloc[NUM_BLOCS];

//0,1,2,…,11 == 12 round
for (byte t=0;t<=NUM_BLOCS;t++) {


//you need to use < instead of <=:

//0,1,2,…,10 == 11 round
for (byte t=0;t<NUM_BLOCS;t++) {


in c you dont have protection to length of your array and with your code you can modify other variable out of the array. maybe the player.y ? 

I hope that help :) 

Author :  geed

It works ! Two days, third time i reworte the code form scratch. 

Author :  ragnarok93

Great looking game ! I will test it soon and give some feedback :). Fingers crossed for this project ;).

Author :  ragnarok93

Woooow geed that looks very good ;). You are learning really fast ;). Hope I will do that good as You someday xD.

Author :  jicehel

I like the Walker, i like the animation, i like the scrolling.

I don't like the shots but i think it's a temporary sprite (sorry if it's not but then i don't like it and it's easy to change compared with walker and job done on the background.) Thanks for the source with the differencial scrolling. It's very good. I don't know if it's possible to smooth it again with a sort of blur in the intermediate pictures to avoid the impression that the stars advance by steps ? I don't think that it's possible to do better a smooth it but maybe someone can perfect it again without low perf of the game.

(Calculate color on each point would be too long but maybe it's possible to precalculate it, i don't know)

Author :  geed

Thanks for the feedback ! 

But i'm aggre with you, the "star" background is updated every 8 frames. Maybe the solution is to "accellerate" everything, i don't know ... i will test. Or maybe an animated background with an intermediary pictures (with grey stars and a frame loop at 7) like you said ! good idea, i steal it !

At this time, i must take a choice. Tilemapping are very useful and i bagan to understood how it works. But if i use it, i will lose randomisation of my levels ... 

--- FR ---

Merci pour vos retours ! Pour le fond des étoiles, je suis assez d'accord, il avance par "à coup", je ne sais pas trop comment y remédier. Soit j'accélère tout, soit je teste avec une image atténuée des étoile intermédiaire. Je vais faire des essais.

Pour le reste, je commence √† comprendre le tilemapping en d√©cortiquant les jeux des autres, mais je suis emb√™t√©, si je pars l√† dessus je perds le c√īt√© al√©atoire de la g√©n√©ration des obstacles.

PS : ouais, les tirs sont moches ! :p

Author :  jicehel

Tu peux avoir un tirage aléatoire des obstacles et faire correspondre les tiles qui correspondent à ces obstacles pour les afficher. Ca veut juste dire que tu dois avoir des raccords toujours à la même hauteur pour pouvoir "coller" les sprites correspondant à un obstacle à la place de ceux du terrain normal. Par contre il faudra faire attention de ne pas avoir d'effet de clignotement. Je pense qu'en faisant des étoiles grosses, ce sera plus simple car tu pourras plus facilement garder à peu près le même effet visuel pendant que l'on triche sur la couleur des points.

Author :  clement

pour les fonds , au lieux de regler la vitesse de deplacement en ajustant tout les combien de frame il avance tu peux te baser sur une vitesse en X

float vxLayer1 = 0,25; //layer etoile
float vxLayer2 = 0,50; //layer montagne 
float vxLayer3 = 0,75; // layer herbe

ensuite a chaque frame tu deplace ton layer de sa vitesse , tu convertie sa position en int avec un arrondi et tu l affiche ou il faut.

Si je dit pas de betise ca devrais fluidifier l annimation (mais ralentir le CPU) 


PS : les valeur ci dessus sont mise de facon totalement aleatoire, je n ai meme pas regarder ton code....  

Author :  Max

Trop bien cette update !

Moi je suis à la ramasse avec mon jeu... Si toi tu écris avancer lentement, alors je fais du sur place !

Author :  jicehel

T'inqui√®tes Max avances √† ton rythme. On est tous b√©n√©voles. On fait ce que l'on a envie de fait √† notre rythme et par ce que l'on en a envie. Bien s√Ľr les autres peuvent attendre le jeu et c'est tant mieux mais personne ne reprochera jamais r√©ellement (ou alors il aurait tord) de ne pas aller assez vite.¬† ¬†;)

Author :  erico

Last update looks really great! If I¬īd have to nitpick, I¬īd add a few more frames on the walking cycle, keep it up!

Author :  geed

For test purpose i remove grey and green mountain, the cpu down from 110% to 65% on the emulator, it's strange, i must work on this before ... Maybe the transparency ...
And i really need to test it on real hardware !

Author :  Aurélien Rodot

Yes, images with transparency are way slower to draw, because the CPU has to check every single pixel :/

Author :  geed

Project is in stand-by.

It's too ambitious for my skill ... 

I have many collisions problems. I want to use tilemapping, but i don't know how to detect correctly collision. My player "stick" on ground or bug :(

I upload my code, if you have some "tricks" ... but honestly, after one month, i'm close to give up :(

Author :  jicehel

You can maybe try to chat on discord. The mates are very good and sure they will be able to help you.

I hope you'll not give up if you have some problem it's why the communauty is created. I'm sure that someone will be able to give you an idea or maybe to update your code to make it running and do the good collision tests / actions.

Author :  clement

Author :  geed

Bon, ne nous avouons pas vaincus !
Nettoyage, ré-écriture en utilisant ce que j'ai appris en étudiant Cosmic Pods, et même si c'est moins "ambitieux" que ce que j'avais imaginé à l'origine, ben ça marche à peu près.

Il ne sera pas dit que je ne le terminerai pas ce fichu jeu !

Author :  jicehel

Super car il s'annonce vraiment très bien ;) Bon courage