I try to make games. I try to help on Fedora Linux.
torbuntu / leikr Goto Github PK
View Code? Open in Web Editor NEWLeikr Game System. Make Games in Groovy
Home Page: https://torbuntu.itch.io/leikr
License: Apache License 2.0
Leikr Game System. Make Games in Groovy
Home Page: https://torbuntu.itch.io/leikr
License: Apache License 2.0
I try to make games. I try to help on Fedora Linux.
Can we get a getPixel(x,y)
method? Framebuffer tricks work well when we can sample other pixels on-screen.
Leikr is unable to display sprites without a program.properties
file (even a blank one). Adding even a blank program.properties
file allows sprite display to work.
See attached project setup for an example.
LeikrShooter.zip
Is your feature request related to a problem? Please describe.
Some programs would benefit from the user being able to send information from the in-leikr terminal. (IE, the user could change certain constants in a simulation from the terminal)
Describe the solution you'd like
create
ought to take a string array parameter consisting of every (whitespace delimited) command line argument. This is the way it is done on a lot of systems and in a lot of languages (C and Java come to mind) so it will be a very familiar solution to most programmers. This way if I run example hello
then leikr programs will be empowered to know the user sent hello
as the first command line argument
I'm able to call setColor(10,10,10)
but all draw calls require a palette entry. Is setColor()
needed anymore?
After pausing and confirming to exit to terminal, Leikr will drop to a blank screen on GameShell.
In the terminal there is notice some missing native lib linkage for Jamepad pointing to Raspberry Pi CPU specific libs.
This may require building directly on the GameShell.
Would it be possible to get a screen recorder, either to .mp4 or .gif? I currently capture the window with third-party software to show off my Leikr programs, but it would be great to have a simple hotkey.
The ordering and method of passing parameters of some methods are inconsistent with each other.
drawPixel() - color, x, y
drawString() - text, x, y, color
Is your feature request related to a problem? Please describe.
getPixel()
returns an indexed color. While that's nice, it doesn't let me do more advanced sampling-based pixel manipulation.
Describe the solution you'd like
getPixel()
should return an RGB string, or an object with discrete R, G, and B values.
Describe alternatives you've considered
getPixel()
could also return the closest color to the sampled value, but restricting getPixel()
where other methods are not restricted is inconsistent.
None of the asset directories should be required to run a Leikr program.
When creating a program with the new
console command, using ProgramName
should result in:
class ProgramName extends leikr.Engine {
void create(){
}
void update(float delta){
}
void render(){
}
}
Instead, NewProgram
is still the default:
class NewProgram extends leikr.Engine {
void create(){
}
void update(float delta){
}
void render(){
}
}
Changing the class to the actual program name should reduce new program friction.
In the terminal view there should be a wiki command (with option parameter for page) which will open the host browser and navigate to the Leikr wiki.
The drawPixel
function takes an index as a color argument, but many of the other methods take a color via setColor
which allows for RGB strings of arbitrary values, and some (drawString
) take either indexed or RGB string and do not use the setColor
method.
Solution: Either add more overrides to other drawing methods, or use setColor()
for all color input.
The current program.properties files don't do anything with a lot of the detail information (such as about, players, author etc...)
It would make sense to have a terminal command 'about [game]' that displays that information. This way folks can read the description info before running a game.
Is your feature request related to a problem? Please describe.
Though Leikr can scale to arbitrary sizes, I would like to switch between (or snap to) a different resolution that draws pixels at a fixed ratio, like 1:1, 2:1, the original 3:1, and so on.
Describe the solution you'd like
I would like a hotkey to switch between fixed pixel ratios. Perhaps something like Ctrl+1
, Ctrl+2
for 1:1 and 2:1 aspect ratios, respectively. It is assumed that Leikr running on Raspberry Pi would be already fixed at 1:1.
Describe alternatives you've considered
I considered using extra buttons on gamepads to open a sort-of hypervisor screen to manage screen settings and other things for Leikr, but the specs are fixed on controllers already, and users using actual SNES-like pads will have no system-supported option. Besides, any console-like environment will likely already have its scaling ratio pre-set.
Additional context
Add any other context or screenshots about the feature request here.
It would be handy to have a terminal command to either display the running Workspace directory so users can find it, or better yet to even open the workspace in the Host file manager program.
Describe the bug
When initializing a new program with new ProgramName
, then ProgramName is not available in the run list without running ls
.
To Reproduce
Steps to reproduce the behavior:
new ProgramName
ls
Expected behavior
Leikr should know about my program as soon as it creates the folder, since it is doing so internally. I understand the triviality of this request.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
If I say load ProgramName
in Leikr, and that program was created while Leikr is running, that program is not usable until I restart Leikr and I get the error message "Program [ProgramName] does not exist in Programs directory"
Conversely, I do not need to load
a program to have it updated after editing; I can simply exit the program and call run
over and over to see changes. The program does not seem to be held in memory separate from disk.
Describe the bug
When exporting a gif, the gif's framerate does not actually match the display framerate. This may be a desirable effect in certain scenarios, however.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'm not sure if this is actually a bug, but maybe a toggle to capture actual vs. "smooth" framerate
When using the built-in drawRect(), I get this:
I would expect it to look like this:
This is most likely due to pixel boundary alignment on line segment endpoints. This might be another case for replacing the built-in draw calls.
Here is the code implementing pixel-perfect rectangles in Groovy:
void drawPixelRect(int x, int y, int width, int height, int color) {
for (def i in x..x+width) {
drawPixel(color, i, y)
drawPixel(color, i, y+height)
}
for (def i in y..y+height) {
drawPixel(color, x, i)
drawPixel(color, x+width, i)
}
}
Describe the bug
I get a 2px wide "cursor" placed approximately at my mouse's position. I say "approximately" because it seems to be offset a couple pixels in the positive x
and y
directions.
To Reproduce
Steps to reproduce the behavior:
class CursorDemo extends leikr.Engine {
void render() {
bgColor(1)
}
}
Expected behavior
Mouse position would not be visible unless explicitly tying something to mouseX()
and mouseY()
.
Desktop (please complete the following information):
Describe the bug
On the GameShell audio is unable to work due to missing OpenAL.
To Reproduce
Launch Leikr on GameShell from ssh to view logs
export DISPLAY=:0
./Leikr
Expected behavior
Audio initializes and no error.
Desktop (please complete the following information):
Additional context
This may be a simple fix by finding a way to download/install OpenAl on the GameShell, if it doesn't have it already. I know on the Raspberry Pi I have to do this as well for audio to work.
Describe the bug
When selecting a sprite index that does not exist (possibly because I used the wrong sprite size), Leikr gives the very general error: Error in program 'render' method. null
To Reproduce
Steps to reproduce the behavior:
sprite()
with an invalid index id (try sprite(32, 0, 0, 1)
)Expected behavior
A clearer error message, something like "Sprite index out of bounds"
Is your feature request related to a problem? Please describe.
The current generator for javadocs leaves the javadoc pages under the URL:
https://torbuntu.github.io/Leikr/docs/index.html
but is not a big deal, but it leave some issues with how pages are set up.
Describe the solution you'd like
I'd like to have a clean gh-pages branch with only the documentation and site related pages on it. All the code should remain on the proper master branch.
I'd like everything in the gh-pages branch to be the documentation website, and everything under the master branch for regular project code.
Describe the bug
When running install [package-name]
on Linux with a lkr
package exported from Windows the project loses all directory data, and the paths are just the names.
Example, instead of a directory Code/Game.groovy
the name itself is Code\Game.groovy
To Reproduce
lkr
package in the Packages
directory, try running install [package-name]
Expected behavior
All Leikr packages should be exportable and installable from any supported host operating systems. Linux to Windows and back.
Desktop (please complete the following information):
Additional context
File paths should not be affected by the zip process like this. Zipped directories should be "universal".
Describe the bug
When I specify the file extension for a texture, Leikr automatically appends .png
to the filename. If I use a jpeg or add .png
to the texture filename myself, it is still appended with .png
.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
If I enter a file extension, Leikr should load that regardless of type (provided it's a supported image type). If extensionless behavior is desired, Leikr should default to PNG and appending the extension only when the extension is not specified.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
When calling drawMap()
without first having called loadMap
, Leikr gives the error Error in program 'render' method: null
.
To Reproduce
Steps to reproduce the behavior:
drawMap()
call into the render()
method of a new programExpected behavior
An error like drawMap: No map loaded.
or something to indicate the call causing the error and the reason why.
While I'm sure they appreciate the free press, the wiki and readme have this information spelled out. I think it breaks the "console" immersion a bit if the startup of the system shows a graphic that's not the same resolution.
Solution: Either drop the Mini2Dx logo, or alter it to be in-line with Leikr's graphics specifications (more pixelated and conforming to the palette).
There is currently no built in circle drawing implementation.
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.