A Pong clone made from scratch with Go and C using OpenGL 3.3

Go-Pong

A Pong video game clone made with Go lang and OpenGL 3.3 using C.

Gameplay

Offline

Key bindings are 'w' and 's' for the left player and 'up arrow' and 'down arrow' for the right player, score is kept in terminal (for now...)

Multiplayer

go-pong supports multiplayer by hosting a game and joining it, hosting can be performed by running ./go-pong -h <port> , and connecting to that host can be performed by running ./go-pong <ip:address:port> , control your player with up and down arrows.

Deployment

if you faced a problem when deploying go-pong server, remove import "C" and all the generated error from that action, build it, and run it on servers only (since offline and clients mode won't work without the C renderer)

Building

After installing the required dependencies, run go build, make sure your executable is in the same folder than contains the Shader folder.

Dependencies:

Roadmap

A real score board might be added in the future.

Contributions

Are welcome !

License

Under MIT, check License

Created with fuzzy kittens, with the help of RedDeadAlice

Owner
Mohammad Issawi
*Falling into The Rabbit Hole*
Mohammad Issawi
Similar Resources

📸 Clean your image folder using perceptual hashing and BK-trees using Go!

📸 Clean your image folder using perceptual hashing and BK-trees using Go!

Image Cleaner 🏞 🏞 ➡ 🏞 This tool can take your image gallery and create a new folder with image-alike-cluster folders. It uses a perceptual image ha

Oct 8, 2022

Go package for computer vision using OpenCV 4 and beyond.

Go package for computer vision using OpenCV 4 and beyond.

GoCV The GoCV package provides Go language bindings for the OpenCV 4 computer vision library. The GoCV package supports the latest releases of Go and

Jan 1, 2023

go-pix is a Go library for generating Pix transactions using Copy and Paste or QR codes. 💳 💰

go-pix is a Go library for generating Pix transactions using Copy and Paste or QR codes. 💳 💰

go-pix go-pix is a Go library for generating Pix transactions using Copy and Paste or QR codes.

Sep 12, 2022

Human-friendly Go module that builds and prints directory trees using ASCII art

Human-friendly Go module that builds and prints directory trees using ASCII art.

Oct 11, 2022

User programmable screen overlay using web technologies

User programmable screen overlay using web technologies

Topframe User programmable screen overlay using web technologies Display information and always-on-top widgets Use HTML/JS/CSS to draw on your screen

Dec 29, 2022

🔍 gowitness - a golang, web screenshot utility using Chrome Headless

🔍 gowitness A golang, web screenshot utility using Chrome Headless. introduction gowitness is a website screenshot utility written in Golang, that us

Jan 9, 2023

Convert images to computer generated art using delaunay triangulation.

Convert images to computer generated art using delaunay triangulation.

▲ Triangle is a tool for generating triangulated image using delaunay triangulation. It takes a source image and converts it to an abstract image comp

Dec 29, 2022

Create a cool glass-like pattern using Voronoi cells

Create a cool glass-like pattern using Voronoi cells

voronoi-glass Have you ever looked through a shower door made of intentionally uneven glass? Everything looks distorted, but maybe also beautiful. Now

Jul 21, 2022

Simple image compression using SVD

SVD image compression An implementation image compression using SVD decomposition on Go Built With Go 1.17 Gonum Compression examples Header Image Ori

Mar 30, 2022
Comments
  • Question Regarding Design Philosophy

    Question Regarding Design Philosophy

    Hello,

    Thanks for sharing this repo. I am hoping to learn some basic rendering stuff for our upcoming children's educational game. I was hoping if you can give a little more details regarding your choices for this code design principle you have taken. To be more clear, that are golang bindings for vulkan, glfw, and etc. but I see that you choose to write your renderer code in native C and the game logic in Golang. Why is that?

    I was thinking of creating a more updated Golang binding for many of the C libraries that are of interest to me, but that requires using CGO, and at the moment, every golang binding packages seem to be "hacked" together and it seems Golang's support for C is not really that great as one would initially think. Hence, I am still debating if I should learn C and write the renderer in C as you have done, or attempt to create my own Go-bindings for vulkan, glm, gflw, and other C libraries.

    Please suggest and share your thoughts. Thanks!

Canvas is a Go drawing library based on OpenGL or using software rendering that is very similar to the HTML5 canvas API
Canvas is a Go drawing library based on OpenGL or using software rendering that is very similar to the HTML5 canvas API

Go canvas Canvas is a pure Go library that provides drawing functionality as similar as possible to the HTML5 canvas API. It has nothing to do with HT

Jan 3, 2023
Go cross-platform glfw library for creating an OpenGL context and receiving events.

glfw Package glfw experimentally provides a glfw-like API with desktop (via glfw) and browser (via HTML5 canvas) backends. It is used for creating a G

Sep 27, 2022
Quake 2 Level Renderer written in Go and OpenGL
Quake 2 Level Renderer written in Go and OpenGL

go-quake2 Quake 2 Map Renderer written in Go and OpenGL. Features Loads any BSP file from Quake 2 Free roam around the environment Renders only a smal

Jan 4, 2023
golang OpenGL helper functions

glh: golang OpenGL helpers This package contains a number of functions useful for applications using OpenGL. Code Reference Features Textures and Text

Apr 8, 2022
Go bindings for OpenGL (generated via glow)

gl This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow. Features: Go functions that mirror the C specific

Dec 12, 2022
Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Aug 18, 2018
OpenGL binding generator for Go

GoGL GoGL is an OpenGL binding generator for Go. No external dependencies like GLEW are needed. Install the OpenGL bindings For example, OpenGL 2.1 bi

Dec 25, 2022
Go cross-platform OpenGL bindings.

gl Package gl is a Go cross-platform binding for OpenGL, with an OpenGL ES 2-like API. It supports: macOS, Linux and Windows via OpenGL 2.1 backend, i

Nov 21, 2022
OpenGL renderer

oglr About oglr is a package for Go to load OpenGL functions and render graphics. It is published on https://github.com/vbsw/oglr. Copyright Copyright

Jun 21, 2022
🛰️ Clone all your starred GitHub repos

solar ??️ Clone all your starred GitHub repos solar ❓ What is solar? ?? Install ?? macOS ??️ Linux and Windows ?? Commands ??️ solar download ?? Contr

Dec 23, 2022