Git Product home page Git Product logo

game-c's People

Contributors

clasr avatar fspacheco avatar gsimas avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gscs clasr fspacheco

game-c's Issues

Comentários sobre o projeto

Documentação complementar ok.
Efeito visual excelente.
As estruturas Enemy_red e Enemy_blue são iguais. Poderiam usar uma só e colocar um campo para diferenciar o tipo de inimigo.
Por conta do comentário anterior, parte do código está repetida. É possível organizá-lo melhor. A repetição também aparece nas funções do background.
Está dando uma falha de segmentação no final. É alguma coisa que estão tentando liberar e que não tinha sido previamente alocada ou está sendo repetida a liberação. Não tive tempo para conferir, mas sugiro que vocês corrijam.
Vou submeter um pull request para corrigir o carregamento da imagem reprovado.png. Confiram.

Arquivos no repositório

Os diretórios bin, debug e os arquivos .depend e .layout não são necessários no repositório. Favor excluir.
Também acho interessante colocar as fontes em um diretório separado.

Áudio no jogo

Acho que o problema com os arquivos de áudio é o tamanho. São 30 MB comprimidos, que devem ser armazenados sem compressão na memória. Então, não vai caber.
https://www.allegro.cc/forums/thread/615115

Testem o código seguinte. Se carregar .ogg (como funcionou no meu), mudem no projeto de vocês al_load_sample para al_load_audio_stream

//gcc -Wall testeaudio.c -o testeaudio -lallegro -lallegro_audio -lallegro_acodec
//testar com ./testeaudio sounds/topgearsoundtrack.ogg
#include <allegro5/allegro.h>
#include <allegro5/allegro_audio.h>
#include <allegro5/allegro_acodec.h>
#include <stdio.h>

int main(int argc, char** argv)
{
  if (argc!=2) {
   printf("Uso: testeaudio nomearquivo\n");
   exit(1);
  }
  al_init();
  al_install_audio();
  al_init_acodec_addon();
  al_reserve_samples(1); // to create the default mixer/voice

  ALLEGRO_AUDIO_STREAM* stream = al_load_audio_stream(argv[1], 3, 1024);
  if (!stream) {
    printf("Erro ao carregar %s", argv[1]);
    exit(1);
  }
  al_attach_audio_stream_to_mixer(stream, al_get_default_mixer());

  while(al_get_audio_stream_playing(stream))
  {
    al_rest(0.1);
  }
  return 0;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.