Giter Site home page Giter Site logo

reid-moffat / battleship Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 89.23 MB

A C++ and SFML GUI game created for a team Software Development course project

License: MIT License

CMake 3.01% C++ 93.41% CSS 2.14% JavaScript 0.92% GLSL 0.52%
battleship battleship-game clean-architecture clean-code code-standards cpp sfml sfml-game

battleship's Introduction

Hi ๐Ÿ‘‹

I'm a Software Developer focusing on API development with clean, concise and clear code. Feel free to connect with me on Linkedin for project collaboration!

My projects

๐Ÿค = Team project

My skills

Core:

Tools:

Backend:

Frontend:

battleship's People

Contributors

imgbotapp avatar reid-moffat avatar

Stargazers

 avatar

Watchers

 avatar

battleship's Issues

Set up workflow for testing

Since SFML has been added to the project itself, set up a workflow that tests building the project with each push

Move SFML textures and sprites to resource managers

Each screen should have one resource manager for sprites and textures instead of a field for every sprite/texture

They will be initialized in the screen's constructor and a reference to each texture/sprite can be obtained. It will also handle errors such as not finding the file

Refactor repo structure

  • Move the build location to bin/ (gitignore this)
  • Move header files from include -> src (make sure to refactor so all the include statements don't need to be manually done)
  • Re-organize the screens directory into actual screens and top-level helper classes (state, screen template, screen manager)
  • Add SFML to include/
  • Refactor tests -> test

Add smart pointers to all screens

  • All screen instances are replaced with std::unique_ptr<> and their getInstance() method is updated to instance.reset(new typename)
  • The remaining member variables are changed to smart pointers

Change screens to singletons

The static class methods are not efficient or a good style

  • Each screen should be a singleton
  • screenLists in screenManager will hold references to them (from getInstance())
  • Each screen will still have a public run() method

Condense SFML objects into data structures

gameplay.cpp especially has a lot of bloated code from manually loading everything. For every class, move SFML objects (textures, sprites, etc) into data structures such as maps

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.