Giter Club home page Giter Club logo

test_game's Introduction

To run, build project by running make which produces executable. Because I have a custom location for my sfml library, i need to set it by running export LD_LIBRARY_PATH=/usr/local/lib.

Goal : Try to come up with game engine without referring to existing game engine code.

TODO

  • Draw Window to screen
  • Draw Square to screen
  • Use user input to make square move
  • Collision Detection
    • Basic
    • Fix Bugs
  • Draw TileMap
    • Add texture to TileMap
  • Allow character to move to other parts of Map

DAY 1

Finding a library to provide API to draw stuff to screen

Options

LibX11 - Archiac Directly Interfacing with OpenGL -> too involved GLFW SFML - Simplier, more community support

Day 2

Abstract out and create character

  • Created character
  • Created tilemap

need to do collision detection.

Day 3

Very basic collision detection algorithm. Using the library's globalbounds object after each movement we check whether the movement will cause 2 opaque objects to intersect. If intersect we reverse this movement.

Day 4

Refactored code alittle + added some texture for background

Day 5

Aim : Allow character to explore other areas of map.

Currently map fits screen just nice, but in reality maps will be much larger then screen. viewpoint should update automatically when character moves past certain boundaries.

solutions:

  1. when character "moves", the world moves instead, keeping character as center piece.
    • Easier to implement.
    • More work to be done to properly seperate concerns (Map will now need to know that character exists)
  2. create a cameraview abstraction which contains the current x,y position of the camera and the size of the camera view.
    • More flexible.

Solving the external / internal linkage problem on tiles.h https://stackoverflow.com/questions/73448068/why-can-i-include-non-primitive-variables-in-my-header-files-without-running-int

test_game's People

Contributors

nopenotj avatar

Watchers

 avatar

test_game's Issues

Allow character to explore other parts of the map

Aim : Allow character to explore other areas of map.

Currently map fits screen just nice, but in reality maps will be much larger then screen. viewpoint should update automatically when character moves past certain boundaries.

solutions:

  1. when character "moves", the world moves instead, keeping character as center piece.
    • Easier to implement.
    • but what happens if character hits edge of map
  2. create a cameraview abstraction which contains the current x,y position of the camera and the size of the camera view.
    • More flexible.

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.