(March 2019) Monthly WIP & Screenshot thread

15 Likes

Last weekend I spent all weekend fixing a handful of bugs in SimEthereal related to message splitting and large numbers of objects. To do this, I modified my MOSS test application to have tons of constantly spawning/despawning objects. This is the same test app with the support for ‘far large objects’.

Before I ripped out the sphere fountains used for stress testing, I decided to make a video:

Note how satisfying that ship looks falling in the background. Even though the land loads slower, you can see it hit and begin to topple slowly. To me, there is a real feeling of ‘massiveness’.

13 Likes

Not really a screenshot but something I stumbled upon. It describes how to generate random worlds like StarBound where if you keep going you end up back at the start. Or maybe creating a 3D world or asteroid or whatever and having it join seamlessly.

The basic premise is to “walk in a circle” with the noise - something I never really thought about, and is stupid simple when it’s pointed out.

Inspiring, nonetheless. Enjoy :slight_smile:

8 Likes

I’m working on a mobile game for Android devices. :smile:

For the people who developed in the past on Android, what is your approach for buttons and movement with them. When I use these buttons (to move left and right), they work very poorly and if you press them both the movement bugs out and the character goes one direction, even if told to go another way and the only way to stop this is to mash both buttons back and forth until fixed.

Obviously, I’m not using a proper technique for the buttons (they will be replaced) because I’m using a picture and rays on the guiNode to detect the buttons, so I should probably change it to something better. Any suggestions on what you used in your mobile games for movement with buttons?

3 Likes

Perhaps you could use the accelerometers ? tilt the phone to move

Or try swiping. Some other games in that genre use it and it works quite fine.

This sounds like you are not handling multitouch correctly and/or your ‘pressed’ state and then things are getting confused. Especially since you say you have to mash them a bunch to fix it
 that’s not JME’s problem, that’s a problem in your listener code.

Note: Lemur buttons automatically handle multitouch (as does the mouse/cursor listener support that the buttons are using). But even still, it wouldn’t fix a problem in your listener code.

Yeah, I was thinking about using Lemur. It will help get rid of one issue for the movement, so when I fix the issue with my movement, I’ll be ready to go. Thanks! :slight_smile:

Lemur also is modular, so if you want to use its input handling but not its widgets you just leave out the widget related artifacts. (I use Lemur’s lower-level code and styling API with my own widget library - it saves a ton of time.)

2 Likes

Ok, stay with me: Blender fluid sim > custom python script > json > jme3 > png > vertex shader = lightning fast animation and an interesting new pipeline to toy with :

blender on left (dah). The left of the JME window is a Picture: the generated png, or part of, vertical slices = time, horizonal slices = vertex position, simple right.

EDIT: forgot to say, with all the animation data available to the shader,in the form of the texture, sampling across the U space gives historical and future positional data, which could be used for velocity buffers ? motion blur, I dunno, but its there.

7 Likes

A small update on my first attempt at an online game. The next video may seem dull, but a lot of effort went into this and ‘a lot’ is going on behind the scenes:

  • I created a wordpress site where users can register an account using okta
  • I created an authorization server in okta where I can authenticate with oauth2 using the password grant
  • The game clients connects to the game server (Connecting message)
  • The game client connects to the authorization server using https and receives a token (Authenticating message)
  • The game client ‘logs in’ to the game server with the token, the game server verifies the token with the authorization server and requests some additional account info (logging in message)
  • When all is verified, the ‘character’ screen is displayed, but yeah this is still empty

After the logging in part and setting up all the frameworks, build files, 
 I wanted to do something completely different and played a bit with blender/mixamo and created a ‘generic’ human character. The character has different animated parts (heads, legs, arms, torso, 
) and I created a quick ‘ModelViewer’ runnable where the model is displayed and the different parts are culled:

Next up will be the character creation screen, character selection screen and loading the character in the game world.

15 Likes

hi, since 2 weeks i am working mainly on bunker building/generating.

still a lot to do, but im happy recast navmesh generate properly dynamic tile update, will just need finish it. thanks @mitm for help

i hope you like it. suggestions are welcome.

17 Likes

Looks awesome!

1 Like

I started playing with shaders again. Here is my first result, a simple fire shader:

(sadly some color contrast was lost through recording)

10 Likes

It’s a great start. Some ideas how you could continue:

  • Add smoke and spark particles
  • Add some “glitchiness” to alpha, so it’s not uniformly opaque over time

Current status of the Wes library for animation editing and retargeting:

  • busting out awesome moves on the dance floor!

Sinbad model and animation by Zi Ye
Jaime model by RĂ©my Bouquet @nehon
Puppet model by Nathan Vegdahl
Oto model by OtoTheCleaner: OTO the cleaner
MhGame model created using MakeHuman

Demo source code is online at Wes/FlashMobDemo.java at master · stephengold/Wes · GitHub

8 Likes

@remy_vd it looks awesome.
I hadn’t heard of okta before.

Can registration done inside the app rather than an external website ?

Sure, one way or the other, your Authentication Server needs access to the user directory. If it’s on an external site, Okta, your app, 


I didn’t want to invest a lot of time in this. Knowing that I will come back to this part later on. I used this widget to replace the default wordpress login with the okta login. So my content is stored on the website, and my users are stored in okta. Both the website, game client and game server use okta to authenticate and retrieve user information.

I added a ‘Register’ link next to the ‘login’ link on the site, that redirects to the Okta registration form. You can specify a callback url, so when the user finished the registration on Okta, he is send back to the site.

1 Like

I have one last question regarding :

Based on your first video, you login to game directly from the app, are you using java HttpsURLConnection to connect to okta server and retrieve access token ? And In case if it is possible, I will appreciate if you can share the code you are using for this ? :slightly_smiling_face:

That is correct. I use the HttpClient from the apache.http package.

This is the code snippet that does the authentication, it’s executed on a separate thread. I didn’t finalise/cleaned up this part yet, so it’s possible and I expect some cases are not yet covered.

// construct the authorization request
HttpPost request = new HttpPost(RealmProperties.INSTANCE.getAuthServer());
request.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_FORM_URLENCODED.getMimeType());

List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("client_id", GameConstants.AUTH_CLIENT_ID));
params.add(new BasicNameValuePair("grant_type", GameConstants.AUTH_GRANT_TYPE));
params.add(new BasicNameValuePair("scope", GameConstants.AUTH_SCOPES));
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));

request.setEntity(new UrlEncodedFormEntity(params));

// send the request
HttpClient client = HttpClientBuilder.create().build();
log.debug("Auth req: {} - {}", request, request.getEntity());
HttpResponse response = client.execute(request);
log.debug("Auth response: {} - {}", response, response.getEntity());

// probably entered invalid credentials
if (HttpStatus.SC_BAD_REQUEST == response.getStatusLine().getStatusCode())
    throw new AuthenticationException();

if (HttpStatus.SC_OK != response.getStatusLine().getStatusCode())
    throw new RuntimeException("Unexpected response code from authorization server: " + response.getStatusLine().getStatusCode());

// parse the response
String responseBody = EntityUtils.toString(response.getEntity());
Map<String, String> responseMap = new ObjectMapper().readValue(responseBody, new TypeReference<Map<String, String>>() {});
String token = responseMap.get("access_token");
if (token == null)
    throw new IllegalArgumentException("access_token not found in response.");

onAuthenticated(token);
2 Likes