Coder Social home page Coder Social logo

jeanmilost / dwarfstar Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 101.68 MB

A tiny game engine designed to create 3D games with fixed camera like Resident Evil or Alone In The Dark (Work in progress).

License: MIT License

C++ 81.58% C 0.23% Pascal 18.19%

dwarfstar's Introduction

DwarfStar engine

DrawfStar is a (constantly) work in progress game engine, written in C++ and based on my (also constently) work in progress, C written, CompactStar engine.

Initially DwarfStar was targetted to be a retro game engine, to create 3D games with fixed camera like Resident Evil or Alone In The Dark. But with the time, this project become my playground where I tested several new techniques who caught my attention.

Here are the actual supported features

  • Simple shapes creation (surface, box, sphere, cylinder, disk, ring, spiral and capsule)
  • Inter-Quake Model (.iqm) and Filmbox (.fbx, experimental) models
  • Animations for Inter-Quake Model (.iqm) and Filmbox (.fbx) models
  • Skybox
  • Transparency
  • Collision detection (GJK, geometry based, and models)
  • Sound and music
  • Cross-platform SDK written in C++

Here are some screenshots of several projects I realized with this engine (all are available as demo)

Screenshot

A third-person demo with Inter-Quake Model animation and GJK based collision detection.

Screenshot

A Filmbox animated model.

Screenshot

A collision detection test between 2 geometrical capsules.

Third-party

This project depends on several third-party libraries, which are:

These third-party libraries depend on which OS is targetted, but are cross-platform, and are normally available on any OS. Please refer to the original website for the documentation, updates, and licenses.

Several Blender plugins were also used to export Inter-Quake (.iqm) model formats. You may find them on the following websites:

How to easily create animated characters

Below is a very simple method to create high quality animated characters which may be loaded with the provided reader.

Prerequisites

You will need the following applications, all of them are free and may be downloaded from their official website:

An account to the Adobe Mixamo website is also required, you can create one for free if you still don't have one.

Create the character with Makehuman

The first step is to create a character with Makehuman. The application provides a very large range of parameters allowing to create a huge variety of human characters, and in addition, the application provides a large library of clothes, topologies, and accessories, created and shared by other users.

To create a character exportable as an .iqm model, you will need to:

  • Under the Geometries=>Topologies tab, select the Proxy741 proxy, or any available low polygon proxy. Don't use a proxy containing too many polygons, otherwise the export to .iqm file may fail later.
  • Configure your model as desired.
  • Under the Pose/Animate=>Skeleton tab, select the Game Engine skeleton.
  • Once ready, under the Files=>Export tab, select the Filmbox (fbx) mesh format. Ensure that the Feet on ground and Binary FBX options are checked, then select a name and click on the Export button.

Animate with Mixamo

The second step is to animate your character with Mixamo. The website provides a very large range of ready-to-use realistic animations, you just need to select which you want and to configure it.

To animate your model, you will need to:

  • Once logged, click on the Upload Character button, and select the model you exported from MakeHuman. Check if the model is well animated on the import end.
  • Select the animation you want.
  • Check the In place checkbox, and configure your animation.
  • Click on the Download button, and select FBX Binary (.fbx) and With skin options. Click again on the Download button.

Convert to .iqm with Blender

The third step is to convert the animated .fbx model to .iqm with Blender.

To do that, you will need to:

  • Create a new scene and clean it completely.
  • Click on File=>Import=>FBX (.fbx) and select the animated model you exported from Mixamo.
  • Select the Animation view (Ctrl+PgUp/Dn) and correct the animation length.
  • Play the animation to check if all is working well.
  • On the right panel tree, expand the Game Engine=>Animation items, and rename the Game_engine|mixamo.com|Layer0 item to a name describing your animation.
  • Optionally you may also rename the Game Engine item to your model name.
  • Select Object Mode and select your whole model (press the A key).
  • Click on File=>Export=>Inter-Quake Model (.iqm, .iqe). In the Animation edit, enter the animation name you set on the tree item.

  • Ensure that all the checkboxes are checked, except the Vertex Colors one. Under Materials, select Image.
  • Click on the Export IQM button.

...and voila!

NOTE in order to be opened with the c++ reader, you'll need to copy the textures exported by Makehuman next to the .iqm model. You'll have also to convert the image to Targa (.tga) format and to change the png to tga format in the .iqm file by using an hex editor like e.g. HxD.

License

I decided to share this code freely (under MIT license), don't hesitate to use it if you think it useful for your purposes. Any collaboration on this project is welcome.

dwarfstar's People

Contributors

jeanmilost avatar

Stargazers

8ctopus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.