Stencyl 3.4.0 is now out. Get it now!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mdotedot

Pages: 1 2 3 ... 67
1
Journals / Re: 3D Library Adventure
« on: August 17, 2017, 11:13:36 am »
Thanks Squeeb.

Hopefully I can create an actual game with it.

This last demo looks promising to pull it off. Use the numbers to do an animation:




2
Journals / Re: 3D Library Adventure
« on: August 17, 2017, 12:35:34 am »
First Person Terrain Walking Demo







A lot of animated Knights






Mouse Pointing at Objects




3
Journals / Re: 3D Library Adventure
« on: August 16, 2017, 09:36:28 pm »
I've made the following test case:

* Oracle Linux
* Stencyl Beta 3.5 9480
* Copy-Pasted the native example to a Away3D folder and modified the info.txt, blocks.xml and renamed the .hx to Away3D.hx
* Modify the blocks.xml and info.txt to reflect the Away3D references.
* Download the Away3D github haxe library and put it the away3d folder in the engine-extension


To test outside Stencyl I used these steps:
* haxelib setup <your plaf/haxe/lib path>


run.sh
Code: [Select]

# to set the environment in Stencyl : haxelib setup $HOME/Downloads/plaf/haxe/lib
rm -rf Export/flash/release/bin/Away3D.swf # remove Example
haxelib run openfl build project.xml flash # build example
/root/Downloads/ext-tools/players/flash-10-linux Export/flash/release/bin/Away3D.swf

               Away3D.hx
Code: [Select]
import openfl.display3D.*;

import openfl.display.StageScaleMode;
import openfl.display.StageAlign;
import openfl.display.Sprite;
import openfl.display.BitmapData;
import openfl.display.Bitmap;
import openfl.events.Event;
import openfl.geom.Vector3D;
import openfl.Lib;


import openfl.display3D.*;
import openfl.display.Stage3D;

import openfl.display.Shape;

// Away3D
import away3d.containers.View3D;
import away3d.debug.*;
import away3d.entities.Mesh;
import away3d.materials.*; // colorMaterial
import away3d.primitives.*; // CubeGeometry
import away3d.utils.Cast;
import away3d.events.*;
import away3d.core.managers.*;

import away3d.events.*;


class Away3D extends Sprite{

        // Stencyl will use pass root stage
        private var stg:openfl.display.Stage;

        private  var _view:View3D;

        //scene objects
        private var _plane:Mesh;
        private  var _cube:Mesh;
        private var _player:Mesh;

        public var context:openfl.display3D.Context3D;
        private var cubeMaterial:ColorMaterial;
        private var collidedMaterial:ColorMaterial;

        #if stencyl
                private var engine:com.stencyl.Engine;
        #end

        // render loop
        private  function _onEnterFrame(e:Event):Void
        {


                _cube.rotationY+=1;
                _cube.rotationX+=1;
                //_cube.rotationZ+=0.1;
                #if stencyl
                        engine.setGameAttribute('Debug', 'PlayerX:'+_player.x);
                #end

                _player.x+=1;

                // Collision Detection
                if (_cube.worldBounds.overlaps(_player.worldBounds)){
                        _cube.material = collidedMaterial;
                        _cube.x=_cube.x+5;
                }else{
                        _cube.material = cubeMaterial;
                } // collision


                _view.render();

        } // onEnterFrame


        private function init(){
 trace('in init');
                // Context
                context = stg.stage3Ds[0].context3D;

                // away3D view
                _view = new View3D();
                addChild(_view);


                _view.camera.z = -1200;
                _view.camera.y = 200;
                _view.camera.lookAt(new Vector3D());

                cubeMaterial=new ColorMaterial(0xff0000);
                collidedMaterial=new ColorMaterial(0xff00ff);


                _cube = new Mesh(new CubeGeometry(200, 200, 200, 1, 1, 1, false),  new ColorMaterial(0xff0000));

                _cube.x = 300;
                _cube.y = 160;
                _cube.z = -250;

                _player = new Mesh(new CubeGeometry(130, 130, 130,1,1,1, false),  new ColorMaterial(0xffff00));
                _player.y=160;
                _player.z=-250;
trace(' the cube is : '+_cube);

                _view.scene.addChild(_cube);
                _view.scene.addChild(_player);


                // render listener
                stg.addEventListener(Event.ENTER_FRAME, _onEnterFrame);
        } // init

#if stencyl
        public  function stencyl(_engine:com.stencyl.Engine){

                engine=_engine;
                stg=engine.root.stage;

                // for android/iOS : force opaqueBackground : Stencyl overwrite
                #if mobile
                        // You still need 'no color' on scene property
                        engine.root.stage.opaqueBackground=null;
                #end
                stg.addChild(this);
                init();
        }
#end

        // haxelib run will call this (project.xml Main '')
        public function new() {
                super();
                #if !stencyl
                        //
                        // Stage
                        //
                        stg=openfl.Lib.current.stage;
                        stg.addChild(this);
                        init();
                #end
        }


} // Away3D class

// eof haxe file




               project.xml
Code: [Select]
<?xml version=”1.0" encoding=”utf-8"?>
<project>

 <meta title="Away3DTest" package="" version="1.0.0" company="MyCompany" />
 <app main="Away3D" path="Export" file="Away3D" />
 <source path="." />

 <haxelib name="openfl" />

</project>

You can now do the run.sh on the system to get a swf file.

STENCYL

Create a scene with background properties set to NO COLOR !!!!!!!!!

Add Away3D extension using the Settings : Extension tab.


To call the code from Stencyl this is all it takes:
Code: [Select]
var a=new Away3D();
a.stencyl(Engine.engine);


Since this code works we now can make more examples and investigate all the Away3D possibilities.


Thanks to Justin to get the engine.root.stage from the Stencyl Engine since without this it
would not show antyhing.

4
Journals / Re: 3D Library Adventure
« on: August 16, 2017, 09:30:21 pm »
For Merrak (and for those of you who like to read a lot of stuff)

Log July-August

Investigated:
* BabylonHx
* OmniHx3D
* HaxeBullet (might revisit)
* Away3D (see for all the steps to actually make something work : next post)

                  BabylonHx


This works with haxelib run lime but with an older haxe.
I would have liked to get this to work since it has collision detection / physics and much
more features than Away3D.



Trying to convert the library to Stencyl 3.4 and/or 3.5
     Loads of 'Float32' Type conversion. Comparing stuff to null.
   To even get some small demo to work it took me 2 days to correct all those errors.
   When I started with the next small demo it gave another huge list of errors to correct.
   That was with demos using a scene, camera and 1 object; not even fancy stuff or collision detection



Windows 7 64bit (profesional) [ Windows XP does not work (32bit) ]  in Virtual Box on Mac

Environment variables:

HAXEPATH c:\haxe
NEKO_INSTPATH c:\neko
Download : Haxe 3.2.0rc
    download haxe 3.2.0rc

Extrac into c:\haxe (so copy paste files from the 3.2.0rc directory


For neko version refer to this list:

HAXE     NEKO

2.*   1.*

3.0.0   2.0.0

3.1.3   2.0.0

3.2.0   2.0.0

3.3.0   2.1.0

3.4.0   2.1.0



So Neko 2.0.0 it is. Download from package.chocolatey.org/packages/neko/2.0.0 > neko.2.0.0.nupkg

 7-zip unarchive



* haxelib selfupdate

current version is now 3.2.0-rc.3



* haxelib install lime

(5.3.0)

* haxelib run lime setup windows

(Vc++ Express  installation)





* haxelib install lime 2.7.0

* haxelib install hxcpp 3.2.193

* haxelib install openfl 3.4.0

* haxelib install actuate 1.8.6

* haxelib install format 3.2.1

* haxelib install poly2trihx 0.1.4



* Download & install git : https://git-scm.com/download/win

* haxelib git BabylonHx https://github.com/vujadin/BabylonHx


* haxelib git BabylonHxSimpleTest https://github.com/jfroco/BabylonHxSimpleTest
 haxelib_client 3.2.0rc3
 actuate 1.8.7
 hxcpp 3.4.64
 openfl 3.4.0
 lime : 2.7.0
haxelib run lime setup (will install windows)

If you want to install Visual C++ 2015 you need to select language:
*        Custom -> Next
*         Programming Languages (collapse)
*        Visual C++ languages
*         Next
*          Signing with your microsoft account (create one if needed)
*      Team : click on not now link next to button
*   Start Visual Studio so that it goes through the project phase.

               


* haxelib run lime build project.xml windows
This takes some time as it creates afile:
      bin_lime\windows\cpp\bin\BabylonHx_Lime.exe

This works!

Attempt with Stencyl (installed into c:\abc)

* haxelib setup c:\abc\plaf\haxe\lib

* haxelib list

Should list stencyl among others

If you want to make another version active use:
* haxelib set lime 3.2.1
* haxelib run lime setup (installs bunch of stuff)


* haxelib install hxcpp
* haxelib install lime
* haxelib run lime setup windows
* haxelib run lime build project.xml windows

Failed due to type mismatches.

After moving back and forth between different stencyl versions (3.2 upwards)
and not getting good compilation and with the week re-coding to not get much done
I gave up on BabylonHX

               OmniHx3D

After installation it immediately gave huge lists of type errors.
Not wanting to go the same route as with Babylon: I gave up

----

               Away3D

Finally a library that didn't reported an error when using just a 3d View.

The next post has the steps to get a sample working on haxe AND in Stencyl

5
Journals / Re: LD39 : ROOP
« on: August 16, 2017, 12:34:32 pm »

For now I've stopped working on this Ludum Dare adventure and started a new one using a cross-platform library:
http://community.stencyl.com/index.php/topic,52085.0.html

I've learned so much using the ThreeJS library and it made me want to do more with 3D.

6
Journals / 3D Library Adventure
« on: August 16, 2017, 12:31:42 pm »
Last Ludum Dare I got a taste of 3D.

Since that time I was looking into other libraries then ThreeJS (html5 only) which I used first.
I couldn't stand that there was no cross-platform solution.

I've finally found one that does half what I want : Away3D.

With a little help from Justin I was able to draw stuff on all the publication methods of Stencyl.
Since I was using the 3.5 beta version, and didn't want to upgrade my old macbook, I was only able to test using the simulator and didn't have the opportunity to do a device test.

So : iOS Simulator, Android, Linux, Mac, Windows, Flash and HTML5 all work just fine.


Here are some of the screenshots:




  HTML5 Demos

Unfortunately there is no HaXe port of the AwayPhysics library, so for now I'm trying to do stuff with simple physics/collision bounding boxes.

I've started a new journal to investigate how to make an extension out of this.


7
Ask a Question / Re: Fog of War (Need help ASAP)
« on: August 09, 2017, 09:28:39 pm »

8
The game.xml is empty. That is one of the most important files.
I don't know how to recreate it using the files you have.

You really should be exporting your games : File > Export
And keep that .stencyl file somewhere safe.

Repeat this process every week or when you have done major updates.

9
Ask a Question / Re: trying to build to html5
« on: August 02, 2017, 09:03:41 pm »
2017-08-01 12:31:24,865 DEBUG [Thread-51] stencyl.sw.util.StreamGobbler: [haxelib]  - Running command: java -Dapple.awt.UIElement=true -jar /Applications/Stencyl/plaf/haxe/lib/lime/lime/templates/bin/compiler.jar --js Export/html5/bin/power.js --js_output_file /var/folders/hc/9533xl817xqgglrb4dsrb0480000gn/T//temp_9563622.js
2017-08-01 12:31:24,890 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: [haxelib] No Java runtime present, requesting install.


Did you try to do a Run -> HTML5 ? If so : try (also) Publish -> Web -> HTML5   

Either case you need Java. You might be able to download it using Stencyl: Debug->Android->reinstall Java JDK

In a terminal you need to check if this works:
 java -Dapple.awt.UIElement=true -jar /Applications/Stencyl/plaf/haxe/lib/lime/lime/templates/bin/compiler.jar


If that gives an error that it can't find something you still should investigate the java environment.

Hope this helps.

10
Journals / Re: LD39 : ROOP
« on: July 31, 2017, 07:09:54 am »

Step 7: 16:00 day3


Level 3



Level 4






  Seventh Step

Done:
  • Mouse Follow on mobile fix(hopefully)
  • Textures
  • 3D Model
  • Level Heights
  • Game Mechanics
  • HUD (no text or extra images on it yet)

Maybe I call it a day since I need to relax and spend time with my loved ones.

The last level (4) is still broken as the android-robot needs to move instead of do an idle walk.



11
You should really shop around to find a free server that suits you. As most of the time free comes with a price :D
The servers are most of the time slow and even sometimes unreachable.

Here you can find information on how to setup a free server, but the server in question had poor performance and was down a lot:
http://community.stencyl.com/index.php?topic=42188.0

12
Journals / Re: LD39 : ROOP
« on: July 31, 2017, 12:21:19 am »
Step 6 : 09:00 day3

Done:

  • Mouse Movement ‘move to mouse’ behavior
  • Camera Tweening
  • SkyBox
  • MeshTextures
  • Core Game Mechanics


Next: Levels

13
For testing purposes I've made my server available to Stencyl users for 30 days.

After that you should make your own server. There is also some documentation on how to setup a free server. There are a few providers online that give away server power where you share resources with others. Not the fastest environments but it might give you an opportunity to learn and see if your game could be successful. If it does get successful you should have enough money to rent your own server. It costs about 10 to 25 dollars per month depending on your needs.

14
Journals / Re: LD39 : ROOP
« on: July 30, 2017, 10:48:36 am »
Thanks Liberado.


Step 5 (19:30 day2)







Learning so much about 3D/Textures/Matrices, etc.... and learning that is exactly what Ludum Dare is about for m.e.

Done:

  • Lighting / Shadow
  • TextLabels
  • Rotation Prevention
  • Level Implementation
  • Power Increase/Decrease


Next: More Levels / Textures / Physics


15

Multiplayer games are hard to make.

I've no experience with Steam.

Setting up your own server is difficult as well.

There is a multiplayer game kit that uses the Lobby and Turn extensions which can give  you a start.

You should really investigate the examples and the documentation if you are serious to make multiplayer games.

Did I say that making multiplayer games is hard ....

http://community.stencyl.com/index.php?topic=42202.0

Pages: 1 2 3 ... 67