IDE - What are you missing?

dawlane

Well-Known Member
CX Code Contributor
Joined
Jun 21, 2017
Hey, just saw that it is open source on GitHub. :D
It was open source on github not long after the author released it. I know that there are bugs in it, but I cannot remember what they were. I will have ago at it to see if I can nail these bugs, but it could take a wee while to get to grips with Qt again. I've been having too much fun with one of my favourite programming tools. It's just a shame that OSX support is still in the stone age and that there are a few irksome bugs.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Yes it is a shame that OSX support is still so limited in Lazarus.
But I used it to create an IDE for a different tool back in the days. So not so bad at all :) I am an old Delphi fan and I think Pascal is one of the best languages out there. Call me oldschool.
 

dawlane

Well-Known Member
CX Code Contributor
Joined
Jun 21, 2017
Yes Mike I'm a fan of Delphi, but I cut my teeth on CBuilder. Those were and still are what you would call RAD tools. And if you haven't already had a look at the Jentos code it looks like I have spotted the first big bug in the method
CodeEditor: onCursorPositionChanged() in codeeditor.cpp. Has to do with the fact that the cursor position isn't taking in to account that the document buffer would be zero based. So anything with to do with the editor cursor should be suspect. You would see a lot of QTextcursor::setPosition out of range warnings to indicate this.

Edit: Looks like I will have to add a lot of qDebug checking to see what's going on in real time. There are a lot of cursor setPosition that don't make any sense.
 
Last edited:

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Would be cool if you get it working. I wont find time for it soon plus my C++ skills and impatience won't help much.
 

dawlane

Well-Known Member
CX Code Contributor
Joined
Jun 21, 2017
I will see what I can do with it. I hate fixing other peoples code, it's bad enough having to fix my own when I know how it's been put together. I will have to study how the code analyser works as that looks like it's the major cause for the crashing when coding classes. You can add Methods, functions and the usual locals and self keyword, but as soon as you try to add a Field keyword; that's when the problems start. You miss spell it - crash, you try to delete it with the code completion open - crash.

So far it only works if the Class/End is in place and then saved before you flesh it out. Once I figured that out it should be usable enough to test the rest of the code completion out.
 

Hans

New Member
Joined
Aug 23, 2017
Hi Hans, welcome on board.



imho you could set a reflection on the file to have everything inside the exported code.



Did you ment that the native JAVA code which ships with CX should have better execption handling? If not, please clarify.

Reflection - never tried, thank you for the hint, i have to read the docs better

JAVA Code - yes. Exception in Java works fine as long as they are of type RuntimeException. As soon as you use an external java exception which is of type Exception java compiler complains about not having defined "throws ...".
 

Hans

New Member
Joined
Aug 23, 2017
Imho an ide should read the modpath and consider THESE paths for dealing with its functionalities. Adding to that, all the files in the current project. Any other path is irrelevant to CX.
As soon as you have several projects with some shared base libs a "multi-path"-modpath would make the organization much easier.
 

Raph

New Member
Joined
Aug 25, 2017
I’ll be verbose since you say you aren’t familiar with Jungle. Most of these things are day-to-day niceties and luxuries that over time grow hard to live without. Note that i am not saying "hey, add all this to Ted!" -- I get that it's a massive undertaking. But seeing the list may help convey why I will have trouble migrating to Cerberus in the absence of Jungle or comparable functionality.


Solutions


The biggest is Solutions – having all the code files and data files associated with a project all available, and visible in the code tree display. In Jungle I can have the art, music, sfx, fonts, etc folders be part of the project, and click one to get a quick preview of the file. I can rename files there, etc. I can create a text file for level data or something, add it to the solution, and double-click from the solution explorer to edit it. I can create folders and add the whole folder to the solution.

Ability to save a solution as a template. This is how I use my framework, and it’s awfully handy not to have to manually copy the same files over and over again into a blank project. When I start a new game prototype in Monkey and Jungle, I get a fully functional title screen, asset loading from a data file, blank game screen, functional options screen, and all default assets arranged neatly into subfolders, from the moment I select New Solution.

Breaking the hardcoded assumption that projects live under the install path. Related to solutions… The Browser Projects tab assumes that my projects live under the /Cerberus folder. This makes it useless to me. I don’t keep ANY of my code or modules under there. This was a problem in Monkey as well; since every new version is a separate install, it would mean duplicating projects every time a new version came out. I keep all projects in a separate location, one that is synced across machines in fact. Jungle lets me add module paths via the preferences GUI.

This also means I have no good way to get a code tree view of all the files in my project. The Code tab only shows the current file. But one reason to use the tree view is to find something that you don’t quite know where it is. If the tree view displayed showed the tree for every file currently open in a tab, it’d be more useful.

Better code tree view. Jungle sorts the stuff in the Code tab into classes, and has tree nodes for Consts, Globals, etc. In Ted, it’s sorted into classes, but fields and constants and globals aren’t listed. Classes appear just like functions do.

Editor

The most obvious thing is intellisense. Particularly if working with code that uses overloaded function or method names, it’s huge. Parameter hints appear whenever your cursor is within parens.

JungleIDE also has autocomplete
, and as words are reserved, they get added on the fly. This greatly reduces typo problems and stupid compile-time errors.

It also has automatic code block completion -- inserting "End" or equivalent for you.


In addition, I use “Jump to definition” as a shortcut dozens of times every coding session.
In Jungle this works not only for jumping to the point where my own functions or variables were defined, but also into the function or method definition in the standard distribution modules or in 3rd party modules. Given the state of the docs, these two features are basically massive time-savers.

In Ted I would have to select the function or method, copy it, paste it into Find in Files, and wait; or use the little API reference pulldown, which is even slower. In Jungle, I hit Shift-F2 or get it from the context menu.

Better integration with docs. In Ted, if I highlight “Float” and hit F1, I get the docs page. If I highlight a class I created, I get nothing. If I highlight SetBlend, I get nothing. In Jungle, it jumps to the docs and to the correct function, including in user-created docs for user-created modules.

Better code highlighting. Cerberus currently supports
  • Default
  • Highlight
  • Numbers
  • Strings
  • Identifiers
  • Keywords
  • Comments
Jungle supports all of the above, but can also distinguish between
  • Class
  • Function
  • Method
  • Local
  • Constant
  • Global
  • Interface
  • Field
It also permits bolding per category. Personally, I find it extremely useful to bold variable names and class names.

Jungle highlights matching braces of all sorts when you are between them.

The ability to split the editor window, display two or more files side by side, or view the same file at two different points, is a huge thing I hate to give up.

Code folding is also extremely useful.

Block comment and uncomment with a single keystroke – I use this constantly. In Jungle, Ctrl-M instantly comments the line you are on. If you select a block, it comments the entire block. Hitting it again uncomments.

Other

Jungle offers an errors and warnings list showing things like unused declared variables, etc. This is possible because it does background compilation as you go. I admit, this is a bit of a luxury. It shows the line where the error or warning is, and I can click it and jump right to it.

Jungle lets me override or extend the contents of config.txt from the Preferences. It's minor, but being able to specify additional modpaths there using Browse, instead of having to manually rebuild my config.txt using text paths every time I update versions means it's one less thing to ever think about. Same goes for SDK locations, etc. Heck, I wish Jungle let me do the same with targets! Instead, I currently manually copy stuff like the Mungo target from version to version.

Final thoughts

Don't take these following comments the wrong way... they're just advice and general thoughts from my perspective. For context, I'm a pro game developer from AAA who has been working in the industry for over 20 years. I've coded for MMOs using nothing but vi. I have also built tool suites and specced entire scripting languages more than once. Monkey/Cerberus is, for me, my "sketch" tool where I can go in and get a new game idea functional in less than a couple of hours. Anything in the way of that is a negative.

For me, Jungle is at a sweet spot... it's still hugely simpler and friendlier than full-blown Visual Studio (which has a bunch of Windows-specific crap in the way), but it has the editing niceties that make me more productive. In theory, I can get Eclipse or SublimeText or the like kinda close, but the setup work alone is daunting. If there were a full extension for VSCode that had everything all set up already, that might do the trick for me. The main point is that an IDE exists to make my life easier. In theory I could code in Cerberus using Notepad. I just don't want to.

Right now, tbh, I'm having trouble mustering the energy to get Jungle working with Cerberus, even... at a glance, it looks like again, it will need to be set up over and over again with new versions, files and stuff will need to be renamed, etc. As a result, I haven't really tried Cerberus even though I want to. None of my projects compile out of the box, and I haven't had the spare few hours to figure out all the little things like modpaths, extension names, etc. It's actually easier for me to finish some current projects using an old version of Monkey, because at least everything is stable around me.

I'd argue that one of the (many) reasons that Monkey lacked traction is because it was "fiddly." Targets, toolchains, etc, were "fiddly." Well, right now, this migration is, for me, also "fiddly." Jungle took a lot of "fiddly" out of the equation; its auto-install of targets was a widely welcomed feature. I'd urge the Cerberus team to think that way too: "how do we enable developers to focus on the making of games, rather than messing about with the toolchain?" If there's a set of steps involved in moving something from Monkey-in-Jungle to Cerberus, have a sticky on the forum explaining how to do it... I imagine that I am hardly the only person who faces that challenge.

This is something that IMHO is holding back Monkey2 as well; I'd note that when I asked what was involved in porting from Monkey to Monkey2, the answer was basically "just hit compile over and over... it's not hard, stuff is pretty similar." Well, sure. But a checklist would be awfully nice given that lots of people have gone through the process... The last thing you want is someone like me contemplating whether now is a good time to switch to Defold or something else.

I love that Monkey is evolving and moving forward. I just want it to be as seamless as possible.

Hope this helps!
 

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Thank you Raph for your awesome explanation and welcome to our board.

Martin got word yesterday from Ziggy that he wants to make Jungle compatible with CX. That is great news for Jungle user. :)
 

Raph

New Member
Joined
Aug 25, 2017
I agree, that is indeed great news! :D

I still think that if someone has gone through the process of getting Jungle working with CX, a sticky post would be great in the meantime.
 

Martin

Active Member
Joined
Jun 19, 2017
Location
Germany
Thanks Raph, you did an awesome explanation and I agree with almost everything.

I'll let you all know when there are news from ziggy related to Jungle.

At some point we'll need indeed a good tool chain including a good IDE.
 

Taiphoz

New Member
Joined
Jun 21, 2017
  • Design and aesthetics are modern and nice on the eye. Yes looks are important if it looks like shit I wont use it.
  • Highlighting, you can NEVER have to many options here, I love how Jungle let me set colours for almost everything in the code, this made my code a lot easier to read, and being Dyslexic, anything that makes code/text easier to read is a massive +
  • Modular, love being able to move and drag tabs and windows around to get the layout I want.
  • Find n Replace, being able to search a file or a project is a big plus.
  • Contextual Help and auto complete
Just some of the things I miss about Jungle.
 
Top Bottom