Code Monkey home page Code Monkey logo

pong-rs's Introduction

Pong

Implementation of the ubiquitous Pong arcade game as part of the 100 days of code challenge #100DaysOfCode.

Development Log

Days: 1, 2, 3,

Day 1

This is the first day of the #100DaysOfCode challenge. Today I setup the project's repository and made an initial commit with some basic additions to the configuration file and code structure.

The first choice I had to make was what library to use to display the game and handle input. I decided against the famous bevy and favoured SDL2 because I already met SDL with PyGame.

Addendum

I was itching to present at least a blank window to myself so I typed the example from the SDL2 documentation. I added the config module to avoid magic constants in my code. Addidtional 20 minutes worth of coding today.

Notes:

  • On Windows add the SDL2 development libraries (*.lib) to %USERPROFILE%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib as well as the SDL2.dll to your project's root directory.
  • Use cargo doc --open to view your own crate's documentation as well as the documentation from any dependencies.

Day 2

My goal for the second day was to draw some stub graphics onto the screen. This goal was more or less reached. Using SDL2 with Rust is a little bit more challenging than Python (PyGame). At least some green boxes appear on the screen.

Nonetheless I got more experienced in navigating the documentation.

Day 3

Fudged around the code without having a plan really. Tried things here and there and disposed almost every change. The reason might be because I didn't have any time to think about what to do next beforehand. In the last twenty minutes I decided to decouple the presentation and going to implement some math stuff - which I will continue on Day 4.

Conclusion: Don't start the computer without having a plan. Exhaustive days won't boost creativity.

pong-rs's People

Contributors

bwbg avatar

Watchers

 avatar

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.