• Content count

  • Joined

  • Last visited

Community Reputation

349 Neutral

About eduardo_costa

  • Rank
  1. You can use Sweep and Prune that is commonly used in Physics. SAP tests can be done with 3 "if" checks. Updating the the structure is O(1) too.   I'm managing a 100k cubes demo in WebGL with 44fps. Without SAP it runs at 7fps only.
  2. Hey all! I'm developing an engine in both WebGL and Android native using Haxe. There is some strange performance issue happening though. Running a simple example with 300 cubes in WebGL it runs at 60fps in Chrome Desktop and 30fps in Chrome Beta in my Nexus4. 300 cubes demo. Now. I'm also compiling the same demo in Android Java and generating an APK. But the APK is running at 20-30fps top. Considering that it is native, the performance shouldn't be above WebGL at least? * If requested I can provide the APK too. * ## Extra Info ## - Nexus4 Phone with latest android update. - Haxe compiles its "Float" type into Java's "double". - Cube shader is alpha blended and have 'discard' commands. - GLSurfaceView 'isHardwareAccelerated' flag returns true. - Tracing the GLES calls during render I'm issuing just a Uniform(WorldMatrix) + DrawArrays(TRIANGLES) per Cube (so 300 total)
  3. I want to be a game what should I so ?

    There are different paths. - Work in a game company - Good to learn the workflow - Get experience and make mistakes - Choose one of the 3 majors: - Programming - Computer Science courses helps a lot - C# + Unity3D (good starting point w/ lots of tutorials and examples) - Javascript + Canvas2D (also lots of examples in the web) - Actionscript3 (Flash editor also offers a good ambient) - Game Design - Books - Self Experience = Play Games a lot - Tutorials and Post-mortem docs from AAA games - Art - Also another major that needs extensive training and education - 2D (Photoshop, Vector based editors,...) - 3D (Maya, 3D Studio Max, Blender) - Make your own game - Programming - Unity3D (fastest way to see code to result) - Game Design - Self Study and Learn by example - Art - 2D (faster do create and less complex than 3D) - Photoshop / Vector Art - Best Practice = Work in a team - Really hard to handle all stuff alone
  4. Flexible particle system - The Container

    Sup! If you want to look how the compute shader for a GPU particle look like!
  5. I don't remember if I succeeded in sending Matrix4 arrays. My engine is sending Vec4 arrays for now. The reason behind this is that Transformation matrix can be 3x4 which spare you 1 Vec4 per matrix. Considering you have a limit of uniforms in the vertex shader, this is mostly welcome!
  6. Flexible particle system - The Container

    @fen Feel free to follow here
  7. Flexible particle system - The Container

      I have this task finished in my opensource WebGL engine. Feel free to ask anything when you reach this step!
  8. Flexible particle system - The Container

      Example of this practice would help slow languages like Javascript to handle more particles.
  9. Flexible particle system - The Container

    Considering that most modern hardware has support for Float Textures. Why not simulate it in the GPU. You can update around 600k particles with a 2048x2048 texture or even 2.4M in a 4096 one.
  10. Haxe WebGL Engine

    Hi!   Haxor is now it is available for download!   You can use it with FlashDevelop and the Haxe language.   [attachment=21388:launch_wide.png]    
  11. Haxe WebGL Engine

    [attachment=21376:Untitled-1.jpg] Hi! Today I opened my site to show some examples and features of the Haxor Engine a Haxe based engine to develop applications on HTML5 and all its technologies (Canvas, WebRTC, WebSockets, WebGL,...)   I could explain all features and give more details, but it would turn out TL;DR;   The website contains examples and more information.   Tomorrow May 7th I'll open the haxelib and mercurial repository for everyone to take a look at the engine!   Feel free to follow me on Facebook [] and [twitter]HaxorEngine[/twitter]   Thank you!
  12. GameEngine from start to finish(DevLog)

    About doing in C++ allowing C# scripting, I found it great! My experience making these two communicating is really shallow so I could not use this technique! My point is that making the end-user working in C++ nowadays isn't that productive anymore.   Using XML as scene manager was my choice to avoid binary data being loaded with XMLHttpRequest (HTML5+WebGL Engine). Other data is a mix of XML and Base64 bytes compressed using LZMA. So a 'mesh' would be:   <mesh> <vertex>base64_float_bytes</vertex> ... </mesh>
  13. GameEngine from start to finish(DevLog)

    As a fellow EngineEngineer (I'm doing one but WebGL in HaXe language) here are some cents.   If you're focusing in the end-user you should try C#, as you said the perfomance will not be an issue (look at Unity3d), simple and frequent operations like sorting, delegates, get/set methods and other hi-level stuff done in 1 C# line will help a lot.   Just wrap OGL stuff in a static class and you are free to create a higher-level class library that make the calls organized and the GC is a good friend too. In terms of class modelling I found Unity's way really awesome (Entity-Component based), you have a container (Entity) and Components are attached to it, after that, only destroying it will remove it (it is nice to avoid lost references).   I have a 'Object' like class (Resource) which contains useful stuff like unique-id, name string, ... which I register in a global Resource list, useful to simply destroy everything after a scene changes or globally search any stuff based on type or name (Reflection is another awesome feature of C#).   I organize stuff in scenes wich is basically a XML [dependecies + hierarchy] that create stuff in RAM/GPU memory and also creates the entities in 3d space with its components + reference to the loaded dependencies. When a new scene is called, destroy everything and restart the process.   About OpenGL, I suggest also following Unity's footsteps. Working with the concept of Renderer + Material, I reached a way to sort the rendering stuff based on properties of both elements and then optimizing stuff and fitting RenderTarget operations (E.g. ImageEffects) more easily in the pipeline.   Lastly, I will reveal the feature that took most of my time in the 6 months of development. The Collada Loader adapted to correctly load Bones and Animations. It was a real pain. Also the Skinning technique was hard to make it work efficiently in the GPU mode.   Nice post! Keep in touch!   **Edit**   Also create a static class to draw any kind of gizmo on top of everything (lines, wirespheres,wirecube,...) it will help a lot to debug hard stuff (skinning)