Giter Site home page Giter Site logo

mrstahlfelge / lightblocks Goto Github PK

View Code? Open in Web Editor NEW
121.0 7.0 15.0 34.42 MB

Falling Lightblocks. Falling block game for Android (Mobile and TV), iOS, Web browsers. Works on desktops, too.

Home Page: https://www.golfgl.de/lightblocks/

License: Other

OpenEdge ABL 0.36% Java 99.46% HTML 0.11% CSS 0.07% Procfile 0.01%
libgdx game

lightblocks's Introduction

Falling Lightblocks

Logo

Falling block game for Android (Mobile and TV), iOS, Web browsers. Works on desktops, too.

ko-fi

Try it

Falling Lightblocks is available on itch, GameJolt and the usual mobile app stores. Visit its website for the links.

Build it

Compile desktop, android and gwt

The game is implemented with libGDX. Follow the docs to get it to work.

License

  • The assets in android/assets/ are licensed for your personal use only. You may not redistribute them.
  • Source code files and everything else in this repo is licensed under Apache License 2.0

The intention behind this is to:

  • allow building own versions of this game for your personal use, to tweak it and try things out, and to contribute to the project
  • allow extending the game and release an own increment of this game with another look and feel
  • allow using parts of this project's source code for your own projects of any kind
  • prevent indistinguishable clones of this game

Contribute

Contributions are welcome: bug fixes, enhancements, translations, opening issues etc.

Translations

There's a single resource bundle file with all strings to be localized. Use it as a template for a new file strings_XX.properties with XX being the ISO language code. Please be aware that Falling Lightblocks can (so far) only display Latin based characters.

Enhancements

Please be aware that Falling Lightblocks is designed with certain design principles in mind, so if you plan to make some more efforts, please open an issue to check if your ideas will fit the game.

Some principles the game and its evolvement is based on:

  • Features must work on every targeted platform (HTML!) and device
  • Features must work with every supported input device (touch, controller, keyboard)
  • Changes must not affect scoring of existing game modes
  • Falling Lightblocks means classic gameplay, though it is okay if some game modes are guideline

For everyone viewing the source code: Sorry for all the German comments and commit messages that will make it more difficult for you. I didn't plan to open the source from the beginning, and I tend to write notes for myself in my native tongue.

Server

To set up a multiplayer server with a vserver, you can deploy to Heroku or dokku with

 git subtree push --prefix server remotename master

For local play or other setups, you can build a jar file with

 gradlew server:build

OpenJDK8 for building and using recommended.

lightblocks's People

Contributors

mrstahlfelge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lightblocks's Issues

Connection problem on MacOS

When trying to link an existing profile or set a new nickname on the desktop build on MacOS, I keep getting a connection error dialog.
I'm sure my internet connection is active because I'm able to connect to the public servers.

Add different controls for game vs menu and also allow duplicate button mapping.

I am trying to use this with a game pad and it really is not working - if it works in the menu, it doesn't work in the game, and vice versa. My preferred control setup on an Xbox one Controller is
In game:
Up and down dpad to rotate
Left and right dpad to move
A button to soft drop
B to hard drop
Pause to pause.
In menu:
Up and down dpad to go ip and down
Left and right to go left and right
A to accept choose
B to go back

As it is, this is impossible to config properly with the current state.

High-speed friendly input system needed (level 19+)

Currently there seems to be no comfortable input system that is compatible with speeds of level 19 and higher, for touch input. The joystick or D-pad simulator cannot be long-pressed for quick reactions, since it takes about half a second for it to stick, and tapping really fast is unreliable for touch screens.

The best way I have found so far is the on-screen-buttons setting, in landscape mode (so the buttons are very large), and then tapping with multiple fingers to trigger left or right movement multiple times at once. This works, but requires an awkward, uncomfortable position for the fingers and a surface to put the device on; not good for a game one would play to relax.

I suggest adding input methods to make playing at high speeds comfortable. The most non-intrusive way to do this would just be to have a toggle that makes it so that long pressing the left or right button instantly sets the piece moving multiple cells (instead of waiting for half a second first). Another way could be to make it possible to press both left and right buttons at once which stops the piece from moving, and one would simply let go one of the buttons to have the piece move the other way at speed.

The best IMO (but most intrusive I think) way would simply be a new input mode with ten buttons on the right (to instantly teleport the piece however-many steps left or right), and three buttons on the left (to rotate left, right or double), so every move can be made with one tap on each button set. I am currently working on this for my own personal use. The ten buttons might be better placed below the game screen, in line with the columns - I'll have to experiment a bit to find out which is more comfortable.

Of course, the likely best method would be somewhere between those two extremes

Remove black bars for devices with cutouts

When using a custom theme with an own background, black bars are drawn on devices with cutouts instead of using the full space.
This does not affect the default game theme (because it is black at all).

Two SRS I piece wall kicks are incorrect

Two SRS wall kicks for the I tetromino have the wrong signs. The line numbers below are the same for the core directory and the server directory.

Line 265 should be wallkickPos.x = wallkickPos.x - 2;
This corresponds to test 4 for 0->R and L->2.

Line 269 should be wallkickPos.x = wallkickPos.x + 2;
This corresponds to test 4 for R->0 and 2->L.

Leaderboard player strength: Mode to show player centered

Leaderboard for turn based battle mode shows the players with the highest strength. For users with a Lightblocks account, it should be possible to switch to a player centered view, so other players of similar strength can be seen and challenged.

Add vibration support

There should be configurable vibration support both for touch input and for game controllers.

Different vibration length should be available for:

  • every touch input (haptic feedback)
  • block drop
  • line clear
  • special line clear
  • garbage
  • motivations like level up, won/game over, now send lines to...

Further suggestions appreciated.

Change haptic feedback length to Android system default.

As different (Android) devices have different quality haptic motors, they also have different optimum haptic feedback length.

For my Pixel 3a, which has a very good motor for example, the default length is 10ms and that feels much better than the 20ms the game is set to now. Subjectively a shorter feedback feels snappy and bouncy, like a key press, where a longer one will feel buzzy.

One option is to make it user adjustable, but another is to use the (Android's) system default haptic feedback length, which I believe is set by the manufacturer and so should be optimum for the haptic motor installed on the device.

Can we have the option to start from level 18?

I'm not sure why this is only available in practice mode - I'm suspecting it is to balance out the scoring based on skill a bit more. But there is an easy way to do this - make the scoring just as in the level 9 start, but make the speed level 18. Since level 18 speed is the same as holding the down button, one way to achieve this could be to have a down button set toggle - where you can set it to be always held and thus always have level 18 speed at least

Update to libgdx 1.9.11

Libgdx 1.9.11 was released, the project should adapt it.

LightblocksGame.setScreenDeadZones can be removed and the new getSafeAreaInset API can be used instead afterwards.

Can't link from gamejolt.net to a public profile created on Android

Hi,

I am on the gamejolt.net instance and try to link to an already existing public profile that has been previously created on Android. I type my alias and the correct recovery email but it would not work and it says they are not matching. I checked in my google account settings and the recovery email that I typed is the good one.

I am not sure though if this is really a bug or maybe the dialog is only misleading - could you confirme that the expected information are the game's internal alias and the email is my google recovery one (the account has been created via google play store)?

Thx!

No modern type in marathon mode

There's no modern type for the single-player marathon.
This makes it impossible to play an endless game with wall-kicks as its not supported by the available classic and retro modes.

Modern mode in local offline multiplayer

It really annoys me that there is a modern mode for multiplayer in same device but not in local offline( for 2 devices using hotspot or same wifi)
Other than that there are no problems

"Rematch" button is missing when no turn has been played

This is more a change request than a bug report: in multiplayer, when no turn has been played and the time is up, there is no "Rematch" button. It would be handy to have it, otherwise you have to scroll down to find another match against that person or search for her/his by typing the pseudonym (and I have a friend that has a crazy pseudonym that looks like a WIFI password...).

Thank you for your work!

Discord and Twitter in public profile

Players should be able to add their Discord and Twitter handle to the public profile. Tap on these handles links to the service. This way, players could contact each other.

Typing character "@" in "Set recovery e-mail" dialog sends the form

Hi,

this is occuring on the gamejolt.net instance. Entering the "@" character in "Set recovery e-mail" dialog automatically sends the form as if I typed the return key or pressed "OK".

Workaround: I can set the email by writing it first without the "@" character and add it at last.

Turn based battle: Statistics for certain opponent

Show a statistic about the challenges with the player you are playing against

  • how many lines were sent per turn on average, something like
  • how many games have been played and win ratio

Open questions

Where could this be shown?

  • Profile page of the other player?
  • Second page on the leaderboard screen listing opponents?

How long should the data be saved? For what opponents it should be shown?

  • Should the backend delete the data for opponents you didn't play against for a very long time?
  • Should the stats only be shown for regular opponents? Or for "friends"? (That don't exist yet)

Data model (backend)

New table on the backend pvp_stats
columns: player1, player2, win1, win2, count, lines_sent1, lines_sent2, last_match

Don't make player plays his/her turn when he/she is already certain to win TB battle

When playing a TB battle against somebody who dropped out, it is sometimes 100% sure that you will win even if you have played less turns than your opponent (because you already have more points at turn x than him/her as he/she died at turn x + 1).

In that case, I suggest to end the match and makes you win without having to play the turn x + 1. I don't see any reason to play that turn, but to see if the opponent sent you some lines, which has IMHO a very limited interest.

iOS keyboard support

Since iOS 13.5, Apple supports apps to get all keyboard events. Lightblocks should handle these events like on other platforms.

Attention: iCade support and relies on some fake key presses, needs to be checked when the change is made.

Split screen mode in landscape

When more input devices are connected, a local multiplayer mode with a splitscreen could be offered in landscape. The feature is most senseful on TVs, Chromebooks and tablets and with more than one controller connected. But it is useful for revamping the real time multiplayer, too.

There are some problems to solve for this:

  • Playscreen can only show a single playfield and it is not encapsulated from the screen code so far
  • Game cannot distinguish between different input methods so far
  • There must be a way to assign players to certain inputs.
  • There has to be a second player mapping for keyboard input -> might be added later

8bitdo zero 2 dpad works in setup, not in game on iOS

The 8bitdo zero 2 in MacOS mode shows up to iOS as a Dualshock 4 controller. The d-pad cross is sent to the OS as 8 input directions for the analog stick. I tested this with an app from the app store.

During controller setup, when the inputs for right & down are requested, the inputs from the d-pad for right & down are recognized. However, once in game the directional controls are totally absent.

The chosen button presses for spins, hard drop, etc all work as configured.

iPhone XS Max MT622LL/A on 14.2, Falling Lightbricks 1.5.2009.

Let me know if I can help in some way. This was the first game I tested & am most excited to play with my new mini controller.

Android version gesture navigation landscape issue

I just switched my phone to a Pixel 5 which uses Android 11's "navigation gestures" instead of a home and back buttons. This option is represented as a long "pill" (it's just a long visible line) right at the bottom of the screen. When you swipe up from the bottom of the screen it goes home.

When I'm playing, in particular in landscape mode, this behavior constantly interferes with my input to the game. I'm honestly not sure if there is a solution. Because I'd like the home gesture disabled but the back gesture is needed to pause the game and go back through there menus. The issue is bad it enough that the game isn't really playable competitively anymore for me, I've been playing and supporting for a few years now on Android.

Issue collection new server multiplayer mode - 1.5.2104

  • Landscape mode for on screen gamepad and on screen buttons is distorted. Own gameboard must be centered
  • Achievements for multiplayer should be granted for server multiplayer (Complete turnaround)
  • Total scores should be added up
  • Warning for slow connection should be improved (blinking with a warning, no dialog)
  • Portrait mode: Opponent's name and his gameboard is hidden, so we need to bring back the highness level and opponent names level under the score
  • Music should only play when game runs. Stop when game is ended and restart when new one starts
  • Android: player leaves app without closing server connection -> connection should be closed after some seconds by client and server

tvOS Version?

Hello!
A really great game, thank you!

Is a Apple TV Version on the way?
with a controller on my couch would be great! :-)

Issue collection new server multiplayer mode

  • Think what to do with Mega Multiplayer and Friendly Multiplayer achievements
  • Multiplayer server should report completed matches (winner and stats) to backend server, so we can have a leader board like
  • Show server stats in lobby screen (currently active players, ....)
  • Improve server list: Save last connected server, save connection speed to order the list, save list and don't request it every time

Some server multiplayer mode issue

the currently attack table is:
single 0
double 1
triple 2
tetris 4
TSS 0
TSD 4
TST 4
PC 0?
B2B(no hold) 1
combo 0
use classic type with this table is ok, but not really with modern type
should change thing is:
TSS 2
TST 6
B2B 1, but work like MOF
PC 10
combo need to have attack bonus

Unable to change keybindings for bluetooth keyboard

When connecting a bluetooth keyboard to my phone, Falling Lightblocks recognizes the keyboard, but it doesn't show up in the controller config UI, and as a result, I can't change the keybindings.

Through some experimentation, I've found that the following keys work:

  • left/right to move pieces left and right
  • down for soft drop
  • up for hard drop
  • space for rotate

I'd like to set up for rotation and space for hard drop, but I'm unable to do that anywhere

Increase responsive area of virtual D pad

I prefer playing with the in-app D pad and often find that my taps fail to register because I accidentally tap too close to the center.
I'd like the area corresponding to each direction to increase so that tapping on an edge of the D pad or tapping close to the center will move the current lightblock.

Upgrade to libgdx 1.9.13

When upgraded, following can be changed:

  • Remove own GWT backend (hdpi on mobile, web audio)
  • Remove own iOS backend (keyboard events)
  • Add keyboard type for getTextInput calls
  • Remove resize code for GWT
  • Remove custom preventDefaultBehaviour on GWT and migrate to setCatchKey
  • Change Android Audio backend to async calls
  • Attention: getDensity is broken on iOS on 1.9.12
  • Use RoboVM 2.3.12

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.