Poss-Engine - (Windows, Mac, Linux)

Poss Engine is a game about destruction and creation. I call it an engine because your gonna spend more time creating things to play with than actually using them.

The game has a custom entity engine that makes it easy for the player to make entities in-game, and use them to their will. This is also for lights, blocks, items, and buildings. Then, when they are done, the entity, block, item or building can be exported into a file format for other players to download and use however they want.

Destruction and physics is a big part of this game. It uses JBox2D for most of everything, and I am slowly implementing it into the engine.

Facebook: https://www.facebook.com/pages/PossEngine/640473439357065
GitHub: https://github.com/Spacebeans-/poss-engine
Youtube: https://www.youtube.com/user/passagearchive
Twitter: https://www.twitter.com/Spacebeans_

Demo: http://youtu.be/Vtab9CHEMCA

Sooo … what is it?
A game or an engine?
A modifiable game is still a game!

I mean it doesn’t really have a story, or a theme. Everthing in it and how it plays is determined by the player. All the game really does is give the player the tools to create ANYTHING they want. Then the game engine adds physics, works entities, lights, and all the hard stuff.

I’m slowly adding details to the post. And a youtube demo is uploading with 98 minuets remaining :smiley:

So … it is basically a sandbox game or - lets called a game sandbox. Right?

I guess you could call it a sandbox game. But I’m still working out how everything plays for now. The final product could be allot different than the original idea.

I added a video demo here: http://youtu.be/Vtab9CHEMCA

nice shadow :slight_smile:

Yeah, its actually a quad. See every mesh in the lighting world has a vertex array. I do a for loop for all the meshes, get their vertices and draw points from the two facing the outer-most.

for (int i = 0; i < vertices.length; i++) {
						
					Vector2f currentVertex = vertices[i];
					Vector2f nextVertex = vertices[(i + 1) % vertices.length];
					Vector2f edge = Vector2f.sub(nextVertex, currentVertex, null);
				        Vector2f normal = new Vector2f(edge.getY(), -edge.getX());
					Vector2f lightToCurrent = Vector2f.sub(currentVertex, light.location, null);
						
					if (Vector2f.dot(normal, lightToCurrent) > 0) {
					
					Vector2f point1 = Vector2f.add(currentVertex, (Vector2f) Vector2f.sub(currentVertex, light.location, null).scale(800), null);
					Vector2f point2 = Vector2f.add(nextVertex, (Vector2f) Vector2f.sub(nextVertex, light.location, null).scale(800), null);
							
					glBegin(GL_QUADS); {
						glVertex2f(currentVertex.getX(), currentVertex.getY());
						glVertex2f(point1.getX(), point1.getY());
						glVertex2f(point2.getX(), point2.getY());
						glVertex2f(nextVertex.getX(), nextVertex.getY());
					} glEnd();
				}
		}

That immediate mode rendering… yeah.

I had to. The quads vertexes were ALWAYS changing in real time. So I used something that constantly sends vertexes to the card. VBOs are interleaved, so you cant change their data. But the actual blocks are VBOs.

Thats where vertex arrays come into play. Come on, do you really think that modern engines use immediate mode rendering styles because their vertices change constantly? Nope. They use modern rendering techniques because that’s what the “new” OpenGL is based around. The fixed function pipeline is pretty much dead, I wouldn’t suggest using it anymore for anything besides maybe quick testing.

Also, vertices, not vertexes.

Also, also.

VBOs (vertex buffer objects) are just containers for raw data that your graphics card can interpret. VBOs are not “blocks” or anything of the sort, they are simply containers of data. I see many people make that mistake.

Thanks for the advice, really. Also, I mean’t the block engine in game is using VBOs as their main way of rendering. I will try to implement a new way of editing the float buffers from my sprite batches. Then implement it through that.

EDIT: I should have mentioned the framework for the lighting was actually made by the LWJGL.org user, DrArgonmoray
github: https://github.com/DrAgonmoray/BasicLighting/

And the tweening is by the one and only Jacob Pickens!!! (I was recruited into this project. I have done nothing since :P)

Just to let you know, there are over a dozen Jacob Pickens in this world…

@Spacebeans if you have a float array cache, and you put your blocks into the array in a certain order, then modifying the vertices should be relatively easy

I’m actually re-programming the engine (due to the sloppiest code in the world), I’m working out the sprite batches now actually, thanks for the advice.