Content

Post new topic Reply to topic
1, 2, 3  >>

ZEQ2-Lite Unity conversion (unnoficial) - Warm up

Author Message
Eagle The Purpose View user's profile Send private message

Reply with quote Wednesday, February 25, 2015

Heya! I was wondering which type of files would be perfect to use.

On models ? (md3, max, edf etc..)

On sounds ? (wav, ogg, mp3 etc..)

On pictures ? (jpg, png, tga etc...)

Question for Zeth.

Are dll relating file formats self made or taken from ioq3 ?

Thank you for answering.

Zeth The Admin View user's profile Send private message

Reply with quote Wednesday, February 25, 2015

All of your questions depend on usage patterns / needs. I'll try and give you a VERY rough breakdown without going into too much detail.

On models ? (md3, max, edf etc..)


MD3 is a flattened mesh format used by Quake 3 almost exlusively. It has no skeleton support. Due to its vertex snapshot nature, it can get very large. MAX is a production format exclusive to Autodesk's 3D Studio Max. Although it can be imported with some engines, it's largely uncompressed and proprietary. FBX is a format I'd recommend for most export/import needs as it preserves mesh, weighting, skeleton, material and a plethora of other data across various engines and software without excessive file size.

On sounds ? (wav, ogg, mp3 etc..)


WAV is raw, uncompressed, lossless audio. It's widely supported and has practically no playback overhead, but files are HUGE and thus not recommended for practical usages in most cases. FLAC also provides lossless quality audio, however, is compressed for considerably smaller file sizes (and better data storage for things like tagging). Both OGG & MP3 are lossy audio formats with similar (even smaller) file sizes. Each have different quality advantages at different frequency rates. OGG is an open format whilst MP3 is proprietary.

On pictures ? (jpg, png, tga etc...)


BMP is a raw, uncompressed, lossless image. Like WAV with audio, the files are HUGE and its usages are narrow. BMP does not support an alpha channel. TGA can be both compressed/uncompressed, is lossless, supports multiple color bit depths, and supports per-pixel alpha (via an optional alpha channel). The format is quite old and the files are generally still fairly large, but if you needed transparency, it was the way to go years back. PNG also provides lossless images whilst being compressed. It supports a standard per-pixel alpha. Much like GIF, you can palettize and reduce color depth for tiny files. JPG is a lossy, compressed format best suited where disk/memory constraints exist and some level of quality loss is acceptable. The results won't be as pleasing as a lossless format, but generally will be quite a bit smaller when working with images with a lot of complex colors/gradients (photorealistic images).

Are dll relating file formats self made or taken from ioq3 ?


Which dlls are you referring to? A dll is just a compiled set of code/data designed to be accessed/shared from external sources. Most engines/software rely on a lot of dependencies such as these. Some are included locally while others may be system-wide.

Eagle The Purpose View user's profile Send private message

Reply with quote Wednesday, February 25, 2015

Thanks for the response.

FBX files are also used by unity. I hope 3dsmax can import/export them.

So, you recommend using FBX, flac (mp3 and ogg, depending of the situations) and PNG ? (from what I have seen of png/jpg, I prefer the first one, because jpg render a little more blurred with weird color choices. Png looks neater)

For the dll, I saw libogg.dll into the root folder. Isn't this like a compatibility add-on ? Something that permit to read these files ? (if Quake 3 couldn't)

Zeth The Admin View user's profile Send private message

Reply with quote Thursday, February 26, 2015

FBX files are also used by unity. I hope 3dsmax can import/export them.


Of course. Most newer 3D software/engines supports FBX.

So, you recommend using FBX, flac (mp3 and ogg, depending of the situations) and PNG ? (from what I have seen of png/jpg, I prefer the first one, because jpg render a little more blurred with weird color choices. Png looks neater)


It really depends on the situation and your needs. For game development, FBX is a fairly solid mesh/animation format. FLAC is great if you need lossless audio for music, but usually MP3/OGG will suffice. In most game development scenarios, you can settle for OGG.

Image formats are a bit trickier. You'll definitely want to import and have a lossless version on hand (so PNG [along with your source PSD] is fine), but you'll likely end up adopting a GPU compression algorithm in the end for the build instead (DXT, PVRC, etc.). Most of the GPU compression formats are lossy, but since you'd be mostly uncompressed otherwise, it sure beats spending a ton of memory on raw textures.

For the dll, I saw libogg.dll into the root folder. Isn't this like a compatibility add-on ? Something that permit to read these files ? (if Quake 3 couldn't)


Yes, libogg.dll is an external dependency that gives ioquake3 the ability to read/play the ogg format.

Buksna Blaizing View user's profile Send private message

Reply with quote Thursday, February 26, 2015

FBX files are also used by unity. I hope 3dsmax can import/export them.



They are the one's who invented it Smile

Eagle The Purpose View user's profile Send private message

Reply with quote Thursday, February 26, 2015

Unity or 3dsmax ? *intense laughter*

Buksna Blaizing View user's profile Send private message

Reply with quote Thursday, February 26, 2015

Autodesk company who holds 3dsMax

Eagle The Purpose View user's profile Send private message

Reply with quote Friday, February 27, 2015

Ah okay! Thank you for the information. Smile

Eagle The Purpose View user's profile Send private message

Reply with quote Tuesday, March 03, 2015

I think this thread will serve for other questions as well.. Sorry about that by the way..

I'm actually trying to code something in java script, is this good or I have to change it to another language ? (it's this or C# and unity script)

I have heard and seen that the java script is a slow and bad optimized language, so I want something perfect for the code.

Zeth The Admin View user's profile Send private message

Reply with quote Tuesday, March 03, 2015

It depends on your environment and expected platform. Javascript (and any interpreted language) are great for scripts, rapid prototyping, and simple configurations. In cases where you need more performance, you can technically use lower-level binding libraries with these as your top-level interface as well.

It's a tradeoff of usability for performance (and vice versa) when it comes to moving between interpreted and compiled languages.

Eagle The Purpose View user's profile Send private message

Reply with quote Tuesday, March 03, 2015

Mmh.. okay I'll stay on java script now I have started on it. Plus, Unity doesn't use C, so...

I hope I'll be able to give something as soon as possible..

lucygp View user's profile Send private message

Reply with quote Tuesday, March 03, 2015

I'm actually trying to code something in java script











_________________________________

Eagle The Purpose View user's profile Send private message

Reply with quote Tuesday, March 03, 2015

Buksna Blaizing View user's profile Send private message

Reply with quote Friday, March 06, 2015

Learn JavaScript because its one of most (if not the most) required languages. If you master it to advanced degree you'll find job pretty easy

But if you're looking to learn just to work on Unity or any similar engine just for PC use; then you're trying on wrong language

Eagle The Purpose View user's profile Send private message

Reply with quote Friday, March 06, 2015

>Buksna

Well, thanks for the advice. But you know.. In France.. It's not because you know a language that you'll have the job directly.. slam, I dislike my country..

For unity, 95% of the free scripts are in js, there's only 3 language that the engine read, and the 3 of them seems to be adapted to it. I think learning them won't be enough, I have to learn them for unity.

Seems okay outside the code for now.

Zeth The Admin View user's profile Send private message

Reply with quote Friday, March 06, 2015

Learn JavaScript because its one of most (if not the most) required languages. If you master it to advanced degree you'll find job pretty easy


That's not really true. Javascript is fine if you are in the web development field (granted most expect you more to know the jQuery library than anything else) and certainly gaining popular as a scripting language interface for game engines, but it's hardly used in a lot of fields.

A lot of enterprise software still relies on Java/C++. iOS is natively C. Android is natively Java. Game Engines vary from C/C++/C#/Java and beyond. Server-side languages include ASP/PHP/Java/Python/etc. Most industrial equipment will use raw assembly for the machinery at hand. It all really depends on the field, but Javascript is hardly the most widely used (or even the most popular).



If you are dealing with Unity, I recommend you use C# -- both for performance-sake and so you can get your feet wet with a compiled, typed language.

Eagle The Purpose View user's profile Send private message

Reply with quote Friday, March 06, 2015

okay, thank you two for these informations. It's really nice. Smile

I'll start looking at C# and try coding some controls first.

Edit: Starting learning the full C# language (and not only the adapted one for unity). Reading all 2 parts and 20 chapters.. Wish me luck! Laughing

Buksna Blaizing View user's profile Send private message

Reply with quote Saturday, March 07, 2015

Well today barely someone wants some worker who has knowledge in 5+ languages

Why I said JavaScript "is one of most (if not the most)" is because its largely used on mobile applications which today is really well paid job. With having knowledge in JavaScript you'll find job 10 times easier then having same knowledge in example C or C++.

Mobile industry is growing so its really a nice thing to know. Not to mention that JavaScript is used in many "tools/machines" every household has.

My suggestion would be to learn 2-3 languages but if someone is just for having a job and that's it, then I would suggest JavaScript instead of Pyton.

I think this is mostly country related opinion now because as much as your graph is correct, it doesn't mean it affects some country by that margin (example in my country I'd say its around 10% usage) because companies are just poping up on every corner in need of javascript programmer while I found 2-3 job offers for some other language

Zeth The Admin View user's profile Send private message

Reply with quote Saturday, March 07, 2015

Well today barely someone wants some worker who has knowledge in 5+ languages


Languages are all quite similar. General usage is largely transferable. However, different fields, different business, and different individuals look for completely different things.

Why I said JavaScript "is one of most (if not the most)" is because its largely used on mobile applications which today is really well paid job. With having knowledge in JavaScript you'll find job 10 times easier then having same knowledge in example C or C++.

Mobile industry is growing so its really a nice thing to know. Not to mention that JavaScript is used in many "tools/machines" every household has.


Javascript would only be used in web-based mobile apps, not native mobile apps. Any practical household appliance (I.e : web integrated refrigerators, etc.) would NOT be using an interpreted language natively. Are you sure you aren't thinking Java? Java and Javascript are 100% different.

My suggestion would be to learn 2-3 languages but if someone is just for having a job and that's it, then I would suggest JavaScript instead of Pyton.


Again, a hefty generalization, my friend! It depends on the target business sector. You are assuming the original poster wants to go into the mobile or web field. Telling someone to learn Javascript would provide them ZERO benefit if they were going into architectural-engineering software, AAA game development, enterprise framework designs, data center backends, and so forth.

I think this is mostly country related opinion now because as much as your graph is correct, it doesn't mean it affects some country by that margin (example in my country I'd say its around 10% usage) because companies are just poping up on every corner in need of javascript programmer while I found 2-3 job offers for some other language


It's not entirely a matter of country. It's a matter of WHERE and HOW you are examining the question and applicable hiring sources. Languages and paradigms WILL indeed vary per platform (and field), but generally there are accepted standards regardless.

The image I posted was from a code evaluation tool that businesses and corporations use as a means of filtering out quality programmers. It's based entirely on their hiring needs. Does it cover every sect of programming? Of course not. Does it provide insight to what large companies using their service use as a language? Sure.

My point here is that it's not practical to accurately give a blanket statement about a "best language". It really all depends on the business (or at least field) at hand.

Eagle The Purpose View user's profile Send private message

Reply with quote Saturday, March 14, 2015

Ah, I think I mixed between Java and javascript. Didn't know they were 2 distinct languages.

For the unoptimized language, I meant the Java.

Anyway.. Can someone help me with this code I just wrote ?

using UnityEngine;
using System.Collections;

public class TestControls : MonoBehaviour {

   #region Attributes
   public AnimationClip Idle;
   public AnimationClip Walk;
   public float walkSpeed;
   public AnimationClip Run;
   public float runSpeed;
   public AnimationClip Jump;
   public AnimationClip Fly;
   public float flySpeed;
   #endregion

   // Use this for initialization
   void Start () {
      
   }

   // Update is called once per frame
   void Update () {
      CheckKeys();
   }
   
   #region Controls
   void CheckKeys(){
      //When pressing the "z" key, the character moves (walk) forward at the speed set in "public float walkSpeed".
      if (Input.GetKey(KeyCode.Z))
         transform.position = Vector3.forward * walkSpeed;

      //When pressing the "q" key, the character strafes to the left at the speed set in "public float walkSpeed".
      if (Input.GetKey(KeyCode.Q))
         transform.position = Vector3.left * walkSpeed;
   
      //When pressing the "s" key, the character moves (walk) backward at the speed set in "public float walkSpeed".
      if (Input.GetKey(KeyCode.S))
         transform.position = Vector3.back * walkSpeed;
   
      //When pressing the "d" key, the character strafes to the right at the speed set in ""public float walkSpeed".
      if (Input.GetKey(KeyCode.D))
         transform.position = Vector3.right * walkSpeed;

      //When pressing "shift" and "z", the character runs/dash forward at the speed set in "public float runSpeed"
      if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey (KeyCode.Z))
         transform.position = Vector3.forward * runSpeed;

      //When pressing "shift" and "q", the character runs/dash to the left at the speed set in "public float runSpeed"
      if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey (KeyCode.Q))
         transform.position = Vector3.left * runSpeed;

      //When pressing "shift" and "s", the character runs/dash backward at the speed set in "public float runSpeed"
      if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey (KeyCode.S))
         transform.position = Vector3.back * runSpeed;

      //When pressing "shift" and "d", the character runs/dash to the right at the speed set in "public float runSpeed"
      if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey (KeyCode.D))
         transform.position = Vector3.right * runSpeed;

      if (Input.GetKey(KeyCode.Space))
         transform.position = Vector3.up * walkSpeed;
   }

   #endregion
}



It contains no errors, right ? Because everytime I press a key to move, the character come back to XYZ = 0.. I don't understand..

Zeth The Admin View user's profile Send private message

Reply with quote Saturday, March 14, 2015

It looks like you are accessing transform.position directly. Does your character use a CharacterController or RigidBody component? If it uses either, you'll need to use their respective functions to move instead of accessing the transform.position directly.

CharacterController.Move or RigidBody.AddForce for relative movement.

Additionally, I see that you are using the world vectors for direction. You'll definitely want to use player relative vectors.

Try this.

Edited : Fixed syntax issues and made speed framerate independent.

Eagle The Purpose View user's profile Send private message

Reply with quote Saturday, March 14, 2015

It worked at the beginning with rigidbody and character controller, then it bugged.. I don't understand what happened..

Before posting, I had deleted them and only kept a collider to not go through the map, but still was the same, stuck at 0,0,0.

I'm going to analyse what you have sent, thanks for the answer.

Zeth The Admin View user's profile Send private message

Reply with quote Saturday, March 14, 2015

It worked at the beginning with rigidbody and character controller, then it bugged.. I don't understand what happened..


I would not recommend both. It's usually one system or the other. You probably want CharacterController in this case, but you'll have to implement your own gravity (which is fairly easy).

Eagle The Purpose View user's profile Send private message

Reply with quote Saturday, March 14, 2015

yeah, I have read somewhere that one make conflicts with the other.

Edit: saw few flaws with the code in game. I'll see if I can improve the controls and the physics (and create gravity).

Eagle The Purpose View user's profile Send private message

Reply with quote Sunday, March 15, 2015

public void CheckMove(){
   var controller = this.GetComponent<CharacterController>();
   float speed = Input.GetKey(KeyCode.LeftShift) ? this.runSpeed : this.walkSpeed;
   if(Input.GetKey(KeyCode.W)){controller.Move(this.transform.forward * speed);}
   if(Input.GetKey(KeyCode.A)){controller.Move(-this.transform.right * speed);}
   if(Input.GetKey(KeyCode.S)){controller.Move(-this.transform.forward * speed);}
   if(Input.GetKey(KeyCode.D)){controller.Move(this.transform.right * speed);}
   if(Input.GetKey(KeyCode.Space)){controller.Move(this.transform.up * walkSpeed);}
}
}
                                                                    



Are the "var controller" and "float speed" 2 new introduced variables ?

And this "this".. I have searched on many sites what it meant but didn't understand anything.. What does it refer to ? Neutral

1, 2, 3  >>
Post new topic Reply to topic

Actions

Online [ 0 / 6125]