MackeyK24

BabylonJS Toolkit: Space Shooter Demo

Recommended Posts

Check out my latest Space Shooter Demo

Has html gui, multiple levels or waves, score count, hazard count, restart by keyboard or gamepad button and ENEMIES :)

For Those who want take a look at the project details, all the code and assets... You gotta love the Unity Project Packaging.

So here you go: Space Shooter Project Source

Share this post


Link to post
Share on other sites

Also...

Still working on the Update-Over-Time features I need to add to the particle system so I get the Explosions (which us a few over time features to control the blast radius and other little properties to get that explosion effect)

So the Ship Jet particle system and the explosion particle system I will work on... But the Dual Star-field Particle System is Looking Great :)

 

Share this post


Link to post
Share on other sites

One more thing I forgot to mention... Look at your browser inspector/network... You see its using Pre-Compress .gz files and Compress binary json scene files :)

As streamlined as you can get for Babylon js web content (no offense to the Binary Converter) :)

 

Share this post


Link to post
Share on other sites
1 hour ago, Deltakosh said:

Huge!!!! All exported from Unity? This is insanely cool :)

Yep... EVERYTHING all done in unity editor... From every asset to every line of code, From beginning project to COMPLETE Packaging for Redist, Just as you would make a native unity game :)

 

Share this post


Link to post
Share on other sites
6 hours ago, HeadClot said:

@MackeyK24 Got a question for you - Will you be open sourcing the other player controllers? (First person, Third Person, etc.)

Those are not really scripts intended to be part of toolkit... that just me farting around with using the the Character Controller (which is apart of toolkit).

Thats the code you would create yourself to handle your character...

My First TestPlayer controller was just me trying to mess around with basic movement and using the built in BabylonJS Follow Camera... Really simple, not really a production ready type class/component... But here you are:

TestPlayer.cs

TestPlayer.ts

My next version is me playing around with my own camera rigging... Using mesh as a camera Holder with pivot child... that way I can simply move the main camera holder with player and rotate the pivot for LOOK AND TURN... Give a better ThirdPerson Camera Feel ... Especially when not moving... then can rotate the camera all around for LOOKING... when start moving... Snaps to moving direction, then rotate control the turn...

Again these are just me playing around, but here you go:

StrafePlayerController.cs

StrafePlayerController.ts

 

Have at it :)

 

Share this post


Link to post
Share on other sites
On 11/4/2017 at 5:13 AM, MackeyK24 said:

Those are not really scripts intended to be part of toolkit... that just me farting around with using the the Character Controller (which is apart of toolkit).

Thats the code you would create yourself to handle your character...

My First TestPlayer controller was just me trying to mess around with basic movement and using the built in BabylonJS Follow Camera... Really simple, not really a production ready type class/component... But here you are:

TestPlayer.cs

TestPlayer.ts

My next version is me playing around with my own camera rigging... Using mesh as a camera Holder with pivot child... that way I can simply move the main camera holder with player and rotate the pivot for LOOK AND TURN... Give a better ThirdPerson Camera Feel ... Especially when not moving... then can rotate the camera all around for LOOKING... when start moving... Snaps to moving direction, then rotate control the turn...

Again these are just me playing around, but here you go:

StrafePlayerController.cs

StrafePlayerController.ts

 

Have at it :)

 

Jajaja very nice I will check it out soon ...

Share this post


Link to post
Share on other sites

@MackeyK24 Ok is working now on  the latest version I will play with it and text you soon 

 

 

--UPDATE

- so I add an scene-manager script   to an empty game-object

- I add a camera-rig script 

but when I export I compiling typescript I get an error please see my setting maybe I got something wrong 

Capture.thumb.JPG.a26e46a045f7a451305eef6e7ac57f3c.JPG

 

 

Share this post


Link to post
Share on other sites
On 11/29/2017 at 11:25 AM, MrVR said:

@MackeyK24 Ok is working now on  the latest version I will play with it and text you soon 

 

 

--UPDATE

- so I add an scene-manager script   to an empty game-object

- I add a camera-rig script 

but when I export I compiling typescript I get an error please see my setting maybe I got something wrong 

Capture.thumb.JPG.a26e46a045f7a451305eef6e7ac57f3c.JPG

 

 

 

 

What is module.js and what is bootstrap_node.js... If that is from typescript...

 

Try and make sure on an updated version of typescript

Get new Node.js update first (to update the node and npm)

Configure optional Runtime Script Compiler locations. You can download and install or update the current Node Runtime to the default location. Then use node package manager to install or update the latest TypeScript Compiler to the default location.

Install TypeScript Command

Mac OSX: sudo npm install -g typescript
Windows: npm install -g typescript

ALSO... DONT PUT ANY .JS in the assets folder of your unity game project... if you need to package raw javascript in the game project assets folder... 

RENAME .js to .bjs ... The toolkit will then include the .bjs file into the main project.babylon.js.

 

Share this post


Link to post
Share on other sites
5 hours ago, MackeyK24 said:

 

 

What is module.js and what is bootstrap_node.js... If that is from typescript...

 

Try and make sure on an updated version of typescript

Get new Node.js update first (to update the node and npm)

Configure optional Runtime Script Compiler locations. You can download and install or update the current Node Runtime to the default location. Then use node package manager to install or update the latest TypeScript Compiler to the default location.

Install TypeScript Command


Mac OSX: sudo npm install -g typescript

Windows: npm install -g typescript

ALSO... DONT PUT ANY .JS in the assets folder of your unity game project... if you need to package raw javascript in the game project assets folder... 

RENAME .js to .bjs ... The toolkit will then include the .bjs file into the main project.babylon.js.

 

Hey Man I created a new project, and now its all working thanks. I also upgrade my typescript version and my node.js was already the latest ..

Is play time for me this weekend so I will be texting you later thank you  @MackeyK24 

Share this post


Link to post
Share on other sites

@MackeyK24 I'm having issues with the terrain but when I remove it, it all works fine so far so please check this issues and tell me what do you think

  1.  how to disable the light map baking  I dont like to wait alll the time for the baking just to test an scene so I want o disable  and enable 
  2. IM getting an error in my Microsoft  Visual Studio about FreeImageAPI When attaching to unity.
    Error    CS0246    The type or namespace name 'FreeImageAPI' could not be found (are you missing a using directive or an assembly reference?)    Baby-tolkit    C:\Users\cvega.BI\Documents\UNITY-PRJTS\Baby-tolkit\Assets\Babylon\Scripts\ExporterCubemaps.cs    9    Active.Capture2.thumb.JPG.628e001df967a8ce6da130e6ba9134db.JPG
  3. Im getting an error on the Unity console on candy-land's terrain  DivideByZeroException: Division by zero
    Unity3D2Babylon.Tools.SplitTerrainData (UnityEngine.Terrain parentTerrain, Int32 splitFactor) (at Assets/Babylon/Scripts/Tools.cs:3826)
  4.  Capture.thumb.JPG.2e3b91aaccb89b84bec83353045e0c9b.JPG

 

Share this post


Link to post
Share on other sites
48 minutes ago, MrVR said:

 how to disable the light map baking  I dont like to wait alll the time for the baking just to test an scene so I want o disable  and enable 

Disable 'Auto-Generate' on the Unity Lighting Panel... Then you must Manually click 'Generate Lighting' before your main build.

 

50 minutes ago, MrVR said:

IM getting an error in my Microsoft  Visual Studio about FreeImageAPI When attaching to unity.
Error    CS0246    The type or namespace name 'FreeImageAPI' could not be found (are you missing a using directive or an assembly reference?)    Baby-tolkit    C:\Users\cvega.BI\Documents\UNITY-PRJTS\Baby-tolkit\Assets\Babylon\Scripts\ExporterCubemaps.cs    9    Active.

Unless you are debgging the actual toolkit C# code for some reason or your are creating custom C# unity functionality of your own to add to Export process...

there should be NO NEED to debug C# code at all... You are NOT making ANY KIND of Unity C# game or project... The C# code that the toolkit uses is to EXPORT data from game objects in the current scene. There SHOULD BE NO RUNNING of any C# code (Beside what the Editor does to prepare babylon scene content)..

Again... unless you are debugging some custom code that runs in the editor at design time (which is only relevant if it is doing something to do with preparing game objects in the current scene that are to be exported) OR you are debugging the toolkit api itself... 

In which case simply add reference to FreeImageNet.dll located in the /Assets/Babylon/Plugin/Utilities folder

 

55 minutes ago, MrVR said:

Im getting an error on the Unity console on candy-land's terrain  DivideByZeroException: Division by zero
Unity3D2Babylon.Tools.SplitTerrainData (UnityEngine.Terrain parentTerrain, Int32 splitFactor) (at Assets/Babylon/Scripts/Tools.cs:3826)

Dunno here, except to say that does not look like a good terrain in the picture, also the Alpha Version you 3.1.044 has issues with the terrain shader, it still should compile, but I not finish working on terrain ... there are a couple of features that still need work, they are listed in the original announcement for the toolkit ... my latest version (which you dont have yet... 3.1 beta is not working with toolkit yet... for some reason 3.1 beta SLOWS DOWN when using cannon... once that issue is fixed I will release a 3.1 beta... unity then the toolkit still uses 3.1 alpha) :(

 

Share this post


Link to post
Share on other sites

Btw... My new 3.1 Beta I am working on (waiting for 3.1 beta performance issues to get fixed) now supports splatmaps.

I could not really get Texture Atlas going smoothly with all mipmap levels...

So the amount of terrain textures (with is matching normal map) is limit to a total of 6.

So you can splat up terrains with tp 6 different textures and each texture can have its own matching normal map.

This also limits terrains to ONLY support devices to MAX_TEXTURE_IMAGE_UNITS >= 16.

If is is not it will only render the base texture for whole terrain.

Here is a beautiful shot with 6 separate texture used for splatting the terrain:

 

5a21afb20dfd4_ScreenShot2017-12-01at9_34_20AM.thumb.png.f46878f646f13640b577e893ea8cb510.png

Including baked shadows on the terrain :)

 

Share this post


Link to post
Share on other sites
4 minutes ago, MackeyK24 said:

Disable 'Auto-Generate' on the Unity Lighting Panel... Then you must Manually click 'Generate Lighting' before your main build.

 

Unless you are debgging the actual toolkit C# code for some reason or your are creating custom C# unity functionality of your own to add to Export process...

there should be NO NEED to debug C# code at all... You are NOT making ANY KIND of Unity C# game or project... The C# code that the toolkit uses is to EXPORT data from game objects in the current scene. There SHOULD BE NO RUNNING of any C# code (Beside what the Editor does to prepare babylon scene content)..

Again... unless you are debugging some custom code that runs in the editor at design time (which is only relevant if it is doing something to do with preparing game objects in the current scene that are to be exported) OR you are debugging the toolkit api itself... 

In which case simply add reference to FreeImageNet.dll located in the /Assets/Babylon/Plugin/Utilities folder

 

Dunno here, except to say that does not look like a good terrain in the picture, also the Alpha Version you 3.1.044 has issues with the terrain shader, it still should compile, but I not finish working on terrain ... there are a couple of features that still need work, they are listed in the original announcement for the toolkit ... my latest version (which you dont have yet... 3.1 beta is not working with toolkit yet... for some reason 3.1 beta SLOWS DOWN when using cannon... once that issue is fixed I will release a 3.1 beta... unity then the toolkit still uses 3.1 alpha) :(

 

Ok Thanks for the light map tip I got it, as for the Visual studio I use it some times to debug things that happens while Im  exporting that how I use it.

For terrain I just add a new terrain and I get Exception: Terrain texture atlas packing list mismatch.  

So I will wait for you to fix the terrain issues, In the mean time I will play with the other features such as the character controller and the materials, also please let me know how to use the new tools to optimize the scene 

Share this post


Link to post
Share on other sites
1 minute ago, MrVR said:

Ok Thanks for the light map tip I got it, as for the Visual studio I use it some times to debug things that happens while Im  exporting that how I use it.

For terrain I just add a new terrain and I get Exception: Terrain texture atlas packing list mismatch.  

So I will wait for you to fix the terrain issues, In the mean time I will play with the other features such as the character controller and the materials, also please let me know how to use the new tools to optimize the scene 

Terrains are funky in that version... With that being said, still should compile. Make sure you have applied at least one texture to your terrain.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.