jamesroutley / 24a2 Goto Github PK
View Code? Open in Web Editor NEWπ΅ An ultra-minimalist game engine
Home Page: https://24a2.routley.io/
License: MIT License
π΅ An ultra-minimalist game engine
Home Page: https://24a2.routley.io/
License: MIT License
I just finished my first game in the engine. It was a great experience (aside from Javascript headaches).
Do you have a supported channel for sharing the games?
While the concept (and the name!) are sticking to a 24x24 grid, which I guess is much part of the KISS, I still feel that allow custom size grids would be great.
From the features, thereβs evidence that the power of the library is not based as much on the small grid size as it is on the simple API.
24a2 uses of P5.js to draw things. It uses a very small subset of P5 features, so it seems wasteful to require users to load it. Users also shouldn't have to know about P5 at all. Here are some unstructured thoughts
engine.js
Instead of always clearing with Color.Gray, maybe add a clearColor field to config that defaults to Color.Gray. This way user doesn't have to overwrite the colors manually.
var config = {
clearColor: Color.Black // Change clear color to black
}
For my game's layout I wanted to give its canvas some padding via CSS, but that caused the coordinate calculation in CanvasIOManager.prototype._listenForMouseClick to fail. I guess the result of getBoundingClientRect() includes the padding. Hopefully there is an easy fix.
While we're at it: there must be a more efficient way to find the correct dot than to iterate over all of them.
I'd be willing to fix this myself, if pull requests are appreciated.
We've had lots of requests for mobile support - let's work out how it could work.
First of all I wanted to say thanks for the awesome project π
It was really easy to get up and running and the tutorial was amazing!
As far as I can tell currently, the grid size is 24x24 and there's no way to configure that; are there any plans to allow the grid size to be configurable?
Happy to have a crack at implementing it, but I thought I'd get the maintainers thoughts before diving in π
My latest has a black background and I can't see how to change the text color so it shows. If we could pick from the list of standard colors that would be excellent.
Rewrote the tutorial game:
https://gist.github.com/kentbrew/505daac747aa17237dfd1bd2105510d9
... tried to work with onDotClicked
and hit a wall. It returns a number, which does not seem to correspond to a dot on the screen. Also, when you click the same dot twice in a row, nothing happens. Are there any examples for onDotClicked
?
The jsdelivr endpoint mentioned in the tutorial looks like an older release that doesn't include recent features found in the docs like defaultDotColor.
Seems like updating the tutorial link to the version-agnostic endpoint could save people some time and headache.
Hello there! I made a game called Helter Shelter based on the 24a2 engine and had a blast doing it. l am familiar with JavaScript but it isn't my main language, so it's nice being able to just focus on making something fun.
It can be played at https://tolbish.github.io/helter-shelter
You could add a list of games that people have made to the website or README.md or both so that they're more easily discoverable.
I'm currently working on a Space Invaders clone, playable at https://incoherency.co.uk/24invaders/ mostly works already, but I have a bit more graphics work to do.
And, for what it's worth, I love 24a2. It brings back the fun that got me into programming in the first place.
Hello, I have a TypeScript project, which I'm building with Parcel, and I cannot import the library using import
syntax.
Example:
import '24a2'
Error :
Cannot resolve dependency '24a2'.
It can be resolved by adding field "module": "build/engine.js"
to package.json
file.
After that, if I'm trying to import specific entity, for example import { Game } from '24a2';
, then Game
is undefined
.
I think Game
and other entities should be exported in source file.
I tried adding export, but after that compiler also required p5 import, as it considers this file a module now. So it would probably need some additional building tool for module bundling like webpack.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.