top of page
ModelViewer.png

AN OBJ Model Viewer

This project helped me understand the data structures used for storing 3D models in the OBJ format. I also learned how to write a Phong shader and an emissive blurry shader in HLSL. Furthermore, this project tested my Duality Engine’s capability of loading 3D models for game development.

ModelViewer_Demo

ModelViewer_Demo

PhongLightingConstant.png

Lighting Debug constant

The constant buffer I pass into the Phong shader contains not only lighting information but also the camera’s position, falloff settings for the normal map, and a series of debug settings to visually debug lighting effects.
PhongLighitingShader.png

Sample TExtures

The shader samples the texel information stored in each texture. My Phong shader reads the material's diffuse texture, normal map, and a texture that combines specular, glossiness, and emissive information using separate RGB channels.
TCP.png

Net System

My network system uses TCP to establish a connection between the server and the client. The helper functions IsClient() and IsServer() assist the Update() function in managing ClientState or ServerState, depending on whether the program is set to a specific NetSystemMode in the NetSystemConfig.

The sendBufferSize and receiveBufferSize determine the amount of data the NetSystem can send or receive in a single frame. Those data are stored in the sendQueue and recvQueue.

The function ReadCommandFromReceiveQueue() process incoming commands by executing them when it detects a predefined terminator.

Meanwhile, PackSendQueueWithCommands() and PrepareSendBuffer() handle outgoing data by packaging game commands into the buffer for the other player to execute.


 
VaporumGameCommands.png

Game Commands

These commands simplify how player input is executed in the game and make it possible to synchronize the player and server by simply sending these commands over the network.
 
VaporumSubscribeEvents.png
vaporum_sendCommand.png

Subscribing And Sending

By utilizing the event system and network system, we can subscribe to all game commands and transmit the subscribed command strings through the NetSystem.
 
vaporum2
particleSystem
UI_Widget
particle_emitter
TCP
VaporumGameCommands
VaporumSubscribeEvents
vaporum_sendCommand
bottom of page