This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

OcularCash

ADG
  • Content count

    3,203
  • Joined

  • Last visited

Everything posted by OcularCash

  1. nvm, looks like it's only rendering half the models in the scene correctly. Last night I used a basic cube anchored to left hand coordinates to get it how it's supposed to be. But this morning I tried an entire scene and it seems some models are flipped on the z (as they should be) and some are flipped on the y for some weird reason. Before adding the z calculations everything rendered together, just on a left hand coordinate system. So I'm guessing I messed up somewhere somehow. I'm going to have to step through the shader code later and see which line it is that is flipping some of the models upside down. lighting is working great tho so I guess that's a plus lol edit: fixed. I inversed [+] the z positional coordinates but I forgot to inverse [+] the x rotational matrix. I'll post it later tonight or tomorrow
  2. After I finish the current game engine I'm working on right now (about 2 or 3 weeks left), AU Core Game Engine will begin development. But like the title says, it is a "core" 3D game engine. It will be developed for my new game so most likely if its not being used in the game, it will most likely not be included in the engine. Features it will include is: fully functional aabb physics engine (not obb is the game does not require it) including "raycast" "aabb cast" "sphere cast" "triggers OnTrigger" "collision OnCollision" and your normal physics stuff. It will be fully component based with getting and setting components. Basic editor UI. Full skeletal animation system. And all your normal everyday components. the engine will be a free, fully open source engine for the community with no restrictions outside of pretending you made it and/or trying to sell it. It will be built in java but release when the game is released, I will port to c# and c++ if there is enough requests. Alphas will be posted every so often but the full engine won't be available til the release of the game. just thought I'd give everyone a heads up in case your looking for your own engine. This will be last time you'll here about it til further in development https://github.com/JosyahDooley/DevEngine DD3 Model Exporter in Unity 5 to be used for DevEngine v0.01a import System.IO; class DD3Exporter extends EditorWindow { private var meshFilter : MeshFilter; @MenuItem("Window/DD3 Exporter") static function Init() { var window = ScriptableObject.CreateInstance.<DD3Exporter>(); window.Show(); } function OnGUI() { meshFilter = EditorGUILayout.ObjectField("Mesh Filter:", meshFilter, MeshFilter, true); if(meshFilter) { if(meshFilter.sharedMesh == null) GUILayout.Label("Mesh Filter Does Not Contain Mesh!"); else { GUILayout.Label(meshFilter.sharedMesh.vertices[meshFilter.sharedMesh.triangles[1]].ToString()); } } if(GUILayout.Button("Export")) { if(meshFilter != null) { if(meshFilter.sharedMesh != null) { var path = EditorUtility.SaveFilePanel("Save Mesh as DD3", "", meshFilter.gameObject.name + ".dd3", "dd3"); if(path != null) WriteFile(path); } else EditorUtility.DisplayDialog("Missing Mesh!", "You must have a mesh attached to the MeshFilter to export!", "OK"); } else EditorUtility.DisplayDialog("Missing Mesh Filter!", "You must have a MeshFilter assigned to export!", "OK"); } } function WriteFile(path : String) { Debug.LogWarning("Saving at: " + path); var sw = File.CreateText(path); var temp : Mesh = meshFilter.sharedMesh; sw.WriteLine("DevEngine Exporter |v0.01a| formatted for OpenGL"); sw.WriteLine(temp.vertices.Length.ToString()); sw.WriteLine("[Start Mesh]"); var i : int = 0; for(i = 0; i < temp.vertices.Length; i++) { sw.WriteLine ( "v/" + temp.vertices[i].x.ToString() + "/" + temp.vertices[i].y.ToString() + "/" + temp.vertices[i].z.ToString() + "/" + temp.normals[i].x.ToString() + "/" + temp.normals[i].y.ToString() + "/" + temp.normals[i].z.ToString() + "/" + temp.uv[i].x.ToString() + "/" + temp.uv[i].y.ToString() ); } var line : String = "i/"; for(i = 0; i < temp.triangles.Length; i++) { line += temp.triangles[i].ToString(); if(i < temp.triangles.Length - 1) line += "/"; } sw.WriteLine(line); sw.WriteLine("[End Mesh]"); sw.Close(); Debug.Log("Save Complete!"); } }
  3. Merged. Got it to render as it should. Since OpenGL uses left hand coordinates and unity uses right hand with inversed (positive) x (+x, +y, +z) I had to flip the camera, inverse the x transformation (+x) and negate the view matrix (-x) to flip x world coordinates. The model then get flipped inside out once I inverse the x (+x) the vertice positions so I had to cull the front face instead of the back. A lot of fiddling but it's working... hopefully for good. We will see once I add light calculations edit: Even better, just negated the transformations z and inversed (+z) the view matrix. Then inverted the z in the vertex shader and culled the front face. Now I don't have to flip the camera
  4. Merged. If the mesh isn't triangulated or there were no included uvs or normals it will throw that error. Basically just saying the format of the mesh is not what's it's expecting
  5. Ya, I'll get around to that eventually. Some of the code itself has to be changed as the code I'm using to to import only works within the ide at the moment. It's not that much more that has to be added to compile as a standalone but I haven't had the need to add it yet. the rest of the stuff is things like compiling to a jar and turning it into an executable, then adding the resources and recompiling to hide them. But I will write up a compiling instructional once I get to that point. Right now I want to focus get the core engine to where it needs to be
  6. v0.01b will be available soon. Having some issues getting the right view matrix and/or transformation matrix to match unitys. Everything is working, just have debug the matrices being sent to the shader to get the proper projection axis. Once the matrices are fixed, I will post it. 0.001b will include unity scene exporting for gameobjects, transform, cameras, mesh renderer / filter and exporting if used textures, materials and mesh. Just hit the export button in unity, select the res path and click play in DevEngine, simple as that
  7. Looks like it should work from what I've read about it. Not sure why that's happening
  8. Sounds good. Probably will tomorrow. Doing birthdays for 2 of my sons today
  9. It's a story book game... the kingdoms are split up into different storybook lands. 1 kingdom may be a Dracula type kingdom with zombies (from graves, not the new age) with vampires and werewolves and another kingdom maybe like Hansel and Gretal with candy opponents and witches. So each kingdom is themed. The goal is collect keys from each boss of each kingdom to open the door back to reality. The Magnificent Mind of Delirious Devon and the Hunt for Home... is what I'm thinking the name will be. Fits the story of a boy trapped in a delusional world making his way back to reality. Trapped in an open world environment that was said to be fairy tales edit: might change it from collecting keys to collecting pieces of his mind
  10. My character models are very simple and easy to make. Every model uses the same base mesh and I just extrude things here and there and change the skin. Here is the zombie that just uses extrusions based on the main character Zombie.zip
  11. Looks good. My kind of art style. Not really feeling the character poly tho. I like the skin but the boxy character is throwing it off, I guess just bc it's so overused. Big reason why I'm personally doing a melon head character bc it hasn't been used too much since the 90's edit: and by the way, great thinking on the dark skinned character, don't really see that much
  12. Thanks erarnitox. Just finished scene file importing. It's pretty basic but it does the job for the moment. It will be more complex in the future initializing new classes ON classes and blahdy blahdy blah, but don't really need it just yet. Here is what it currently looks like: &TestObject 0,0,0 0,0,0 1,1,1 >engine/Camera >engine/MeshRenderer/Flowers,Default >game/Test &TestObject2 1,0,0 0,0,0 1,1,1 >engine/MeshRenderer/Cube,Default "&" Tells me the name of the gameobject to be instantiated in the scene. The first 3 lines after tells me the position, rotation and scale of the transform. ">" Tells me that there is a component attached. "engine/camera" Tells me the script I want to add is in the engine package and it's name is camera. "engine/MeshRenderer/Cube,Default" Tells me that I should add a MeshRenderer found in the engine package with the a mesh named "Cube" and a material named "Default". At this current moment, The only way to create a scene file and edit it is by hand and typing it up. Once I get around to it, I will make a scene exporter for Unity so you can use Unity as a scene builder and export the scene file and run it in DevEngine. There will also be an editor in DevEngine but it won't be at the scale of Unity, basically just to add components to objects and change there variables and so on. Here is the importer in Java so you can see how it loads in code: /////Import a scene save file from disk public static void ImportScene(String filePath, String fileName) { //Create an empty file reader FileReader fr = null; //Try to open the file at the given path try { fr = new FileReader(new File(filePath)); } //If the path doesn't exist, print and error and the stack trace catch(FileNotFoundException e) { System.err.println("Couldn't load file"); e.printStackTrace(); } //Create a new buffered reader and initialize a temp string BufferedReader reader = new BufferedReader(fr); String line; //Try to parse try { //Read the first line and create a temp GameObject variable line = reader.readLine(); GameObject go; //If the line at this moment is an object if(line.startsWith("&")) { //While the line at this moment is an object while(line.startsWith("&")) { //Set a new GameObject in the temp variable and read in it's transformations go = new GameObject(line.replaceAll("&", "")); String[] position = reader.readLine().split(","); String[] rotation = reader.readLine().split(","); String[] scale = reader.readLine().split(","); //Parse and set the transformations on the GameObject go.transform.position.Set(Float.parseFloat(position[0]), Float.parseFloat(position[1]), Float.parseFloat(position[2])); go.transform.rotation.Set(Float.parseFloat(rotation[0]), Float.parseFloat(rotation[1]), Float.parseFloat(rotation[2])); go.transform.scale.Set(Float.parseFloat(scale[0]), Float.parseFloat(scale[1]), Float.parseFloat(scale[2])); //Trim the spaces out of the beginning of the line if any line = reader.readLine().trim(); //If the line is component information if(line.startsWith(">")) { //While the line is component information while(line.startsWith(">") && go != null) { //Parse the string and add the component to the current GameObject String[] path = line.replaceAll(">", "").split("/"); go.AddComponent(path[0], path[1]); //If the component is a MeshRenderer if(path[1].equals("MeshRenderer")) { //Get the added MeshRenderer and parse the variables out MeshRenderer mR = (MeshRenderer) go.GetComponent("MeshRenderer"); String[] visuals = path[2].split(","); //If the MeshRenderer is not null (Just a safety check. Should never be null at this point) if(mR != null) { //If the mesh for this renderer is not supposed to be null, find and attach it if(!visuals[0].equals("null")) { mR.mesh(Mesh.Find(visuals[0])); } //If the material for this renderer is not supposed to be null, find and attach it if(!visuals[1].equals("null")) { mR.material = Material.Find(visuals[1]); } } } //Read in the next line line = reader.readLine(); //If the line is not null, trim out the spaces like before if(line != null) { line = line.trim(); } //If it is not, break out else break; } } //If the line is null, break out if(line == null) break; } } //Close the reader reader.close(); } //If the file isn't parsing properly catch (IOException e) { //Print the stack trace e.printStackTrace(); } } Pretty simple to understand but like I said, at the moment, it's still quite basic. I've also go most of the primitives class done, so primitives are generated by code on start and stored into memory. As you can see in the scene file, the mesh "Cube" is actually using the Cube primitive that is now built in. The gui is still barebones and non operational tho. I will not begin GUI until I finish the PostProcessing Pipeline because the gui will participate at the end inside of an fbo (Frame Buffer Object, same buffer type as what postprocessing uses). Edit: Finished adding loading variables in custom game scripts. You will need to add a function like this to your script: public void Set(String[] v){} Inside this function, you will just need to parse it and add to the corresponding variables. The reason this system does it like this is that unlike normal game engines, I am removing 99% of all reflection calls and setting variables in normal engines indeed use reflection to get and set variables that contain custom (public) properties. My engine will ofcourse not, but will need to add the Get and Set function and tell the parser which variables you want to save and load for a specific class and parse the variable information to set them
  13. ive actually stress tested ongui with texture guis (1drawcall per GUI) that will give you a good idea about approx drawcall frame dropping. This is testing strictly draw calls, you also have to factor in vert count when dealing with drawcalls with mesh. This test test was done on an average pc. As you can see, fps isn't affected much by thousands of drawcalls with mesh drawcalls, drawcalls don't matter much, it's the very count that kills you the most. I can bog a decent pc with 10 draw calls with the right mesh
  14. C++ is great, but only maybe a total of 5 people on this forum knows the basics of it, let alone advanced knowledge. C++ is actually my first language, but no sense in making an engine no one on the forum could use. c# on the other hand, nearly everyone here knows. The problem with c# is it's like the bastard child of c. Which means a long time ago it was a great language and there was large amounts of resources available and wrappers. Nowadays, not so much. C++ overshadows c# so much, not because it's better but because it was it was made the "college language", that dx is literally dead on newer windows for it and they're OpenGL is a huge hunk of outdated scrapmetal. Trust me, I looked for quite some time, I wanted to do a c# version for the community but I want to provide a performance upgrade, not a downgrade. java was the best alternative to c# for both me and to release. Even tho it's literally identical c# so much that if I posted code here right now no one would know the difference unless I told them, Java is outside of the c family and there OpenGL api, mainly lwjgl in my personal opinion, is some of the best out there. And since the release of mine craft, Java apis have been getting massive love by API developers. when it comes down to making something as large as unity and faster than unity, yes we can can make it faster (unity is actually slow as snails), but user friendly and sack wise, 2 men cannot achieve that. Also, besides myself, and I'm not aware of any other forum member that has tackled making a 3D game engine on the forum and making a game engine is a lot different than making a game.
  15. Updated
  16. If your still having troubles when I get home, I'll add to the read me file
  17. to compile, you just need lwjgl 2 and slick. If you don't know how to add those, go to any java game tutorial and go the setup (like bennybox or thin matrix). It's just adding external jars into your project
  18. Will probably be a few before v0.01b. I'm currently building onto the dd3 exporter and making it a dds exporter (DevEngine Scene). The new dds exporter will export entire unity scenes (mesh, textures, audio, game objects, components) into a format DevEngine can read. that way I can use unity to build my scenes without having to program an elaborate user friendly interface and instead, use the engine strictly for running the game. it will no convert scripts to java tho. It will only save component names and variables and match them to the correct java versions
  19. Went ahead and created one and posted it so I can go straight to the audio in the morning. https://github.com/JosyahDooley/DevEngine DD3 Model Exporter can be found in the first post. Just drop this in unity and export your mesh to DD3 format. The reason why it's written for Unity is because unity handles edge splitting so developers with little modelling knowledge don't have to learn how to split edges and seperate UV's, etc... Unity handles this for us when it's attached to a meshrenderer so all we have to do is export it to DevEngine Format (OpenGL Formatting Format)
  20. Tomorrow morning at approx. 7:45am American cst is when I'm putting it on github
  21. I'll be putting the current progress up tomorrow morning if I have time. I'm going to try to get the fit the audio in there before repoing it. I wasn't able to add everything back in yet so it's currently only just a very basic renderer and the demo will only render 1 object with 1 texture (can render more, but demo will only provide that). Here is some of what is done and still to do: ready: imports DD3 model format imports png image format renders mesh with texture Textures allows transparency depth testing scene fog enabled antialiasing enabled multiple cameras (doesn't render depth between cameras yet) full component support get and add components camera and object matrixing enabling disabling components/objects alot more other stuff not ready: cameras don't render layer depth masking between other cameras yet Most scripts have several functions still to be added not implemented yet: physics shadows audio rigs animating etc anyone wanting to try it: this is way way way early in development. This is simply to post it for people to see early development. Anyone without prior knowledge is going to be pretty lost looking at the code. User ready version will not be until v1.0a, current version is v0.01a so you can tell it's got a ways
  22. Only use arrays of standard objects such as int, float, double, Boolean, string, etc.. no vectors or special classes (well outside of the class that is storing that data, but it only needs created once). That way you can save on instances. It would be something like this: var pX : float[]; var pY : float[]; var pZ : float[]; var rX : float[]; var rY : float[]; var rZ : float[]; var vX : float[]; var vY : float[]; var vZ : float[]; var aiming : int[]; var grounded : int[]; and at the beginning of the match, create the class and set the size of all the arrays at frames/s/m/match length. Don't pass in information every frame, but more like every 5/second and you can Lerp towards that information in the theatre. that should be perfectly fine. As long as you don't use instances like vectors and Quaternions and what not, you should be perfectly fine to do it however you want. Then just pass the instanced class that holds all those array to the server host or whatever
  23. Lol sounds like not many people understand that your not recording a movie. As I understand your wanting a blackops style theatre model with free camera mode correct? Here would be my approach: I would create a a couple different state enums and stuff like position rotation and velocity (for animations), most likely you already have, and package it locally in a class, then pass it to the host at game end or lobby leaving and the host passes all the player data to the database at the end of the match. there is tons of ways to do it, but the main approach, for speed sake, is to store your own data locally and pass it once when the lobby ends or player leaves. That way your not wasting bandwidth
  24. That's a unity 5 bug. I believe used to work in 4. My phones dying but you can do it procedurally yes
  25. As oma said. Think of php like webpage that acts like a pointer that gets and set from the database. Most webpages that has MySQL also has a php section. Smallest example of php and unity I can find: http://stackoverflow.com/questions/28662684/mysql-php-login-system-accepts-any-password-sent-from-unity