Pages

Saturday, December 26, 2015

Completely Revamped the Encryption!

It has been a while, again, since I've worked on Fragile. I was having bugs in my encryption and decryption code that were very difficult to track, and then I realized that it wasn't designed as robustly as it should have been. As I was thinking of how to fix this, and that I basically needed to rewrite the entire thing from scratch, I thought up an even smarter, more robust encryption.

So, I went with that, and now it's completely done and is more capable than the previous encryption. Thirty fifth step complete:

Wednesday, November 4, 2015

Game Server Purchased and Ready!

It has been a couple of months since there has been any progress, primarily because I've been extremely busy but also because I've hit some road blocks in the code and deployment, dealing with security and integrity issues as well as finding a web server to host the Durable server on.

Fortunately, I have solved these issues, and I happened upon a public game server for testing purposes! (I won't go into any more detail on that.) Thirty fourth step complete!

Wednesday, July 8, 2015

FragileGame.com Purchased and Live!

Since Fragile will be a full-fledged game, it is going to need a website. As the game draws near to the alpha release, I have decided to purchase http://FragileGame.com, which is now live! There isn't much on it yet, but there will be... Thirty third step complete!

Login Working!

I just finished with the secure login process! Due to the heavy security involved, it's slightly more difficult to debug, and I had two bugs in my code. :/

But it's done now, and now I can begin work on the actual game and server data! Thirty second step complete:

Saturday, July 4, 2015

Secure, Robust, Fast, and Efficient Account Registration Complete

So I've been somewhat busy lately, and this client<->server handshake, registration, and login coding implementation is a lot of work (if done properly, which it is), but I've been pushing through.

Clients are now able to register new accounts, and in a way that is secure, robust, fast, and efficient! The server is able to store such information permanently. Thirty first step complete:


There are a few anti-spam measures I still need to add in on both ends, and I still need to implement the login process on the server's end, but these won't take long now that registration is working. Then I can begin work on the actual game and start preparing for an alpha release! :)

By the way, I ran a line counting program on Fragile and Durable today and it said that there are 54,096 lines of actual code and 20,632 lines of comments, of which I have probably written about 95%!

Further Progress on Path Finding!

My friend Chakra has continued his work on the path finding algorithm. He's added support for polygons and optimized the algorithm, and that's all I really know. Oh, and he improved the aesthetics of the test/demo. :D

I was actually testing his work a little bit and it's works very well! It's smooth, fast, and vector-based, which is exactly what Fragile needs. Thirtieth step complete:
Don't worry, those thin green lines aren't the algorithm trying out every possibility (it's smarter than that!): they're just there for testing purposes. Good work Chakra!

Thursday, June 25, 2015

Account Storage Ready

Today I brainstormed and solved a server-side problem: basic storage. Since the server will need to store usernames, password hashes, and probably other information in the future, I needed a fast, easy, and lightweight solution to store a bunch of data.

I came up with some ideas of creating my own database system, but they were all either extremely complicated or had way too much overhead. I found a nice simple key-value storage database online which I will be using (yes, I actually used someone else's code this time!). There isn't really much to visualize here, but... twenty ninth step complete!

Friday, June 19, 2015

Made the Strong Hashing Algorithm Bidirectional!

I've been rather busy lately, and I had some trouble trying to implement known bidirectional (two-way) hashing algorithms, which is why I haven't made much progress lately. I decided instead to build off of my unidirectional (one-way) hashing algorithm from last time and make it bidirectional.

I have just finished doing so, it works well, and, most importantly, it is entirely uncrackable (again, joking). Twenty eighth step complete; here is some sample output in hex form (I can easily change the seed, shared data between both ends, salt, iterations, and hash length):

Now I can resume work on the login process.

Sunday, June 7, 2015

Strong Hashing Algorithm Complete!

Due to the need for security, as I am currently developing the client-server communication for Fragile, I was in need of a strong one way hashing (encryption) algorithm. So, I found a good one floating around on the internet and improved it significantly.

I have been doing a lot of research lately on secure hashing algorithms, good ways to inhibit hackers, many different ways to mess up encryption, etc., and I'm fairly certain that my hashing algorithm is entirely uncrackable. For those of you who don't know me, that was a joke.

I did put forth my best effort to develop the strongest implementation of the hash that I could for passwords though, and it is versatile in usage and should be resistant to all kinds of malice.

Twenty seventh step complete; here is some sample output, in both integer and hex form (I can easily change the salt, iterations, and key size):

Next, I'll need to implement a good two way encryption algorithm in order to insure Fragile against two things:
  1. Hackers trying to steal your password as you set or change it.
  2. Hackers trying to view, inject, and/or manipulate packets being sent between Fragile and Durable (the server).

Saturday, May 30, 2015

Client Server Communication Protocol in Progress!

Using some new chat commands I have created, I have been able to establish a basic client server communication protocol so that packets are sent in the right order and ensured to be in the right order; otherwise, the client will disconnect.

Twenty sixth step complete:

Friday, May 29, 2015

Path Finding in the Works!

Another developer friend of mine, who I will refer to as Chakra, has been developing a path finding algorithm for usage in Fragile. He has been doing it in a simpler language, in order to develop the actual theory and logistics of the algorithm first, but he is making good progress and this may very well end up being used in the game!

Currently, the code reduces a polygon field to a graph and then traverses that graph in order to quickly calculate a unit's path, and it functions properly regardless of the size or shape of the unit and the obstacles that it is maneuvering around. It seems this will be very speed and memory efficient and may even be able to handle a much higher number of units than we needed, but further attempts may nonetheless be made to improve its speed and capabilities.

Here is a picture of the graph that his code generated in order for him to inspect its output. Twenty fifth step complete:

I told him the yellow looks ugly, but he seems to like it. :)

Monday, May 25, 2015

Fully working alpha!!!

This is exciting news: I have been able to get alpha fully working, with, behind, in front of, and around opaque blocks! I used some sneaky tricks, but hey, it works!

I also added scaling capability to all blocks, which is just as simple to use as position and etc.

Lastly, I added 3 new "block" types: horizontal, vertical, and lateral (in the Z (forward/backward) direction) sheets (planes)! This will prove useful for things like floors, walls, and ceilings that don't need thickness, and these block types don't induce "jitter" no matter how they're stretched (unlike the other block types), which is nice.

Twenty fourth step complete (the higher blue, yellow, and purple blocks are transparent, the "world border" sheets are also transparent, and the rest of the blocks are fully opaque (4 X white, red, blue, and 2 X green)):

Thursday, May 21, 2015

Added Chat Style Text Input and Game Icon!

The title says it all. Twenty third step complete:

I am extremely close to adding multiplayer functionality and game modes and testing it out.

Monday, May 18, 2015

Integrated Shatter (Direct2D) into Fragile (Direct3D)!

Shatter (Direct2D) is now integrated into Fragile (Direct3D)! For now, this means that text can be drawn on top of all of the blocks. This also means that in the future, a GUI (Graphical User Interface) can easily be drawn on top of everything as well.

Also, I added a screenshot taking feature with the Print Screen key that saves to a file name based on the date, time, and in-game time. Two things that are nice about it are:
  1. it doesn't capture the window frame,
  2. but it does capture the entire D2D and D3D frame.
I used it to take the screenshot shown below. Twenty second step complete:

Next step: add Durable (client/server networking) code to Fragile.

Saturday, May 16, 2015

Complete text style parsing!

After a lot of work in a little time, I have created a full text style parser for Shatter, Fragile's GUI (Graphical User Interface)! See the images below for what it now supports.

Twenty first step complete:

Friday, May 15, 2015

Chat-like Text Display!

DirectWrite chat-like text display has now been coded! I am now introducing Shatter, Fragile's Graphical User Interface. Currently, it only supports uniform text, but that will soon change!

Twentieth step complete:

It needs some color; that will come soon...

Thursday, May 14, 2015

Safe and Simple Packet Serialization and Unserialization Complete!

Another long delay since the last post, but there hasn't been much to show (certainly no eye candy). After much research, planning, and development, I have finally implemented my own safe and simple solution for packet serialization and unserialization. For the less technical, I just wrecked a major chunk out of Durable's (Fragile's server's) networking for multiplayer (client and server) capability.

Unfortunately, primarily for safety purposes, I won't be demonstrating its functionality, but it's fully working and extremely fast. Nineteenth step complete.

On the plus side, I did create a favicon icon (website icon) for the blog. :)

Thursday, April 23, 2015

Now Drawing 200,000+ blocks!

It's been a while because I have been trying out all kinds of optimization ideas. Using instancing per block type (and thus giving up depth based drawing, for now), every frame, 200,000+ blocks with randomly assigned block types, face rotations, and colors are drawn with constantly updating positions and 360 degree rotations, without lag! There is also global lighting with 4 general direction spot lights and 1 universal ambient light.

Also, I greatly improved the color variations (within each block) and was finally able to get multisampled anti-aliasing (MSAA) to work!

Eighteenth step complete:

Tuesday, April 7, 2015

Added Lighting and FPS and Drawing 160,000+ Blocks Per Frame!

We now have Lambertian (aka. long distance directional) lighting and ambient lighting, as well as a set FPS (Frames Per Second)! Also, Fragile can draw about 160,000+ blocks per frame without lag, with each block drawn per frame having its own randomized block type, rotation, and color. This is demonstrated in the video below.

I ran into some problems with sending data to the GPU (Graphics Processing Unit) that took me hours to figure out: it turns out you have to pad data sent to the GPU in order for it to transfer properly. Yuck.

One interesting note is that Fragile can draw about 1,000,000 of these blocks with mild lag (choppiness and somewhat slow response time to input), but it is doable.

Seventeenth step complete:
(lighting from below)



Up next: storing the entire game world (units, components, etc.) and map in memory without using up a lot of RAM (Random Access Memory - aka. the memory applications use while running) but with quick response time. REGHEX and I have figured out a good system for this; I just have to implement it well.

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.