Giter Site home page Giter Site logo

open2jam's People

Contributors

chaosfox avatar dtinth avatar keigen-shu avatar mrcdk 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  avatar  avatar  avatar  avatar  avatar  avatar

open2jam's Issues

Release notes in autoplay lane

There are cases where a long note's release can end up in the autoplay lanes. Try playing Brahms(O2 Remix)+ on HX. You can hear the double keysounds just as if they were long notes. I guess it surfaced beause Beautiful Day was a lazy notecharter (and mixer) and the NoteTool was just recently upgraded then to support long notes and had this design error.

Fix:

else if (type == 3 && channel != Event.Channel.AUTO_PLAY) {
    event_list.add(new Event(channel, measure, position, value, Event.Flag.RELEASE, volume, pan));
}

NoteTypes for #Mxxx

The NoteType list is not complete.

0x00 - #W Normal
0x01 - Unused (#W Normal displayed in NoteTool)
0x02 - #W Hold
0x03 - #W Release
0x04 - #M Normal
0x05 - Unused (#M Hold displayed in NoteTool. Does not link with 0x06.)
0x06 - #M Hold
0x07 - #M Release
0x08 - same as 0x00 as in NoteTool and so on and so forth

OJN volume panning byte [facepalm]

[facepalm]. It took me months to figure this out. Here's the fix for it:

Proof: http://s12.postimage.org/3p6owfjq5/OJN.png

// Original
// float Vol = (volume_pan & 0xF) / 16f;
// float Pan = (volume_pan & 0xF0) >> 4;
float Vol = (float)((VolPan >> 4) & 0x0F); // higher half
float Pan = (float) (VolPan & 0x0F);       //  lower half

if (Vol == 0) Vol = 1.0f;
else Vol = (Vol / 16.0f);

if (Pan == 0) Pan = 0.0f;
else Pan = (Pan -  8.0f) / 8.0f;

EDIT: Here's the legend.

VolPan byte Legend
Value in Note Tool = Value in OJN File = Resultant Value

For Volume:
 1 = 0x10 =  1/16 MIN
 2 = 0x20 =  2/16
 3 = 0x30 =  3/16
 4 = 0x40 =  4/16
 5 = 0x50 =  5/16
 6 = 0x60 =  6/16
 7 = 0x70 =  7/16
 8 = 0x80 =  8/16
 9 = 0x90 =  9/16
10 = 0xA0 = 10/16
11 = 0xB0 = 11/16
12 = 0xC0 = 12/16
13 = 0xD0 = 13/16
14 = 0xE0 = 14/16
15 = 0xF0 = 15/16
16 = 0x00 = 16/16 MAX

For Panning:
     0x08 ---- unused. assume center.
 1 = 0x01 = 7L
 2 = 0x02 = 6L
 3 = 0x03 = 5L
 4 = 0x04 = 4L
 5 = 0x05 = 3L
 6 = 0x06 = 2L
 7 = 0x07 = 1L
 8 = 0x00 = 0C
 9 = 0x09 = 1R
10 = 0x0A = 2R
11 = 0x0B = 3R
12 = 0x0C = 4R
13 = 0x0D = 5R
14 = 0x0E = 6R
15 = 0x0F = 7R

Importing images from English Malaysian O2Jam Client

I'm working on porting images from the English Malaysian O2Jam client into the game. I've already exported all the images from the client and commited all 1289 of them to my repo. We should to stitch them together, preferably to alpha-channeled PNG files to save space and reduce the file count.

List of folders and items left in them that need stitching:

  • Common [Scripted & Done]
  • Fallback [6 left]
  • Jam_Effect [Scripted & Done]
  • Loading_BG [Done]
  • Note_CGBM [Scripted & Done]
  • Note_Click [Scripted & Done]
  • Note_Combo [Scripted & Done]
  • Note_ComboNum [Scripted & Done]
  • Playing_BG [6 left]

After this we need to implement some sort of config on the game for selecting the arena defined on the XML. I'm don't really know how to write stuff in Java so someone should work on this.

I also added a resource reference XML generated from a script.

Warning: HUGE COMMIT (14.88MB).

Re-implement lwjgl/OpenAL sound system.

Some time ago I changed this game to use Fmod Ex instead of OpenAL because of the too many keysound problems: Mac OS X supports only 1023 sounds loaded.

But Fmod Ex, when too many sounds are played at the same time, some keysounds go missing.

To further investigate this, I plan to re-implement the OpenAL sound system, as the sound system in Open2Jam can now be switched.

Can't assign different tap-keys

I compiled the game from source and i've realized that keys configuration can't be changed.

It asks to change the key, but after that nothing could be done, key was not changed, neither the window closes.
I had to hardcode my predefined assigned keys on source then I compiled it to accomplish it.

I'm using Mac OSX 10.7 with latest java version. I dunno what could be the problem so far :)

Playing multiple notes of same ID at the same time / Missed Note Hell

Issue 1:

When two or more notes of the same ID is hit at the same time, multiple sounds are generated, producing an over-amplified output. You can definitely hear it in Reincarnation (o2ma542.ojn).

My workaround to this problem was to create a class that manages audio processing. Whenever a previously activated sound is ordered to play, it would stop the previous sound and reset it.

Additional Info [28.Oct]: Remember that O2Media's music were rendered too loud. Even with this fix, they still sound VERY loud and clip everywhere. I'd recommend an output compressor to fix this but most free libraries don't have it. The simpler solution would be to set all note volume to half.


Issue 2:

When you miss a note on a hard chart it get's really hard to continue on because the keys are strapped to the earliest un-judged note (which you missed and it's now very deep below the target). Continuing on will result in lots of BADs and MISSes that frustrates players.

There are two solutions to this:

  • make misses happen within the distance between the two notes (simulate BMS invisible notes); or
  • when a key is hit, judge the note nearest to the target first.

Gui changes

In the branch gui_changes I will be uploading gui related changes.

Request Add avatar with jam combo and able to choose Background gameplay

I've downloaded the latest file uploaded in the O2jam Interface Group and I really like it especially you can set custom speed (e.g. 3.25) w/o experiencing the normal note bug
Just like what the title says I really would appeciate if those two features are added since I see it as an alternative for O2China if developed right
Also note guidelines is appreciated and there's that weird judgement timing it feels like I am playing O2Mania even when Vsync OFF and full screen (800x600)
Another thing the application hangs that I have to close and restart it when trying to play some songs (e.g. Unit.B (Ladymade Corestar remix), Last Remote type B, Silver Wind, etc)
WhatIsHang says
Remarks:

  • The program probably hangs because there is an infinite loop, very long loop, or recursive calls.

Strings found in the stack:
RAVAUh

Modules found in the stack:
nvoglv64.DLL , NVIDIA Corporation , NVIDIA Compatible OpenGL ICD, NVIDIA Compatible OpenGL ICD
jvm.dll , Oracle Corporation , Java(TM) Platform SE 8u73, Java HotSpot(TM) 64-Bit Server VM
KERNELBASE.dll , Microsoft Corporation , Microsoft® Windows® Operating System, Windows NT BASE API Client DLL
msvcr100.dll , Microsoft Corporation , Microsoft® Visual Studio® 2010, Microsoft® C Runtime Library

Request: Add Java 6 executable script for Mac OSX/macOS

New operating systems on macOS uses Java 8. In order to run open2jam on mac you need to install java6 sdk from Apple. After this it still wont open it with Java 6. So I decided to write this script that point it to default installation path of java6 jvm to launch open2jam.
note: script must be in same directory with .jar file.

#!/bin/bash
cd "$(dirname "$0")"
exec /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -jar open2jam.jar

krazyrain song converter

On the krazyrain_converter branch I'm working on a script (tools/snp2ojn.pl) that reads the SNP files of krazyrain and the MusicInfo.xml (that can be found inside Data/data.snp of the krazyrain installation) into ojn/ojm files.

So far, most of the musics convert without problems, except at some times the notes overlap their end with the start of another note, so I'm going to merge these kind of notes into one.
Example:
note x start 0 end 0.5
note x+1 start 0.5 end 1
result: note x start 0 end 1

Besides that, the next thing to be done is assign songids to each music so that o2jam and other emulator(o2mania) can also read these files without problems.

Display lag and audio latency - Some information and problems

First, i'd like to describe what display lag is. According to Wikipedia, display lag is "a phenomenon associated with some types of LCD displays, and nearly all types of HDTVs, that refers to latency, or lag measured by the difference between the time a signal is input into a display and the time it is shown by the display".

What does this mean? If your display has 30ms display lag, if you press a key to perform an action, assuming it is processed instantly by your computer, you'll see the action performed 30ms later.

It is usually in the 20-60ms range, which for regular games can be okay, but in music games is simply unacceptable. A lot of players usually adapt to the screen they are playing on, but you if start to get good, you will still notice the difference. Personally, I am used to play beatmaniaIIDX CS on my CRT television, and there's no way I can play LR2 on my laptop, just because it has a LED screen (unless I edit the ingame judge timing setting).

So, what we can do to compensate display lag for modern computers? Music games are a combination of eye-hand coordination and ear-hand coordination: if no display lag is present, displayed notes and background music are perfectly in-sync. Display lag introduces an offset between the two (shown notes are delayed in respect to background music), and i've thought of two solutions to at least reduce such offset:

  1. Delay the background music by the same amount of time of display lag;
  2. Anticipate shown notes by the same amount of time of display lag.

I personally opted for the second solution in my branch. Besides the obvious GameOptions entry, the only snippet of code that needs to be discussed is this:

// File Render.java, line 483
double y = getViewport() - velocity_integral(now, te.getTime() + 
                                              opt.getDisplayDelay(), channel);

which I believe is wrong as it is, because it changes the interval length for the integral, and we need to calculate current display lag pixel offset and not future. Let me try to explain. Let's say we are playing a song with a bpm of 150, with hi-speed 3.5. Display lag (in ms) converts to a certain value of an y offset in pixels, depending on both the bpm and hi-speed. Let's suppose we find ourselves we need to hit a note near a BPM change (let's say it drops to 75), near enough that the note still runs at 150 BPM, but the display lag would make it appear on the red bar after the BPM change has occurred. Since the velocity_integral() method knows where are bpm changes, if you compute that integral, you would calculate the display lag pixel offset for 75 BPM, and not for 150.

Display lag pixel offset should only depend on current hi-speed and bpm (channel bpm if we are taking into account the speed mod), and shouldn't rely on velocity_integral() like it actually does (yes, my shx_display branch had the same problem too).

Here's what I thought It could be done to properly implement display lag:

// File Render.java, line 483
double y = getViewport() - velocity_integral(now, te.getTime(), channel);

double factor = 1.0;

if (xr_speed)
{
     switch(channel)
     {
        case NOTE_1: factor += speed_xR_values.get(0); break;
        case NOTE_2: factor += speed_xR_values.get(1); break;
        case NOTE_3: factor += speed_xR_values.get(2); break;
        case NOTE_4: factor += speed_xR_values.get(3); break;
        case NOTE_5: factor += speed_xR_values.get(4); break;
        case NOTE_6: factor += speed_xR_values.get(5); break;
        case NOTE_7: factor += speed_xR_values.get(6); break;
    }
}

double y_offset = opt.getDisplayDelay() * factor * bpm * 0.8 * getViewport() /
                   BEATS_PER_MSEC;

e.setPos(e.getX(), y + y_offset);

This way the y-pos of the note should be lower than normal. If display lag is 30ms, it will be lower by an amount of pixels that the note covers at its current speed in 30ms. On a display without lag, the player would see the notes hit the red bar before he actually hears the bgm, but since we have lag, he would see the notes on the red bar on time with bgm.

The real issue here is determining what value is proper for display lag. This can be done with an in-game calibration feature, similar to stepmania 5 beta one, but that's not the purpose of this isssue.

I hope this cleared what I meant to do with display lag :)

get real time from key presses

Right now the time used for the key presses is the time we check them, there is a way to get the real time the key was pressed but to use it we have to change the current way we check for key presses to pooling the keyboard.

By pooling the keyboard we can get the real time the key was pressed and with that update the game state with these real times instead the time we checked which could have different spans of time depending on the player fps.

Reference: http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_2_(Input)

handle config class changes

When a serializable class definition is modified the serialVersionUID changes and with that when you try to de-serialize an object of an older version a java.io.InvalidClassException is thrown in Config.get(). That means the object is unusable and the config is lost.
Right now this happens when we change the GameOptions definition since it's the only custom class we serialize now. But it could happen with others on the future if we serialize them too.

Proposed solution:
Define a fixed serialVersionUID for custom serialized classes and every time the class is changed test the serialization, in case of incompatibility, increment the serialVersionUID, then on Config.get() catch the InvalidClassException, now when it happens it means there is no other way than to recreate the object with the default and save that.

Fix for longflare animation

Btw, if this already hasn't been fixed, a rather (IMO inelegent) workaround for the longflare animation can be achieved by keeping track of which entities are longflares ( i.e. add a public boolean isLongFlare to the Entity class, with default value as false. ) Then in the DistanceRenderer and TimeRenderer, immediately before these lines:

entities_matrix.add(ee);
Entity to_kill = longflare.put(ne.getChannel(),ee);
if(to_kill != null)to_kill.setDead(true);

add the line:

ee.isLongFlare = true;

Again in the Entity class,
add the following at the top:

import org.lwjgl.opengl.GL11;

and replace the draw function with:

if ( isLongFlare ){ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); }
sprite.draw(x,y, sprite.getScaleX(), sprite.getScaleY());
if ( isLongFlare ){ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); }

Bug in OJN Parser

There is a bug with the notes on certain charts like Xepher and Fantazindy(o2ma269400.ojn), in which exist a really large number of notes. After a certain point in time certain lanes just keep displaying a long note till the end of the song when the long note should have ended a long time ago. Basically, the long note doesn't end when its supposed to. It simply doesn't end.

I guess this bug's not so important cause no one really plays such charts, but you never know if this bug will surface in any human playable notecharts. I could send pictures if you give me a way to do so.

FYI: I am on a mac, with java 1.6.0_29 (I believe this is the latest available for mac at this time).

Fails to compile on master branch

The latest release compiles fine, but starting from commit 056557c there are issues present:

  1. "error: package org.jdesktop.beansbinding does not exist"
  2. "error: package org.jdesktop.layout does not exist"

Environment:
netbeans 11.3
jdk8-openjdk 8.u242

UPDATE:
I was able to compile the game by adding following libraries into my installation of NetBeans:

  1. BeansBinding, called it "beans-binding"
  2. swing-layout, called it "swing-layout"
    Please note that I can't verify legitimacy of these libraries and I'm not responsible for anything bad that can happen because of using them
    The question is, it required manual intervention, thus it should probably be added into readme

Badly implemented BMS parser

List of problems:

  • STOP doesn't work
  • Beat signature changes break the chart. The game is ignoring the size of the measure when reading notes.
  • Pressing Scratch while playing hangs the game.

cannot find build-impl.xml

hello, i try to compile with ANT apache on mac os..
after i installed ant, i tried to compile it on folder, and it says

BUILD FAILED
/Users/yoasfs/Desktop/work/open2jam/build.xml:12: Cannot find /Users/yoasfs/Desktop/work/open2jam/nbproject/build-impl.xml imported from /Users/yoasfs/Desktop/work/open2jam/build.xml

it seems build-impl.xml is missing from nbproject folder..
any ways to fix this?
thanks

Keyboard handling does not work on Mac

On Mac OS X, open2jam seems to not be able to handle any key presses, instead, the program freezes.

It does not crash, it just doesn't respond to user events anymore.

For example, when playing a song, the notes will drop just fine, but you can't press any keys. You can't close the window either. The same also happens on keyboard configuration screen, after you click on a row and a dialog box pops up, the app freezes too.

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.