Pages: 1
  Print  
Author Topic: Learning to develop?  (Read 1318 times)
Offline (Unknown gender) x
Posted on: August 21, 2013, 06:53:11 PM

Member
Joined: Aug 2013
Posts: 19

View Profile
Hi all,
I'm interested in developing for ENIGMA, but there's so much to learn out there. I have some questions on focusing down and learning only what I need to.
  • What language is primarily used for ENIGMA?
  • How do you learn to use Git or other SCMs?
  • Is there a site giving information on good coding practice, or is this just a question of learning them as you go and not being lazy?
  • Can you work on Windows, or is it preferable to use Linux? If so, are there any distros in particular you use?
  • Any other advice/warnings etc? (please share)
Cheers
Logged
x
Offline (Male) polygone
Reply #1 Posted on: August 21, 2013, 07:14:20 PM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
0. You technically are helping the development by helping with the wiki because that frees up time that current developers could spend documenting things
1. C++ for ENIGMA, Java for LGM
2. If you're on Windows you can get by without learning git. In any case I advise crossing that bridge when you actually come to it
3. Just copy the existing coding practices you see in the ENIGMA source, people will review your code and tell you if it can be improved
4. Windows is fine, there are a number of devs on Windows (myself included)
5. My advice is to just jump in and get started, then deal with things you don't know as you arrive at them.
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) Goombert
Reply #2 Posted on: August 21, 2013, 07:18:57 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Hai ^_^

1) LateralGM the IDE is written in Java, as is the plugin which hooks it up to enigma. You can take the LateralGM.jar and run it seperately from ENIGMA if you want just a cross platform free Game Maker IDE as Studio's and no other GMK file editor even runs on Linux, GM4Mac handles GMK's on Mac but theres no GMX editor on Mac.

The main engine is C++ basically the graphics, audio, and other functions inside ENIGMAsystem/SHELL/
Berkeley Sockets for networking was originally just C but I converted some of it to C++ in merging it with ENIGMA.

Josh's compiler I believe is just C++ maybe some C or some assembly.

2) Git is easy as pie dude we can give you a basic tutorial on it

3) Well we will certainly offer our advice where possible, but mostly I just go with what I see most other people doing or how I see other things done in the engine.

4) I work on Windows now that I have had the horrible experience of dealing with Canonical, they are destroying the only good Linux distro.

5) Yes, don't be afraid to ask us any questions, there is no such thing as a dumb question, only the ones you don't ask. :)
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) DaSpirit
Reply #3 Posted on: August 21, 2013, 07:33:25 PM

Member
Location: New York City
Joined: Mar 2013
Posts: 124

View Profile
It'd be best if you join the IRC chat. Most of us discuss implementations and priorities there. There is a link on the forums to a Javascript based chat, or if you want a proper application, you may download HexChat. We are on the Freenode server. Just select it and type "/join #enigma" (without the quotes) after it connects.
Logged
Offline (Male) Josh @ Dreamland
Reply #4 Posted on: August 21, 2013, 07:40:09 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
1. C++. If you'd prefer to develop a different language plugin for ENIGMA, we'd be happy to support it, but the work would be enormous (Unless you're interested in continuing the existing, but very early, JavaScript port).
2. Git's pretty easy to pick up on. Most of us learned from small tutorials on the internet; I can't find the one I used, but I'm sure the others are just as good.
3. You can start flamewars asking what constitutes "Good coding practice." I can't even tell you "just comment your code well," because lately, the trend has been "self-documenting code," which uses functions so tiny as to be self-explanatory. In the words of my journalism advisor: just try not to suck.
4. It is certainly preferable to use Linux, as the package manager can fetch and set up all your tools for you. However, a good number of our developers use Windows, and MSys-Git comes packaged with the ENIGMA zip.

The basics of Git are pretty simple. The idea is this: everyone has a local copy of the entire git repository, history and all. Because of this, no one versions binaries; doing so causes terrible bloat, as you have all the previous versions checked out at all times. On the plus side, you can commit and use all features of version control locally. Everyone can, even without having repository access. You only need credentials when you're ready to publish your changes.

When you obtain changes from the Internet, it's called a pull. So basically, we enact changes, you pull them. When you publish changes, it's a push.

Our publishing is handled through GitHub. GitHub makes it easy to fork a repository; you just sign in and press the "fork" button. A fork is just a copy of the repository which you own entirely; you are free to make any modifications to it you like (per the terms of the license of the code, which, in our case, is GPL). When you are satisfied with the changes you've made to your fork, you can drop a pull request to the owner of the repository (in this case, us), and after reviewing your changes, they'll decide whether to accept, or pull them.

When I go to commit changes, I usually start by running git status to see what's changed. That way, I can see if I'm about to accidentally commit a file that doesn't belong in the repo. You'll notice the Windows developers use a UI frontend for git, and carelessly commit binaries to the repo all the time. By listing the files before committing them, I usually avoid that. After checking status, I run git add --all and then git reset HEAD <file> for any files I didn't want to add, if any. Usually, those files go in .gitignore, a file listing what files and directories git should ignore. After that, git commit or git commit -m "My commit message" to commit them, and then git push to publish them, if they're ready.

Words of caution: I think the git checkout command is one of the few commands capable of destroying something you've worked on. I have never found a way to undo it.

As far as developing, I don't really have any words of caution for you. Something to note is that if a check needs done to avoid users performing invalid operations on something, we try to confine those checks with #if DEBUG_MODE, so as to avoid slowing the engine down on trivia where the check takes longer than the operation.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) x
Reply #5 Posted on: August 22, 2013, 05:22:39 AM

Member
Joined: Aug 2013
Posts: 19

View Profile
Thanks for the replies.
C++ for ENIGMA, Java for LGM
The main engine is C++
C++.
Well, that settles it, I'll continue learning C++. And since DaSpirit says NGM will replace LGM, it makes sense, rather than starting Java. But at the moment I am only able to do very basic things, like declaring/initialising/changing variables, so it will probably be a while before I do anything useful here.

Josh, thanks for the explanation on Git, that was infinitely more readable than Wikipedia's page on it.
I work on Windows now that I have had the horrible experience of dealing with Canonical, they are destroying the only good Linux distro.
That's not something I hear often. I guess you don't like Unity? I myself find Xubuntu very usable, although it's a bit plain.

Anyway, I'll focus on the Wiki until I've made some real progress with C++.

Logged
x
Pages: 1
  Print