PDA

View Full Version : Qdfps



Luuk van Venrooij
13-01-2013, 09:38 PM
He all,

After a long absence of any game programming I started a new little project today:) Its called Quick and Dirty FPS. It`s going to be very simple FPS multiplayer deathmatch game like Unreal Tournament or Quake 3 where the editing and levels are inspired by Minecraft. Unlike my previous projects with complex graphics etc this one is going to be as simple as possible:) Today I implemented:

- Basic editing
- Console with a simple scripting language
- Octree for rendering the maps
- Simple collision with the map geometry
- Skybox

Here is a little video:)

http://www.youtube.com/watch?v=BFqszUdfxkw

Some things I`m going to work on next:
- Optimise the rendering of the cubes
- Saving and loading of levels
- Static models to add to the basic geometry
- Per vertex lighting for the geometry

Regards,

Luuk

WILL
13-01-2013, 10:38 PM
Neat! :)

It would be fun to play something very arena-based. How far does your Minecraft influence go on this game project?

Luuk van Venrooij
14-01-2013, 09:22 AM
Like shown in the video the only thing minecraft is the use of simple blocks for constructing the levels:)

Cybermonkey
14-01-2013, 09:28 AM
This reminds me a bit of "Sauerbraten" a.k.a "Cube 2"

Luuk van Venrooij
14-01-2013, 10:58 AM
Yes, the thing that Cube 2 allows you to do is manipulate each individual vertex/edge per cube so you can have more complex geometry:) I`m just staying with cubes:D

phibermon
14-01-2013, 04:30 PM
Cubes rock, and good work! but I'm afraid my soul cannot rest until I've pointed out that Cube 2, with it's ability to manipulate individual verticies on a 'cube', is a mockery of all things Cube.

It would be more accurately described as "hexahedron 2" although those amongst you who require an exact definition may insist upon "non-regular 6 side polyhedron 2"

Although it has to be said it doesn't roll off the tounge very well.

Any why would it? all those flat faces.

Rodrigo Robles
15-01-2013, 12:44 PM
Looks a good idea. With a short and easy learning curve you can get a lot of users.
It's interesting to see how easy tools can get a great audience like the minecraft editor. There are other games with powerful editors that are misused. Maybe for the same reason people don't use Eiffel language...

User137
15-01-2013, 12:57 PM
Minecraft isn't even taking all the advantage out of 3d grid. It would be possible to use more than just cubes, such as cylinders, slopes and so on. I will put my future efforts on fully dynamic landscape though, consisting of various object instances. No grid of any sort is actually needed in game like Unreal Tournament. Everything is just built of objects (ready 3d-models).

Luuk van Venrooij
15-01-2013, 09:11 PM
He guys,

So I finished the basic editing, basic collision and the basic systems for the QDFPS engine so its time for a little demo:D

Controls:
- Mouse and WASD for movement.
- 1 for geometry editing.
- 2 for texturing.
- Scroll to loop through the textures.
- In geometry mode press left mouse to add a block with the current selected texture and right mouse to remove a block.
- In texture mode press left mouse to apply the selected texture to the selected block surface.
- ~ opens the command line. Type list for an overview of the commands.

Thats about:)

Next up:
- Optimise the rendering of the cubes

Greetz

Luuk

Ñuño Martínez
16-01-2013, 10:37 AM
Interesting. It remembers me to Ace of Spades (http://www.aceofspades.com/).

Is it Windows only? Will be the scenery destructible?

Luuk van Venrooij
16-01-2013, 01:42 PM
It should compile on linux using freepascal. I dont have any intentions so far to make the levels destructible.

WILL
16-01-2013, 02:25 PM
No video post? :o ...or more screenies ::)

Luuk van Venrooij
16-01-2013, 03:40 PM
There is a demo attached a few posts back:D

SilverWarior
16-01-2013, 08:20 PM
I just fideled around a bit with your demo and I belive I found a bug or posibly just a unintendedt glitch. Damn I'm good in bughunting maybe I should try to find a job in this area :D
Anywhay the bug happens if you move the camera beneath the level and then move upwards. Ass soon as you get to the botom layer you are teleported above that layer or if there are more layers on the top one (glich in colision detection). This doesn't happen when you try to do similar with cealing.
Also if when placing block you get camera boxed into a small place and then place final block which is placed on the position for camera to be inside the block camera might sometimes glitch between two block and sorta jump up and down. It fixes itself when you try to move.
So you might wanna check your colision detection algorithm again to see why this things are happening and prevent user from placing the block which would be placed on the position where the camera is and therfore cuase forcefull camera move to another position.

Luuk van Venrooij
16-01-2013, 10:18 PM
I just fideled around a bit with your demo and I belive I found a bug or posibly just a unintendedt glitch. Damn I'm good in bughunting maybe I should try to find a job in this area :D
Anywhay the bug happens if you move the camera beneath the level and then move upwards. Ass soon as you get to the botom layer you are teleported above that layer or if there are more layers on the top one (glich in colision detection). This doesn't happen when you try to do similar with cealing.
Also if when placing block you get camera boxed into a small place and then place final block which is placed on the position for camera to be inside the block camera might sometimes glitch between two block and sorta jump up and down. It fixes itself when you try to move.
So you might wanna check your colision detection algorithm again to see why this things are happening and prevent user from placing the block which would be placed on the position where the camera is and therfore cuase forcefull camera move to another position.

Thanx! I will look into them:)

Luuk van Venrooij
17-01-2013, 09:31 PM
Again a little update:)

- Optimized the rendering of the cubes. Cubes in a node are now grouped by texture instead of setting the texture for each cube side rendered:) Didn't really much on Ati and Nvidia cards but my on-board Intel card performance want up by 200%:D
- Fixed the 2 collision bugs that SilverWarior pointed out.

I started to look in to how I`m going to do the lighting on the cube geometry. I types of lighting I want are 1 directional and point lights with different colors. My first try is going to by per vertex lighting since the density of geometry is pretty high. Also this should be pretty simple to implement and fast enough to update in real time while editing. Another option may by light mapping. Implementing shouldn't be that hard since the checks to calculate the color per vertex are basically the same for as for the lightmaps. Also the layout of the light maps in the textures is pretty easy since all surfaces are rectangles:) However the code will be more complex and real-time updating might be an issue depending on the resolution of the lightmaps.

I`m also going to extend the texture mode. I want to be able to rotate textures per surface of the cube so I can align them properly in some situations. I`m talking about rotations of 90 degrees so I`m thinking of some sort of look-up table for this.

Anyway here`s the updated demo:

phibermon
17-01-2013, 11:22 PM
Minecraft uses ambient occlusion and due to the oct-tree based cube world, there's some compromise optimizations you can do to achieve ambient occlusion.

(calculating per cube face as apposed to disc-based simulation of ambient occlusion (http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter14.html). SSAO is also a good approach however it's probably not as fast as per face, oct-tree bounded AO and obviousy ray-traced style occlusion is not an option for current hardware)

I found an excellent source of information when I was adding Voxel regions to my engine (I shall avoid the temptation to elaborate) and I provide for your reading pleasure : http://codeflow.org/entries/2010/dec/09/minecraft-like-rendering-experiments-in-opengl-4/

Whilst it's geared towards GL4, I don't remember seeing anything that couldn't be achieved on Pixel Shader 3.0 hardware.

Oh and brilliant work by the way! you must write tight, consistent code to be able to achieve a stable system in such a short amount of time. I do myself a disfavor by refining my designs, If it works then it works! if only I could take that advice then perhaps I'd have a user-base by now :)

Luuk van Venrooij
20-02-2014, 09:12 PM
He guys,

So a little update on this little project. I have been working on and off on this project for the last month again. Most of these time I have spend rewriting and refining system but also added some new features.

- Optimized map memory usage. Map system now uses pointers so cube records are now only allocated when needed.
- Optimized cube rendering. Cubes are now grouped by texture, fixed some hidden surface removal bugs.
- New scripting language. Supports functions with parameters now and parsing is more robust.
- Switched from SDL1 to SDL2 because in future I want to use OpenGL 4.x for rendering.
- Switched from color picking for selection to raycasting method. OpenGL 4 doesn`t support this so removed it.
- Texture based font rendering. Used glBitmap before and OpenGL 4 doesn`t support this so removed it. Also text is scalable now.
- New TGA texture loader and texture management system.
- New map improved map format. Used roughly 1/10 of the space used before.
- Directional lighting with shadow casting. Its per vertex lighting but still looks pretty good because of the high poly count.

Next things I will be working on is refinement of the lighting system. It still has some problems and I have some ideas to improve that. Not sure if I will look into point and spot lights already to. I also want to make the editing a bit easier. Instead of placing one block at a time I want to be able to select and manipulate selections of multiple blocks. Other things I want to work on is physics and collision.

Anyway like always there are some screens and the latest binaries included in this post and a little video showing the latest test level with lighting!


http://www.youtube.com/watch?v=3mlpwGDK0qI

Cheers!