Sign in to follow this  

Unity Just wanted to share my engine design

This topic is 1603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey people. As a heavy Unity3D user and a programming hobbyist I was inspired by Unity3D to make my very own game engine. Except this one was going to be free for everyone and completely cross-platform. Meaning you could play and make games on linux, windows, and osx (Not ready to get in to mobile yet). I have a very rough base to start from and I wanted to get some feedback or just show off some code.

#include "Core.h"

class Controller : public Component {
      public:
          void Init() { // Gets Called Right before main loop starts
               cout << "Hello World" << endl;
          }          

          void Update() { //Gets Called every frame update
               if(Input::GetKey(KEY_W))
                    node->transform->Translate(0, 0.1f, 0);//node is the GameNode this object is attached to
               
               if(Input::GetKey(KEY_S))
                    node->transform->Translate(0, -0.1f, 0);//node is the GameNode this object is attached to
          }

          void Quit() { // Gets Called Right after main loop closes
               //Nothing to put here and it doesn't have to be declared. Just wanted to show it exists
          }
};

int main() {
	Engine::Init(); {

		GameNode* Cam = Engine::Create("Cam");
		Cam->AddComponent(new Camera());

		GameNode* Cube = Engine::Create("Cube");
		Cube->AddComponent(new Renderer());
                Cube->AddComponent(new Controller());

	} Engine::Play();

	return 0;
}

of course a lot of core features are missing such as lights and shadows, asset pipeline, and an interactive scene graph viewer and editor, and addtional graphics features. But for a start i think I'm in the right direction.

 

Btw any opengl advise/help is gladly welcome.

 

thanks for reading

Edited by VZdemon

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Similar Content

    • By loyalsheep
      Hey guys!
      Check out the trailer of Airavat. It's a minimalist, space survival game (and hard, very hard) 
      Download on GooglePlay: Airavat
       
    • By anomalystudiospt
      Hey, we are new around here!
      Our team spent the last year developing a prototype game called Rise of The Fey, a game that focuses on a dramatic story with a fast paced gameplay.
      Rise of The Fey is a third-person action-adventure RPG set within a fantasy world called Perrah. In Rise you control Kall, a young spaunian looking for revenge after the death of his beloved.

      We would appreciate if you could take a look at our stuff, tell us what you think and possibly help us out on Indiegogo.
      The prototype is in portuguese, sorry about that!
      Have a good one!
    • By juglar
      Hi guys, we are developing a game called BiteOff! based on Zombies topic. BiteOff! is based on a game strategy mechanics, free to play, where the player has a bunch of zombies and he can distribute them along the map landscape to be able to bite and transform all humans into each level. Humans are controlled by artificial intelligence and they differ each other on capabilities based on different weapons that give them three different levels of aggressiveness to defend against the zombies. The zombies are also presented in three types and they are differentiated by their attack, speed, strength and resistance abilities. Through different achievements, (time to eat all humans, score, among others) the player can access four extra skills that can enhance your attack in real time on next levels as power-ups.
      We are launching a crowdfunding campaign in kickico and we need some helps please visit us on the crowdfunding page https://www.kickico.com/es/campaigns/17824/biteoff-the-videogame 
      Twitter @biteoffthegame
      Facebook
      Clickme!
      Website 
      Clickme!
    • By Lord McMutton
      The world of Ethios is held aloft by massive trees known as the Pillars.
  • Popular Now