GithubHelp home page GithubHelp logo

jhoukem / bomberman Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 14.14 MB

The old fashion bomberman game. Developed in C for learning purposes.

C 100.00%
game-development game-2d bomberman-game bomberman sdl2

bomberman's Introduction

Bomberman

The old fashion bomberman game. Developed in C for learning purposes.

Licence

This project is under the GNU GPLv3 license.

Installation Guide

I will only talk about windows's users since Linux's users should already know how to do this.
To compile the sources, you should have MinGW installed on your machine as well as SDL2, SDL2_images, SDL2_ttf and SDL2_mixer libraries.
Refers to google for installation informations or maybe go to this tutorial

Eclipse project configuration

Create a new C project (if the choice is given, select the MinGW compiler). Next, fetch my repository sources using a git client (I personally use this one):
$ git clone http://github.com/jhoukem/Bomberman
Then extract all the files from the repository to your project root:
$ mv Bomberman/* my_project_root_path/

Includes configuration

Go to: Project -> Properties -> C/C++ Build -> Settings
In the tool settings tab, expand the GCC C Compiler option. Click on the 'Includes' folder from the sources. In the include paths window, add the 'headers/' folder.

C Linker Configuration

Still on: Project -> Properties -> C/C++ Build -> Settings
In the 'Tool settings' tab, expand the MinGW C Linker option. Click on the 'Librairies' folder. Then on the libraries windows, add the following libraries (the order is important):

  • mingw32
  • SDL2main
  • SDL2mainSDL2_image
  • SDL2_ttf
  • SDL2_mixer
  • pthread

This should be sufficient to compile the sources (if you have installed the SDL2 libraries on your computer) but if you want your '.exe' file to have a icon (which is nicer) then you will have to follow these two more steps:

Resources file configuration (for exe icon)

Still on: Project -> Properties -> C/C++ Build -> Settings
Go to the 'Build Steps' tab and fill the command input field with the following line:
windres ../rsc/ressources.rc ../rsc/ressources.o
This will create a binary resource for the compiler so it can load the icon into the '.exe' file.
Go back to the 'Tool Settings' tab and in the MinGW C Linker, under Miscellaneous, add a new object with the path to the resource we created:
../rsc/ressources.o
(I used '../rsc' because the compiler current directory will be in the Release/Debug folder in our project so we have to go back once to be able to reach the 'rsc' folder).
And... That's it!

You are all done with the project configuration. Now go ahead and compile the sources (Ctrl + Maj + B). Feel free to add any improvement to the game and make me know about it.

Export the game to a PE (portable executable)

The '.exe' file need the SDL's dll to be in the same folder in order to run. Create a new folder and add the '.exe' file, the 'rsc' folder and all the SDL dll.

Now you can just zip this folder and share it to a friend.

Demo

demo1 demo2 demo3

bomberman's People

Contributors

jhoukem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bomberman's Issues

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.