Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
This question was closed Nov 27, 2016 at 10:21 PM by Nova-1504 for the following reason:

The question is answered, right answer was accepted and everyone is arguing

avatar image
0
Question by Nova-1504 · Nov 27, 2016 at 12:15 AM · c#programmingdefaultlinklanguage

How to create my own programming language?

I want to create my own programming language. I know absolutely nothing about it, and after extensive browsing of the interwebz on the topic, I have gained no knowledge and have come to the conclusion that these existing "tutorials" are meant for people significantly more intelligent than Steven Hawkings. How does this apply to Unity? I not only want to make a language, I want to make it so that it works extensively with Unity, like UnityScript and C# do with MonoDevelop-Unity. Perhaps if I do a good job It could be a default part of Unity in the future (I intend to make it very simple to use.) My question is, does anyone know anything on the topic or have halfway decent links that dummies can understand? I know a little bit of C# already, I know this or another common language is necessary to make a language.
-EDIT- I deleted what was previously written here because I made a childish comment and I shouldn't have said what I did.

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bryangs · Nov 27, 2016 at 12:53 AM 1
Share

Ok so... How can i explain this. I am new, my account only has questions, but even i can say the following: Your question is... "exaggerated" probaly someone will answer you, but really, think about that. You are asking how to make your OWN program$$anonymous$$g language, like literally i want to make a program$$anonymous$$g language, show me how.

A program$$anonymous$$g language is a very difficult thing to do. If program$$anonymous$$g is hard, imagine making your own language. To make your own program$$anonymous$$g language you would need to at least spent some years of your life doing it, it couldn't have any error, and you would literally need to make it. There is no easy way. As far as i know you would need to do magic to create a program$$anonymous$$g language, as you would need another program$$anonymous$$g language. So, in my opinion, go for it: Program$$anonymous$$g faculty

By the way this is a Game Engine forum.

avatar image Nova-1504 · Nov 27, 2016 at 01:08 AM 0
Share

welp
you have me there

avatar image Nova-1504 · Nov 27, 2016 at 01:12 AM -1
Share

I probably should have mentioned that I'm still in high school. Thanks for the link, though it's something to think about in a few years. I understand I need a language to make a language. And yes, I realize this is a game engine forum. Read my question, not just the title.
However, I'm not an idiot. I learn well enough. I can learn more C# or Java. I'm just looking at my future here and looking for some answers.
This kind of thing runs in my family, by the way. One of my uncles builds computers from scratch and the other programs regularly for fun on a Raspberry Pi.

avatar image Cherno Nova-1504 · Nov 27, 2016 at 02:17 AM 1
Share

The big question is, what does your question have to do with Unity? Seems to be more of a (very) gernal program$$anonymous$$g question to me, I'd even say it belong to the broader "computer science" genre. Stackoverflow.com might be a better place for this than UA.

avatar image Namey5 Nova-1504 · Nov 27, 2016 at 03:14 AM 0
Share

As Cherno and Bryangs have said, this really isn't a question for this website, so you can't outright say "If, by the way, you delete or close this question, I officially hate you. This is a topic I am very passionate about and applies to Unity in every way. There is no reason to not have this on the site." because it really isn't. Even if it was related to Unity, UA is the wrong place to go. The question is simply too broad, and would require too long of a discussion about topics with no relevance to Unity or those who use it for it to be suitable. The Forums would be more appropriate, as stated in the first part of the Answers Guidelines.

http://answers.unity3d.com/page/faq.html

avatar image roman_sedition · Nov 27, 2016 at 03:17 PM 0
Share

If you don't $$anonymous$$d me asking, in which way would your language be either more different or more useful than the current implemented languages for unity?

What kind of program$$anonymous$$g style would it cater for? Honestly I can't find anything more appealing than the C family when it comes to syntax, but I am open for suggestion if you feel something is done better in another language and you were trying to create some kind of hybrid offspring with it and C.

avatar image Bunny83 roman_sedition · Nov 27, 2016 at 04:41 PM 0
Share

Well, the C family actually has a lot of cryptic symbols which can confuse the hell out of people which are new to program$$anonymous$$g

 |  ||  &  &&  !  ^  &=  |=  !=  =!  %  ==  =  <=  =>  ? {} [] ()

If you have never heard about those before you will have a hard time to figure them out intuitively. At first glance <= and => as well as != and =! look very similar so they might be the opposite of each other, but no, they are something completely different.

There are other languages which are much more intuitive (at least when it comes to the basic concepts). I started with Pascal way back then. It uses words as operators where possible like "and", "or", "xor", "not", "mod", "div", "begin", "end". That makes program$$anonymous$$g almost like "chatting" with your computer as you almost use full sentences ^^. They tried to avoid using ambiguous symbols to avoid confusion between them. Pascal was specifically designed as a starter language.

LUA basically uses a combination of many languages but a lot is taken from pascal-like languages.

I see this question like a childs dream of beco$$anonymous$$g a fire fighter, astronaut or world savior. Wait until you are at the point where you can actually decide if you can pull it off or not. I created a couple of small scripting parsers but i know what's behind a whole language. Just look at any open source implementation of pretty much any program$$anonymous$$g language. Also designing a language and writing a parser / lexer for it are two completely different things. That's why those tasks are often done by different people, experts in their fields.

However since the question is actually off-topic we shouldn't really continue bumping it all the time ^^.

avatar image Nova-1504 roman_sedition · Nov 27, 2016 at 06:06 PM 0
Share

$$anonymous$$y idea is to make a script that flows from one function, declaration, variable to the next very smoothly and simply so that it's easy and engaging to write. To me, I find C# very choppy in the way it is written. I find it hard to read and understand. That's why I want to make a language that's versatile but extremely simple, so that people like me can script whatever they want without spending weeks just learning C# or UnityScript.

3 Replies

  • Sort: 
avatar image
3
Best Answer

Answer by Eric5h5 · Nov 27, 2016 at 05:02 AM

You need to learn how to create CIL code (Common Intermediate Language), which is what all languages used by Unity compile to. Here's a tutorial about creating a custom language and writing a CIL (AKA MSIL) compiler for it in F#. (The Unityscript compiler in Unity is written in Boo, hence why certain errors reference Boo.Lang.)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Nova-1504 · Nov 27, 2016 at 06:00 PM 0
Share

Thank you!

avatar image
1

Answer by Shyclyde · Nov 27, 2016 at 07:53 PM

Honestly, and I'm not trying to be rude with this, but get a Computer Science degree when you get to college. I would suggest going post-grad with it as well, then you might have the knowledge you need to accomplish this. The reason what you're seeing looks like it's meant for Stephen Hawking is because you're expecting a simple answer, and sadly, that's not what you're ever going to get on this question. The answer you're looking for takes multiple textbooks and years of study, which is why it's not going to be sufficiently answered here. I see you mention members of your family build computers and plays with a Raspberry Pi, but those are trivial skills the average techy can learn with some weekend tinkering compared to this. Learning how to make a programming language...I would say requires mastering several programming languages first before you actually even think about getting into computer language theory. I'm not denying your passion, I too thought in a similar way in High School, but just know your passion will take dedication and time. Stay curious though!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Orami · Nov 27, 2016 at 04:16 AM

First off you will need to learn assembly. Then you will also need to know the correct interrupts to call and what needs to be in your registers when you call them. Now that really isn't too hard to be honest, what IS hard is that you will need to know the system architecture of every machine you plan to have this language work on. What this means is you will likely need to support 64bit and 32bit registers(along with the different interrupts between system types not just the 32/64 part). You will need to write a lot of code to just figure out what you are running on. Now assembly is not for the faint of heart. You will have to code VRAM access and the dynamic allocation of memory on the heap. You know what that is? If not then you are way over your head. You are looking at multiple years of coding just to get something that might work some of the time. Then you are going to be looking at debugging for a very long time then trying to figure out if it is a bug in the programming language or in the implementation of the language. So in short the answer should be it isn't a single person endever to make a programming language normally very large groups of people work on things like that for YEARS.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eric5h5 · Nov 27, 2016 at 04:53 AM 2
Share

This is not actually true in the context of this question. It's about making a language for Unity, which means learning how to generate CIL code, not assembly. Also it's very possible to do it with one person, since not only was the Boo program$$anonymous$$g language created by one person, but that same person created Unityscript (A$$anonymous$$A "Javascript", but it's a custom language). Not to say that it's a trivial undertaking, by any means.

Follow this Question

Answers Answers and Comments

251 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to I make there only be a chance to be sold every 2 seconds. 0 Answers

How to instantiate object dependent on position 1 Answer

Changing Color/Material using HDRP,Modify The Color of a HDRP material 0 Answers

pickup object is floating in the air when dropped. 0 Answers

How to make this shop animation and unlock system? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges