What I did today

Aaaaaand Spritesheets! Here’s a recording of me hitting the directional keys randomly, like the finely trained monkey I am.

https://lh3.googleusercontent.com/nmCYfWzWJ0Gi3rFySwqyKkEjcMfGhKBoa5sDgtpnwJ4uBlEtY6fk60VdLW6B9201VxzWm8VWcYwKRYm7hjOunXCCQtuuB3862eC2ypt1WNpf7XVKujacI2uYEblM9HTeYfqKBCIiRq0tBlN7PUdUgGLg-Mr9EDt85R1A8sBzoWCvdqDzT5pupjdXvVTmqupDk72fZpag9vTHpDEZX5M4ovCDHZpl2ERV4nywyPNorxY4zvy10Ux7_FVN9w0hrTWjr_RJ44qwYsYwbPGIDFYiq5y_OXpf2WdNKnSAOLtTvlwZZD73kBesV3vPTvkSo1m-bRci-HxeSLJmJoE-hME7Nv8JZg58REWXT7NesrgOjl4m-vuD1YxT3ENVY3NzsqCdBYk2yPl9gFc3WFkockFDwV4jPOFlHc0uV8Z2X_HDr44apGApexASRlfXIvIJp6f6unOrH0R2fLvCUfaAnp30lXiAyl833JkNTviVon-TdXyw0ZEP0vTN7HmeZvd9DlQIqnXpscbSsOu6ISqrJvlJZBB4IgITs3c1do0Do5z0ePRyqBabUw7zfaf3CzKMTPkcM90HgWoigU4c2LrfjKoIAfpVn2FPyscMKV5KcYLRR-FZcWPCVSa4=w874-h688-no

I’m having a lot of confusion though regarding how to deal with these. ???

The tutorial I was following does spritesheets by applying a scale and translation matrix to the texture via shader (scaling to the size of the cell, translating to the selected index). Since I was getting confused there (and my interface didn’t accomodate passing the shader to the render method), I just precalculated the texture coordinates at object creation and instantiated a bunch of buffers.

Not sure which is preferable.

It really shows that up until now I had been doing all my drawing via Java2d ::slight_smile:

It occurred to me that I only really had controllers working for my game on Windows, so I spent yesterday getting Jinput to work on Linux (through my Raspberry Pi). In the process of that, I broke the Windows controllers, so I had to fix that, then I got the controllers to work on Linux. Today, is all about Mac. I am pretty well versed now on how and why controllers may or may not work on different operating systems, so if any noobs have any questions, now is the time to ask me about it. As of now, my game works with both gamepads and joysticks on Windows and Linux.

I spent a few hours researching how to package my jar into a Mac application, and for some reason decided to check this forum last. Then I came across this: http://www.java-gaming.org/topics/mac-osx-jarbundle-a-simple-jar-bundling-application/33930/view.html
@orange451, you’re my hero for the day.

So now I can generate tilemaps from data sets. Still got to do some bitmasking so there’s more tile variety though, but my current tilesheet is not properly designed to handle bitmask indexing (which is packing the status of nearby tiles into an 8-bit value and have the resulting value match an specific index in the tile map, as seen here)

https://lh3.googleusercontent.com/XAs6IGb9O99JJfVUOoyPHvLi0Rm5HNXhDdVZYlyNYsCoBc49lzwMiXNvr03oU8CorFTbSMDWanHec3F45kSyCrSeEEXZ8pak6GJPqI9eT-BhNka4py7h_hRLv2vXb2p2uoiQui0xIoe5YuA4ZS9xdYhFy00eSwkIc6RSTo7E4EtuUhGiFfj9n-XBgSZkVK6ycC4V32iIEuhiDM-9wvLiEblo8LkerXY1cVbQhdGe37wNUAwn3PmXQX2p9KLFVOzW70LwH6_aJcC93Emz_gcnZze4NagOGaVNslNp9lNCgaXHO78eKjAGXHYxd0TxFY3tSvIfUchnQXGTyoFAsl0oT42vrBFLWf0dCUFf58azahjeULHLzmcR-uaeGrBv4N3i6R3J2lG7GBNTCWpABwrfhblfvcl_yZCB9PjNeQVrMyAeKBsZbJI8aI8GlTAUrS8yBi6_SItw1rwvlWpNYEAUqg5P68bP2wE8EJxDYL7lzmUXLLBaowFNExg0AmQGkRe7cTO8xVuCZhKsPbXxc7OI6Uaq798HdvMiG5-HxRQanyzD4m_3rehVJsnmu-73qeeyNyAohma2XRdo9ViD5JqrerzjY72Op1OeTsSQka-AIPvY31_d9TqB=w727-h817-no

Instead of doing my assignment I made my old goo simulator

more gooey.

Finished my final visualization of a variational autoencoder I developed to generate MNIST digits. Essentially my model has learned a generalized method to draw handwritten digits. There’s a few more visualizations I coded in but this is an animation of the decoder travelling through a 2D latent space. It’s usually more accurate when trained with a much higher latent dimensional space but 2D allows me to easily travel through it and visualize it. This is just an example application of this particular machine learning algorithm. With an expansion of this method combined with a few other tricks a model can be trained to intelligently combine parts of images together. For example train a decoder on zebra images, then feed it a video of a horse running. The scenery in the video will remain untouched but the horse will be modified to look like a zebra. Think of the possible applications with this and faces - imagine being able to take a video of yourself talking and get a video of Obama or some other well known figure saying what you did but with their face and voice. This encoder-decoder structure can do lots of really useful and neat things.

animation: https://i.imgur.com/7xybLM3.mp4 (how do I embed these…?)
code: [url=https://gist.github.com/anonymous/90364c863638ac34bd4b2656898a119f]https://gist.github.com/anonymous/90364c863638ac34bd4b2656898a119f]

The tutorials I started a while ago is now up to part 10 which creates a Bird that flys about, landing, walking and feeding:

[quote]Finished my final visualization of a variational autoencoder I developed to generate MNIST digits…
[/quote]
Teach me o glorious wizard

Actually, yesterday :stuck_out_tongue:

I’ve implemented the slider component of my custom GUI System based on NanoVG.

S_LYXijw5uU

Yay for bitmasking tilesets! ;D

Boo for some literal corner cases not working! :clue:

So easy for projects to get derailed, for me. My last post was about the Theremin. It’s so far out of mind that I can’t recall why it got back-burnered again. Ah–probably the “macro recording” feature proved too tricky to just kick out and I put it aside for that reason. I really need to get better at follow-through!!

Mostly am focused on JavaScript/VR for startup: downloaded 95 sets of 6 jpgs that form boxes that can be used as 360-degree photos, of a US WWII Navy battleship interior and deck. These could be really cool for a game, but permissions issues. Also, the photographers didn’t have navigation through the space in mind. So maybe only a third have clear connections to each other. Lots of knowledge holes to fill: finished w3schools section on HTML and am progressing through CSS. Also working through book on JavaScript after finishing the basic w3schools section.

Had to take a break to work on a bit of music! (I was a music major, after all.) I think the recent remix on this tune (was posted a couple years ago?) has helped a lot. Had avoided using limiters before this for no good reason, but it turns out Audacity’s limiter was great at squashing the ‘gong’ and allowing the overall volume to be boosted to something reasonable. Needs a title. It is a quiet piece, possibly works as background music for coding. Maybe it is strong enough to put up for sale for $1? Have been kind of scared to take that step.

Capturing Events and reproduce them can be tricky
here some raw example


long Start_Time;
Start_Recording(){
	Start_Time = cur_Time_Ms
}

ArrayList Events
java_Mouse_event(){//etc evn
	long time_Trig = cur_Time_Ms - Start_Time
	Events.add(event, time_Trig)
	
	java_Mouse_event_Proc(ev)
}

java_Mouse_event_Proc()
///
Thread_Load_Events{
	Events_Load
	int proc_List_Pos = 0;
	int size = Events_Load.size;
	while(proc_List_Pos < size){
		long cur_Time_Ms_Macro = cur_Time_Ms - Start_Time_Macro
		int i = proc_List_Pos
		for(; i < size; i++){
			if(ev.time_Trig <= cur_Time_Ms_Macro){
				java_Mouse_event_Proc(ev);
			}else{
				break; //for loop
			}
		}
		proc_List_Pos = i;
		Sleap(15)
	}
}

all be fine and smooth if application don’t have Lags =)
if you have after some event let say 100ms lag
-additional event align needed - to compensate multithreading desync ^^
(or don’t care if events don’t need perfect time accuracy)

So I got a little side tracked from the original project and wrote some code to move the mouse with my hand. In the first portion of the video I demonstrate that and in the second bit I show how the model can discriminate between three different hand postures. That parts a WIP but it’s getting there. It can only get accurate when my hand is in the center of the image. Hope you like my 20+ hour sleep deprived face in the background.

Mouse movement uses a very simple algorithm of getting the average position of all those white pixels. Which is why I have to have my sleeve up. But it works decently.

edit: trained it a bit better, now it’s much better at detecting posture no matter the position and angle. Now I can click by putting a finger up! I also coded it to ‘press’ space so I could play that little chrome dinosaur game. Jumping when I put one finger up.

JnQu0nlchKM


https://preview.ibb.co/k34Dg5/Amy_cdesign.png

Been designing this character, for a short-ish story I have in mind. I quite like the way that turned out, so I might make it into either a game or webcomic :slight_smile: Let me hear your thoughts on the design!

Look what i found)


	static public void main(String[] args){
		B b = (B) new B().Call();
		B b_E = new B().Call_E();
		C c = new C().Call_E();
		
		//Runtime Error
		//But Because its Class exception - its trigger on every call = easy to find and fix
		C c_Er = new A().Call_E();
	}
	
	static public class A{
		public A Call(){
			return this;
		}
		public <E extends A> E Call_E(){
			return (E) this;
		}
	}
	
	static public class B extends A{}	
	static public class C extends B{}

What sort of sick puppy says “static public”!?
Aha, the same sort of sick puppy that names method calls with capital letters!

Cas :slight_smile:

static is more important for me then public / protected ^^
I also have


Object ar[] 
Object ar[][]
Object[] ar[]

(when many ppl use [icode]Object[][] ar[/icode])
=)

You need therapy, at once!

Cas :slight_smile:

Maybe)
(or use Auto Formatter before post code somewhere XD)
ED:I use lower Case only for function arguments, in function variable and RAW code


int W;
public Win(int w){
	W = w;
	int x = 10;
}

I don’t like this type of style:


int w;
public Win(int w){
	this.w = w;
}

For static and final – I have different Font style(color) in IDE so I don’t care )

up: ps.
this preference only for my own projects

  • if i write for 3rd party project I use their formatting style :wink:

I downloaded java 9. Go me.