What I did today

Improved the motion blur even more. It now has no artifacts with anti-aliasing, the gradual change from 0 motion blur to 0.5 pixel motion blur (= when a pixel starts moving just fast enough to get motion blur) no longer makes a visible pop as the introduction of motion blur has been smoothed out, and I no longer get very slightly blurry edges that should be sharp. I’ve also added a faster blur for tiles that have coherent motion and don’t need depth awareness, which improved performance significantly.

Motion blur performance with and without the cheap blur optimization when the whole screen is in motion:

  • Without: 1.275 ms
  • With: 0.68 ms

87.5% faster! =D

Would you be so kind that you would share that motion blur code as reference?

In the early hours of the morning I finally finished putting in hyperlinks into text areas in SPGL2’s increasingly hacky user interface systems. Took me about 6 hours of actual coding (which is to say, basically a whole day) but I’m super pleased with the results and its general efficiency of implementation. Now I can embed hyperlinks of any sort (eg. help:titlescreen) and have the game do something useful with them, all over the UI. Battledroid development is actually speeding up now.

Cas :slight_smile:

http://www.java-gaming.org/?action=pastebin&id=1115

There’s lots of things going on in other shaders though. I have 4 other shaders that do motion blur related work. Two of them are used to calculate the maximum and minimum motion vectors of each tile, the third shader dilates the tiles and checks if the resulting min and max vectors have similar weight (if they do, it outputs (2048, 2048) to signal the motion blur shader that it should use the fast path), and then a fourth shader generates the packed (linear depth, motion vector length) texture. It’s not easy to implement unless you already have motion vectors and linear depth textures lying around. =P

I themed chameleon boot loader today.

Found some time today in between baby & housekeeping to make some improvements to the prototype I’m working on. The thrust and torque is now applied to the ship model depending on where the thrusters and reaction wheels are placed. I also fixed many small issues. It runs smooth even with very big ships:

Holy shit. That looks like a merge of FTL and StarDrive. ___

Also: Reminds me of Robocraft (currently playing that game, I really love it)

@Grunnt: Still reminds me of what I’m doing, in some aspects even more now, in quite some also better probably…


https://dl.dropboxusercontent.com/s/t7wiytqjsus15e7/Screenshot%202014-10-25%2021.36.59.png?dl=0

Do really hope you don’t want it to be as fast as that too. :slight_smile:

My day:

  • Entity management system (with layering)
  • Packet handling for networked entities
  • Parsing AIs

This is my experimental AI.

function runAI(username) {

	var EntitySystem = Java.type("com.digiturtle.entities.EntitySystem");
	var Entity = Java.type("com.digiturtle.entities.Entity");
	var entity = EntitySystem.getEntity(username);
	
	var ArrayList = Java.type("java.util.ArrayList");
	var entities = EntitySystem.getEntities();
	
	for each (var otherEntity in entities) {
		if (otherEntity.getHealth() / otherEntity.getMaxHealth() > 0.5) {
			entity.damage(5);
		}
	}
	
}

It uses the Nashorn engine. I’m unsure if it’s 100% correct since I am quite the novice with Nashorn. If anybody has any experience with Nashorn and finds an issue or has a tutorial you can link me to, it would be appreciated :slight_smile:

CopyableCougar4

Goddamn, reading all these make me feel more and more lazy and unaccomplished thanks to how little time I have :’(

Well, I attempted to reinstall Arch on my old lappy. The actual install went fine, much smoother than previous times, but then I apparently wrecked everything when it came to installing the god damn drivers for the laptop’s AMD/integrated intel graphics. Installing drivers in any nix distribution makes me want to kill myself.

Had enough for today, doing a fresh install tomorrow. Grr.

My school upgraded their PCs in 2010, and apparently they have a store room filled with 150+ Dell WinXPs. They give them out every friday. The graphics chip has an “ATI” logo on it… So it kinda tells you how old they are.

… I took 3 :wink:

I’m not sure about this, but to me it seemed that FreeTypeFontGenerator and Libgdx font rendering is very slow, so I’m attempting to make my own binding of FreeType for Java. Not sure if it will have better performance than that of Libgdx, but it is sure as hell a fun process.

If the result turns out well, I will post it here somewhere.

For now, enjoy some FreeType generated bitmaps drawn to console :smiley:

Adding some tasks to my Ninja vs Zombie Pirates TODO list.
Having great ideas :smiley:

Hey Drenius, looks interesting! I have no doubt we’re doing quite different things, though. I’m planning on this to be somewhat like FTL-meets-space opera, with the player controlling a single ship in detail and battling it out with one or a few other ships. Do you have a WiP thread or page about your game?

FTL was certainly an inspiration, and I loved stardrive (I guess the ship design part is also pretty like StarDrive’s). I envision a mix between the two, I guess.

Robocraft looks interesting, but it’s waaaay more advanced stuff than I’m making. Great stuff. I limit myself to 2D space top-down setting.

Integrated some lightning to my game Star Four.

http://giant.gfycat.com/UnequaledFrighteningImperialeagle.gif

Spent about 6 days to build a small game library for myself.

Features:

  • Text resource loading
  • UI components
  • Parsing UI from xml
  • Using javascript and Nashorn to handle button clicks
  • Gravity handling
  • Collision detection with callback handling
  • Simple networking API with packet header storage
  • Entity management system with cached rendering of layered vbo sprites, JavaScript AI parsing (wip)
  • Font rendering
  • Texture drawing
  • Everything is rendered with VAOs that are often even batched in display lists

Turns this:

public class Game {
	
	public static void main(String[] args) throws LWJGLException {
		new Game(1280, 720, "Game").start();
	}
	
	private HashMap<String, Screen> screens = new HashMap<String, Screen>();
	private String screen = "menu";
	
	public Game(int width, int height, String title) throws LWJGLException {
		Display.setTitle(title);
		Display.setDisplayMode(new DisplayMode(width, height));
	}
	
	private static Game game;
	
	public static Game getGame() {
		return game;
	}
	
	public void start() throws LWJGLException {
		Display.create();
		GL11.glOrtho(0, 1280, 720, 0, 1, -1);
		GL11.glClearColor(0.7f, 0.7f, 0.7f, 1);
		GL11.glEnable(GL11.GL_BLEND);
		GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
		InputSystem.HEIGHT = 720;
		InputSystem.TARGET_DISPLAY_FPS = 90;
		screens.put("menu", Screen.getScreen(new File("main-menu.xml")));
		for (Screen screen : screens.values()) {
			InputSystem.getSystem().addComponent(screen.getUI());
		}
		while (!Display.isCloseRequested()) {
			game = this;
			GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
			InputSystem.getSystem().collectInput();
			screens.get(screen).render();
			Display.update();
			Display.sync(90);
		}
	}

}

<?xml version="1.0"?>
<!-- scale : 1.08333 -->
<screen>
 <ui x="15" y = "15" width="650" height="475" background="main box.png">
  <theme source="output.jar" />
  <button layer="1" x="324" y="418" width="145" height="36" source="battle button.png" action="builder.js:printOutput()" />
  <button layer="2" x="49" y="54" width="90" height="90" source="heal button.png" action="builder.js:printOutput()" />
 </ui>
</screen>
function printOutput() {
  print("Hello");
}

into a UI with two buttons and a background that prints “Hello” to the console when either button is clicked.

Such fun (but not very impressive) :slight_smile:

CopyableCougar4

Also did a small game library for beginners, less impressive than CopyableCougar4’s, but still, I had fun.

Example code: http://pastebin.java-gaming.org/d11ed89121e11

Does this: