Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - pizzadox9999

Pages: [1]
Java / [Question] Collaboration to update JSFML with JavaNativeRuntime
« on: December 27, 2022, 01:29:59 am »

I want ask for help on https://github.com/pizzadox9999/JSFML. This would be a more up to date version of JSFML. I don't want to hype anything up because of I'm not using JavaNativeInterface but the JavaNativeRuntime and it comes with it's on hurdles. What I uploaded is more a proof of concept and may evolve to an actuel port of SFML to java.
If this project is unwanted from the SFML devs, it will be removed immediately.
If anyone at all is reading this. :)

With best regards pizzadox9999

Hello :-),

Excuse:- first i hope that i hit a general problem and nothing special from the java bindings, if so i will move              .           - on.               
.           - Please dont judge.
.           - sorry for my english

Problem:- My problem is that, when i move my sprites over the screen (i got serveral sprites from an animation in an array (all sprites are solo pictures)) they do flicker. that means these sprites are a walking animation but i scale them every time the player moves or turn direction (it's an sidescroller). 1. i see a sprites where it belongs on the screen 2. i see a sprites which is huge (i think a the original scale) in the center of the screen. then it repeats
here i support the scaling line
a=is the for counter(should be clear)
animationState=stores an integer which says which animation is to player
targetSize.x=the screensize in horizontal way
player_s=is the 2d sprites array ([which animation][the animation itself] like a chart)
playerScaleX= an integer which gives a size how often the player char fits horizontal and vertical
            for (int a=0; a<Integer.valueOf(charANIM.getJSONObject("animation").getString(String.valueOf(animationState))); a++) {
              player_s[animationState][a].setScale(-(targetSize.x/player_s[animationState][a].getGlobalBounds().width/playerScaleX), targetSize.y/player_s[animationState][a].getGlobalBounds().height/playerScaleY);
here i support a video of my problem: https://streamable.com/mtkfrw

if you need more please ask
so on thank for your help
by pizzadox

Pages: [1]