Pages

Sunday, March 29, 2015

Free View Camera Movement using Keyboard and Mouse Input

That's right, a free view camera has finally been coded, using keyboard and mouse input! To demonstrate its functionality, I have created a Youtube channel as well as a Google+ account for Fragile. I've also likewise started to increase the potential to build notoriety for Fragile, making about pages and FAQ's and such.

The movement was extremely smooth, even while I was recording at 60 FPS with Fraps. It's sort of choppy in the video though. One thing that was interesting was that with my unregulated-FPS code, it was automatically rendering between 170-220 FPS! :O So the performance is excellent.

Sixteenth step complete:

I still need to add lighting...

Saturday, March 28, 2015

5 Block Types with Rotations and Minor Outlining

I organized the code a lot, but I can't really show that as eye candy... I did however make a lot of eye candy changes. There are now 5 block types (as opposed to just the one block type, a cube, from before): cube (8 vertices), inverted corner (7 vertices), prism (6 vertices), square corner (5 vertices), and tetra (4 vertices). These are depicted in the screenshots below.

Due to the difficulty of seeing the triangular portions of these block types, I also decided to dual draw every cube, the second time in wireframe mode with a slight color highlight (slightly whiter color) and a varying alpha value. The goal with this color was to make it blend in with the cube color but be somewhat noticeable on triangular edges. Hopefully lighting will fix this problem altogether, but it still looks pretty good.

Fifteenth step complete:



Up next: converting the project to x64 (might as well since we're using DX10+...) and much needed lighting!

Monday, March 23, 2015

Per-Block Dichromatic Directional Coloring with Automatic Color Variation

This is an extremely significant accomplishment for the game's progress! There is now per-block dichromatic directional coloring (so that blocks have "direction": forward, backward, left, right, up, or down) with automatic color variation (for distinguishment between adjacent same-colored blocks).

It's also noteworthy that:
  1. Variance of transparency levels within a block (between its two colors) is possible and is demonstrated in the first two pictures below.
  2. All color variations and directions are automatically calculated in the GPU (in other words it's fast).
  3. Wireframe mode is possible (and was possible since the last update, but I forgot to demonstrate it) and is shown in the third picture.
  4. In the last three pictures:
    1. The camera is rotating around the blocks while simultaneously shifting up and down.
    2. There are 4 different colors (and associated transparencies) being drawn, two of which are for a single cube color combo (green and red).
    3. Though the facing of all of the green and red blocks is specified explicitly, 5 of the 6 possible directions for a block to face are depicted.
Fourteenth step complete:



I am very happy to see these results. Up next is probably lighting or anti-aliasing.

Sunday, March 22, 2015

Rotating Camera Around Shaded Transparent Blocks

Wow! This looks absolutely beautiful! So, I took four pictures at different angles and transparencies. :D

Thirteenth step complete:




This code rotates the camera counter-clockwise (from above) around the blocks and continually aims the camera at the center of the blocks.

Next we will need to separate the color and vertex data from the D3D initialization code in order to draw different colors, shapes, and transparencies. Also, I will continue to work through the final tutorials on lighting and textures, which will hopefully get me to the point where I can design my own HLSL shader code (along with the c++ to interact with it) and maybe my own effects, lighting, multisampling, anti-aliasing, etc...

Saturday, March 21, 2015

Rendered a Rotating Multicolored Cube

Twelfth step complete:



Having great difficulty with multisampling and anti-aliasing... May put that aside for now.

Wednesday, March 18, 2015

Rendered a Triangle

Eleventh step complete:


This required a vertex shader, pixel shader, and vertex buffer.

Tuesday, March 17, 2015

Initialized DirectX 10.0-11.1+

Tenth step complete:


And again, a graphics system switch! DirectX 11 with Win32

So now we're not even going to use OpenGL, it seems... We're going with DirectX 11 in a Win32 application. We examined Windows Store apps and decided it was best not to develop one for now, due to their "developer licensing" and Windows Store restrictions, that will hopefully not be required in the future; thus, we chose to develop with Win32 for now.

Ninth step complete:

Friday, March 13, 2015

Proper, Modern OpenGL


As mentioned in the last post, "...it seems that much of the previous graphics code was done using obsolete OpenGL commands. Some learning and work will be required to use the newer and better commands." I have hired a programmer for $0 codenamed REGHEX who has begun work on proper, modern OpenGL.

Eighth step complete (REGHEX):





Coming up next for graphics: cubes and camera movement.

Tuesday, March 10, 2015

"Durable" Server v1.0 and Test Client

Seventh step complete:

Test client and server (named "Durable" :) ) working (using length prefixing)... Server listens for incoming connections, receives packet data from test client, and parses it as individual packets of various sizes. Broadcasting packets out to all clients not yet done, and packet types not yet implemented either (integer is currently hardcoded).

I then expanded the test client code to intermingle connections, data transfers, and disconnections among each other, and it still worked perfectly:

Yay!

Next steps for server: determining various packet types and broadcasting fully received packets to all clients. Eventually there will need to be actual "packet info types" (representing, "What does this packet tell me about the game?") and responses to those info types (like updating a player's position or displaying a chat message). This may or may not even be considered on the server side.

Also, it seems that much of the previous graphics code was done using obsolete OpenGL commands. Some learning and work will be required to use the newer and better commands.

Friday, March 6, 2015

Block shading and alpha coloring

Sixth step complete:


Now you can distinguish between blocks that are side by side and there are alpha (see through) blocks.

Basic Lighting and Text

Fifth step complete:



160,000 cubes drawn and rotating

Fourth step complete - not much done, but this is a proof that 160,000 cubes can be drawn all at once (without lighting), which is more than 5 times a competitor's usage:


As an added bonus, here's 2.25 million cubes drawn and rotating all at once (more than 14 times 160K):

It lags at about a little over one spike of visual updates per second.

Multiple cubes drawn and rotating

Third step complete:


Impressive for less than 1.5 hours! :)

It desperately needs lighting...

Got rotating color cube working

Second step complete:


Began work on game

First step complete:


:)