GithubHelp home page GithubHelp logo

ashish2199 / aidos Goto Github PK

View Code? Open in Web Editor NEW
41.0 17.0 27.0 1.46 MB

A beginner friendly project with aim of creating our own version of Bomberman.

License: GNU General Public License v3.0

Java 100.00%
game-development javafx javafx-games javafx-8 beginner-friendly game-2d java-game java-fx bomberman bomberman-game

aidos's Introduction

Aidos

A beginner friendly project with aim of creating our own version of Bomberman.

Alt Text

Getting Started

This is a netbeans project that can be easily opened with Netbeans IDE. File -> Open Project If you want you can also directly checkout the process from within the Netbeans by Team -> Git -> Clone

If you use eclipse then it can be easily imported into Eclipse also.

Prerequisites

What things you need to install the software and how to install them

Java JDK 1.8 or higher
Netbeans , Eclipse or any other popular IDE

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. When in doubt open an Issue, We will be responding.

Authors

  • Ashish Padalkar - Initial work - ashish2199
  • Corey Lovett-Hendrey - For helping with rendering, animations and input - CoreyHendrey

Acknowledgments

  • Thanks to all those who have contributed to the project by helping with the code and provide feedback to design descisions.

aidos's People

Contributors

ashish2199 avatar coreyhendrey avatar dostertag avatar gargi22100 avatar harrisjt avatar stewartwallace1115 avatar xinkev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aidos's Issues

Questions about new image being created for every object.

First.
Still pretty new to java and I'm self taught.
I done some programming in D and Python.

Looking through code. It seems you create an new image for every object. Even if it the same object.
Just wonder why images are not static to the object ?

Why isn't Sprites called AnimatedSprite ?

Also wondering in nbproject .project.properties. How can I ignore this ?
I have to change line 72 to false. line 72 (javafx.deploy.includeDT=true)

To Be Done

I have uploaded initial code for the repository.
I am using Netbeans 8.2 with JDK 1.8.
I hope you would be able to figure out how to import this project to your choice IDE and run it.

I have implemented a animation for walking in the downward direction.

Here are some things which we need to do for now

  • Try to figure out if there could be a better for making animations. The approach I have used now feels length, we need a approach that is more concise and elegant.
  • Implement remaining animations for player to walking in left , right and up direction.
  • Registering keyboard inputs and using it them to make the character walk across the screen using arrow keys for now.
  • Dividing the sprite sheet into individual images so that we don't have to deal with cropping. What do you guys thinks ? A single big sprite sheet or set of images.

Some other tasks which are always helpful to the project.

  • Adding comments to code wherever necessary
  • Refactoring and formatting of the code.
  • Contributing to ReadMe and Wiki of this repository.

What we need to achieve is walking of player across the game screen.

If you have any queries/suggestions then comment down below

Sorry guys, I wont be able to give much time on weekday for this project because of my job.
If any experienced folks see something you can contribute to or provide your opinion on then please do.

Game Design

This is how I feel we should be designing the game that is General Architecture

Initializing of the Resources

  • load graphics , sounds ect
  • Handle missing resources

Initiate Game

  • Create objects required for the game, Add event handlers , Initialize the game variables like score ect, Initialize physics
  • Loading game state from disk in case we are loading a previously saved game.

Run the main game loop

  • Handle user input such as keyevents
  • Update the game based on user input that is updating the player, enemies ,the world ect
  • Send the updated to game state to server in case of multiplayer
  • Render the updated game state

Finishing up

  • Save important variables like score to disk
  • Release resources , destroy objects

Let me know if there is something that was left out.

Explain the code

Please discuss about whatever you don't understand in what we have developed so far.

we will provide explanation to

  • any line of code
  • any method
  • significance of any variable or what a variable represents
  • any other explanation you need from the current code developed so far

Some Explanations from here will be added as comments in code wherever required.

Regarding project ownership

@CoreyHendrey commented on Nov 22, 2017, 5:23 AM GMT+5:30:

@ashish2199
Did you also want to submit pull requests for major changes, just so we can all discuss them? I'm unsure of the mentality for this project. IE, is it a total group effort. Or is it more a project that you own, and we are contributing too?

Thanks

I would like to clarify my stance
.
This project is about collaborating with people.
I am the owner the repository just because I first came up with this idea.Being a owner doesn't mean I would take decision what I feel is right,
I would like to take into consideration what you guys want from the project and do things that way.

I recently asked a question on Github about how to get my code reviewed as a owner of the repository.
What has been suggested to me is to create a new branch for what I am working on and submit a pull request and getting it reviewed and merge it into the master branch. I will follow this patter from now on for any major changes I make.

I would like us to create a issue and discuss it if we are going to make a new design decision or deviating from our design as such changes have a large impact in future and shape how we will code in future.

Collission Detection improvements

I added walls to the game.

This exposed a problem with our current collision system, though.

First I had to alter the functions slightly to return boundaries correctly, this was a minor change.
The major change, we will have to discuss.

For collision detection, you want to test where the player IS GOING TO BE, not where he currently is. That's my understanding anyway. The way we have it currently, this is impossible without some ugly hacky code.

Does anyone have any ideas about how to implement this nicely?

What is the project management layout of this project?

I noticed that it appears you're not using Scrum or Agile, and there doesn't seem to be a "Code Review" or unit testing framework in place. How do you guys plan to control the quality of the project or the overall work "picture?"

Add update() to Entity

I think we should also add an update function to Entity.

This will be where all the logic gets called for each entity every tick. Moving, placing bombs, collision detection etc.

Keeping it separate from draw() would be a good idea I think.

Discussion on which language to use

We will be working with on creating our own version of Bomberman game.

We have two options mainly we can use for making the game

  • JavaFX
  • HTML5/Javascript

Also provide your feedback on whether we should be using any game development framework or not. If yes , which one ?

Please share what you are most familiar with. Which one should we choose ?
Any advantage of one over the other.

Drop bombs

What class and method should I add the drop bomb command to? Also, how do I use the bomb sprite?

KillableEntity?

I was wondering if we should make a KillableEntity, to separate out the death and health code from MoveableEntity, as it doesn't seem to fit too well to me.

Class Design

I am thinking of creating these classes under these packages.

Bomberman (Project Name)

Source ( Folder )
	Contstants ( class )
	GameState ( class )
	GameController ( Package )
		EventHandler( class )
		GameLoop  ( class )
		GameVariables ( class )
	Algorithms ( Package )
		Enemy Movement ( class )
	Entity ( Package )
		Static Entity ( interface )
			Walls ( class )
			Stones ( class )
			Bomb ( class )
		Moving Entity ( interface )
			Enemy1 ( class )
			Enemy2 ( class )
			EnemyN ( class )
			Player ( class )
		BoundedBox ( class )  For collision
			Rectangular BoundedBox
			Circular BoundedBox
	Animations ( Package )
		Player Animations  ( class )
			Walk Animation
			Dying Animation
		Enemy Animations  ( class )
			Walk Animation
			Dying Animation
		Bomb Animations  ( class )
			Ticking Animation
			Exploding Animation
	Scene ( Package )
		Level1 ( class)
		Level2 ( class)
		LevelN ( class)
		Curentscene  ( class )
	Renderer  ( class )

  Resources  ( Folder )
	Images ( Folder ) 
	Sound  ( Folder )

Please provide your feedback

Update: Changed to exploding animation , also added multiple classes for vairous levels.

EventHandler

I've been thinking over EventHandler for input.

If the make it more generic like my proposed PR, we run into the problem of implementing KeyPressed and KeyReleased (KeyIsPressed is fine, though).

Maybe we could, inside @ashish2199 suggest update() for the whole game, put for 1 update loop which keys were pressed and which were released, then wipe them in the next loop. Each entity can then watch those lists to events that need KeyPressed (like placing a bomb).

Eg:

class keyReleaseHanlder implements javafx.event.EventHandler<KeyEvent>{

    public keyReleaseHanlder() {
    }
    @Override
    public void handle(KeyEvent evt) {
        System.out.println("The key released is : "+evt.getText()+" with keycode "+evt.getCode().getName());

        String code = evt.getCode().toString();

        if ( EventHandler.input.contains(code) ) {
        	EventHandler.input.remove( code );
                EventHandler.RELEASED_KEYS.add( code );
        }
    }
}

class keyPressedHandler implements javafx.event.EventHandler<KeyEvent>{
    @Override
    public void handle(KeyEvent evt) {
        System.out.println("The key pressed is : "+evt.getText()+" with keycode "+evt.getCode().getName());

        String code = evt.getCode().toString();

        //https://gamedevelopment.tutsplus.com/tutorials/introduction-to-javafx-for-game-development--cms-23835
        // only add once... prevent duplicates
        if ( !EventHandler.input.contains(code) ) {
        	EventHandler.input.add( code );
                EventHandler.PRESSED_KEYS.add( code);
        }

    }

and at the END of hypothetical update() loop (after all entities have run their update()'s, just

EventHandler.PRESSED_KEYS.clear()
EventHandler.RELEASED_KEYS.clear()

Thoughts?

Changes to Sprite classs

@ashish2199 you've changed the Renderer to need to take a player, rather than how I had it set up using the Sprites X and Y. This makes no sense at all to me. The way I had it, it was generic. Every sprite could be assigned a position. Now the renderer is hugely dependant on the Player class.

Can you explain these changes?

Did you also want to submit pull requests for major changes, just so we can all discuss them? I'm unsure of the mentality for this project. IE, is it a total group effort. Or is it more a project that you own, and we are contributing too?

Thanks
Corey

Initial Project Discussion

Please discuss about what we are going to make ?

I have 3 things in mind

  • A clone of any classic game like bomberman game. We can include features like in built chat , saving game state ect.
  • A desktop app in JavaFX that downloads IMDB rating for a movies and TV shows. In general bring various information about the movies and shows in a folder.
  • A chat client with ability to send and receive files. Something that facilitates discussion on topics. Some other features which I cant think of yet.

Please suggest any other new Ideas you have,Also vote for the projects suggested by using the +1 emoji.
Provide your feedback on any other thing you want us to discuss.

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.