Is Monkey X a good place for a new programmer?

Monkey Forums/Monkey Beginners/Is Monkey X a good place for a new programmer?

Novalis(Posted February) [#1]
Hi all,
Over the past year i've been doing some work for people on fourms that are making games by making 2d sprites for them, i've never really gotten into it all before I've only ever done artwork for people making games.
Is monkey a good place to start from someone who's never done a line of code in their life? the last guy that commisioned some work from me said he was making his android game using monkey so i thought i'd give it a look, what are peoples opinions?

Mainly I'll be wanting to make something for mobile devices, andriod and iOs is the main target for things i would make, from what i've seen monkey seems to port out cross platform really well, but i could be wrong

Thanks -


Paul - Taiphoz(Posted February) [#2]
yea it is. good place to start https://www.youtube.com/user/smalltimeoutlaws/videos?flow=grid&view=1


Goodlookinguy(Posted February) [#3]
If your goal is to make games, it's a decent starting place, probably, but really you should have previous experience first. The thing is, a lot of the people here are from BlitzPlus and BlitzMax backgrounds. They've been programming for years. I honestly don't think many of them, including myself, have a very accurate view on what it means to be new to programming and whether or not this is easy to understand.

Dynamically typed languages are generally easier to pick up than statically typed languages. Monkey X is statically typed and so automatically falls into a category considered more difficult for beginners. As an example, in php, a dynamic language, variables can be anything at all times.
$varName = 5;
$varName = "Hi";
$varName = 3.333;


That language doesn't care about what type things are. On the other hand, in Monkey X...
Local varName := 5
varName = "Hi" 'Compilation fail


It fails because varName is declared as an integer. Whereas you tried to assign it a "string" type (aka, text). In php you don't need to know those specifics to make things happen.

Things like that definitely trip up new people. At the same time, statically typed languages generally have cleaner code because of certain forced structure. A lot of php code looks like a mess, mostly because of the fact that it has such a low bar of entry, that lots of people learn it and suck at it (and also because it has the most inconsistent programming library in the world).

My point here is that you may find it easier to get introduced to programming via a different programming language that is for a different purpose than video games and then adapt later. I did not start out with video games, even though that was my ultimate goal. I'm honestly glad I didn't, because programming video games is difficult. It's actually one of the hardest kinds of programming I've done and I've done things most people here haven't, like making an autonomous robot run around my house powered by a little tiny Arduino. It's 2D space + time, which means it requires a form of 3 dimensional thinking. This takes time to learn and if you're trying to do that along with learning programming syntax and structure, you're basically setting yourself up to likely fail or be disappointed, and at the very least, definitely overwhelmed.


dawlane(Posted February) [#4]
someone who's never done a line of code in their life?
That would be your biggest hurdle. As there are a few concepts that can be hard to understand for a beginner. As Goodlookingguy has said, you need to start with a simpler language; preferably one with lots of tutorials and good documentation. Unfortunately BRL products are well known not to have such things and you have to rely on the forums for help.

MonkeyX is what I would call an intermediate specialised BASIC language similar to C# and Java, and is aimed at cross platform games creation. It's also one of those languages where you need to have a good understanding of the device that you are targeting, as there are times when you need to do a bit of 'DO IT YOURSELF' to get certain things to work. This means that you would have to know a number of other languages, tools and Software Development Kits. The whole idea behind MonkeyX is write once, compile anywhere to cut down on development time for deploying software to multiple devices.

Those in my generation would have owned an 8 bit home computer such as the Commodore 64 or ZX Spectrum, and in the 90's they would have had 16 bit computers such as the Commodore Amiga and early PCs. Virtually all of those computers back in the late 70s and the whole 80s era had a built-in BASIC programming language, and there were quite a lot of magazines that had articles on programming those machines. Plus a few of those computers came with very good manuals, or additional manuals you could purchase. The computers such as the Amiga and PC; you could buy third party programming languages, and again many came with good manuals and the most popular languages would have had articles about them on programming with them.

Here is a web site that list an number of BASIC type languages.

Edit: As well as Invader Jim's tutorials there's Pakz series of examples.


Phil7(Posted February) [#5]
Hi,
first thing to decide is, if you really want to get into programming i. e. writing code, because there are also some ways of creating games by mainly using the mouse.
Two years ago I had to make this decision on my side and I am really lucky I found MonkeyX. I have to admit that I did have some coding background as a hobby programmer but still had some issues getting into Monkey.
In my opinion the downsides of monkey I read above are also advantages in the long run. If you really want to get into programming you will have to cope with all the things around and with monkey you get an insight to a lot of programming concepts you can also use, if you choose a different language later on.
so... If you want to take the monkey road I would like to help you with gasping the basics. I am not really good at programming itself, but I have some experience in teaching programming from scratch.


dawlane(Posted February) [#6]
Just as an example of a question that was asked, and a pointer is a relatively simple concept.
http://www.monkey-x.com/Community/posts.php?topic=12583
Just like C# and Java, MonkeyX is one of those languages that hide such thing behind the scenes as it manages memory through a process know as Garbage Collection.


Gerry Quinn(Posted February) [#7]
I'd say Monkey is probably fairly easy to learn, though maybe not so easy as a purer Basic variant. And its cross-platform capabilities are second to none.

On the downside, it is a niche language (no formal language training available, no Monkey jobs on Monster) with a small community.

I think if coding turns out to be an aptitude you have and you want to make games, Monkey is a decent starting point, It has the core things you need for making simple games more or less built in. (Technically, mojo is a framework, but probably hardly anyone uses mojo without it, so you don't have to worry about "what is language and what is framework" so much as if you were using a games framework for Java or Python or whatever. That is probably what makes it similar to a classic Basic language, really...)


Boulderdash(Posted February) [#8]
Don't start off with some other easier language , monkey is as easy as it gets !

im afraid you might listen to that advice and start learning something that you don't want , my advice is start learning the monkey syntax and start off building the demos on your phone , then play around with the demo source code.

Read the source and get used to the three parts to each program, ones an entry/setup method then one that updates the sprites every frame then the one that does the actual drawing

The technology is going mobile not big clunker desktop steel.

Get straight into mobile apps , Windows you can't publish effectively because of windows smart screen will block you and you can't sign your windows builds unless you pay a yearly fee then smart screen will unblock you.

There is no language easier than monkey it's not called BASIC for nothing.


Goodlookinguy(Posted February) [#9]
Boulderdash, you're gravely mistaken if you think Monkey is as easy as it gets. I've programmed in over 30 programming languages and worked with more than 8 game engines. Just off the top of my head, for games, LOVE engine is easier than Monkey. Lua is a powerhouse scripting language and the LOVE engine is quite robust. I've attempted to teach people Monkey as a starter language and it went about as successfully as trying to teach people Java or C++. It's more overwhelming than you might think. Right from the get go you're forced into a code structure and have no explanation that will make full sense to you until you have more experience. Let's on the other hand, look at my example language from before, php: It does things without needing to understand data types, arrays are all-in-one stack, maps, and lists. So there's no need to know about the various data collections. It has a huge library that does lots of things for you so that you can get a better understanding of how to just do things and not worry about the little things. It's structured like C languages, which will make those languages easier to adapt to, since they are more prominent in more engines anyways, making your choices more flexible.

Look, I like Monkey, it's obvious by the amount of code I've written for it, but I'm not fooling myself into believing that it's a great starter language. Also, Monkey is not BASIC. BASIC is BASIC. Monkey is a modern multi-paradigm OOP statically typed language that has homages to BASIC. BlitzPlus is far closer to BASIC and actually I'd recommend that any day over Monkey for beginners.


Gerry Quinn(Posted February) [#10]
I don't know, I think Monkey is an evolved Basic, or a cross between Basic and Java - most Basics went a bit OOP over time. But I agree there are probably simpler ones out there that are nevertheless usable.

Boulderdash, what do you mean about Windows? Most Windows users still run whatever takes their fancy. Hopefully that won't change, though I don't trust MS not to change it as much as I used to.


dawlane(Posted February) [#11]
The only BASIC language that I can think of with tones of tutorials, other than MS Visual Basic is MS QBasic. The language may be defunct, but there is FreeBasic available for Windows, Linux and DOS (no OS X). If I recall, it has it's origins in Microsoft's QBasic, and has a compiler mode to compile such QBasic code.
I would start by leaning the fundamentals of programming with that before moving on to MonkeyX. Once you have a good understanding, it should only take a few months to get a grip of MonkeyX, but you will need to know a few things about computer hardware to get the best out of any programming to do with creating games.

If I was going to teach someone programming I would start with:
- explaining in basic simple terms for example the CPU (brain), GPU(drawing pad), RAM(jumbled up short term memory), ROM(commandments set in a stone tablet), hard drives(paper, pencil and eraser), along with input/output devices (two way communication via keyboard, mouse, monitor and computers talk to each other by networks).
- explaining how a computer stores data in it's native form. This means explaining binary numbers and the fact that the term bit is a acronym for binary digit and represents a part of a memory address that is turned either on or off and correlates as a one to one with base two number depending on it's position within that memory location.
- explaining how real world numbers are translated into binary; this would include the difference between signed and unsigned numbers.
- explaining the relationship between stored data and how that it translates into what you actually see on screen. e.g. character code and it's glyph data.
- explain the Keep It Simple Silly principle and how complex problems should be broken up into more manageable parts.

Once I've got the basic concepts out of the way, I would start with:
- basic outputting of text and basic maths functions and operators.
- introduce variables and basic data types. For a language like C/C++ I would get the simple basics of a pointer out of the way, as you need to know these for a number of operations.
- basic input of text.
- basic string manipulation
- Begin program flow with: basic program conditionals with IF/THEN/ELSE and SELECT/CASE, iterators FOR/NEXT, REPEAT/UNTIL and WHILE/WEND, Functions and returning values from functions
- introduce arrays
- move on to more advanced math and string manipulation.
- introduce more advanced topics such as binary operations, variable references, collection types and custom types, but keeping custom types simple to start with; meaning no full Object-Oriented Programming.
- introduce Object-Oriented Programming basics along with advantages and disadvantages. I think the easiest way to explain to someone what an Object-Oriented Programming data object is; is for them to visualise it as a mini self contained program that can be created and destroyed by the main program when needed, with input and output functions that can be call from the main program.
- introduce GUI programming.
- introduce more advanced topics of algorithms after they have become more proficient with the language.
- introduce game programming, which would require another look at hardware in more detail.

Boulderdash, you have missed the one key thing that Novalis has said...
And that is:
someone who's never done a line of code in their life?

If Novalis has had no experience what so ever; then Novalis will have a hard time with a simple language, let alone a more complex language such as MonkeyX. This could mean also that Novalis has no real understanding of how computers work. As I stated earlier: MonkeyX is specialised niche language with a small community, little in the way of tutorials and incomplete documentation meaning no details of use for some of the commands and functions. The only help he would find is on these forums, and Novalis may not get an answer to any question for days, weeks, months or not at all. Many of the questions asked have been repeat over and over and the answers are elsewhere in the forums, and I would think that a few here don't bother to answer for that very reason as all it takes is a few minutes to search.


dubbsta(Posted February) [#12]
from a novices point of view, i could say this is my first language and after a little more than 3+ months i feel like i made decent progress. i know im only scratching the surface and have tons to learn and hone but im happy. my only prior experience was understanding variables not even arrays, and an animation cycle i did in blitz plus about 8 years ago.

my advice read all you can about data stucture, object orientation, and write write write. but first learn to type if you dont already know. im fortunate enough to have alot of free time lately so ive been behind the keys and reading all i can and still dont know enough to make a cool simple game but i think im almost there. with that said its gonna take time get past frustrations and keep learning reading and writing. your drive is whats gonna take you to your goal. good luck

edit: just noticed dawlanes huge post lol (dont skip over it like i did),he made all the good points.....
i want to look at love2d but maybe after monkey i know its my first language but i like the syntax, those are two i think i want to focus on.


some resources

art
https://www.gamedevmarket.net/category/gui/?page=4
http://thegameassetsmine.com/product-category/2d-tile-sets/
http://opengameart.org/

learning
http://natureofcode.com/book/introduction/
http://www.monkey-x.com/Community/posts.php?topic=9290&page=1
small time outlaws posted above
udacity.com: java programming basics and intro to java helped me and its free
you tube

math
khan academy
schoolyourself.com


EdzUp(Posted February) [#13]
MonkeyX is a nice starting place for first time coders, the only thing that lets it down and is a barrier to learning is the docs and how small this community actually is. If you are one of these people that think logically and are willing to persevere and get things done by trawling through examples and sometimes asking the odd question then MonkeyX is for you.


Gerry Quinn(Posted February) [#14]
For possibly easier but game-orientated Basics, I was thinking of things like Dark Basic or Pure Basic. I don't know much about these or whether they are actually easier for a beginner than Monkey, though.

What all the Basics tend to do is have built-in[*] fun stuff like drawing circles and images etc. If you sit down with a textbook on Java or C, you might learn just as fast, but if what you actually want to do is make a game, you might not be so happy with printing Fibonnaci sequences to stdout etc, which is the sort of thing the early examples tend to involve.

[*] Or effectively built-in, like mojo in Monkey.


dawlane(Posted February) [#15]
@Gerry: I own and use DarkBasic, Dark Basic Pro and PureBasic.

DarkBasic Pro
Dark Basic Pro is now open source and not being actively maintained, so there could be trouble using it with later version of windows. And then it never had a decent IDE even after two attempts.
The original boxed version came with three booklets: A 48 page user manual, a 48 page tutorial manual and a 133 page reference manual. You could purchase Hand On DarkBasic Pro volumes one and two that went it more details. Offline documentation has basic command line usage, but no in-depth details on programming as I remember.
A strictly procedural language, no OPP and if I remember no garbage collection.
The debug is pretty much useless.
The syntax was almost as a spoken language e.g. SET DISPLAY MODE 1024,768
It's very heavily geared towards 3D games with networking thrown in. It use it's own format for 3D objects, but you could still use good-old DirectX file format.
There are nine data types available and the ability to create custom data types, but you could declare variables as integer and use $ and # to declare strings and floats.
BYTE: 0 - 255
WORD: 0 - 65535
DWORD: 0 - 4294967295
INTEGER: -2147483648 - 2147483647
DOUBLE INTEGER: -9223372036854775808 - 9223372036854775807
FLOAT: 3.4E +/- 38 97 digits)
DOUBLE FLOAT: 1.7E +/- 308 (15 digits)
BOOLEAN: 0 - 255
STRING

PureBasic
Cross platform for Windows, Linux, OS X and Amiga (history note: PureBasic and BlitzBasic have a bit of a shared history on the Amiga)
A paid for product and actively maintained, but sometimes a major problem can take a bit of time to fix, as was the case with printer support for Linux when a key package was dropped.
There is a PureBasic Beginners Guide written by Gary Willoughby that covers version 4 of PureBasic. Offline documentation is a basic reference manual for the commands.
A strictly procedural language, no OPP. No garbage collection, but does have the functionality to use more advanced memory features such as memory allocation and pointers.
A mish-mash primarily a language for GUI and 2D Games, 3D is supported via the Ogre3D Engine, so you need to know how to deal with it's file format and that means doing a lot of file conversion.
There are nine data types available and the ability to create custom data types. You have to declare data types with a suffix for that data type or they end up being of type long with the exception of string that can use either .s of $ appended to the variable name.
Byte: -128 to 127
Char (Ascii): 0 to 255
Char (Unicode): 0 to 65535
Word: -32768 to 32767
Long: -2147483648 to 2147483647
Quad: -9223372036854775808 to 9223372036854775807
Float, Double: The guide mentioned above doesn't give a specific range, but does go into depth into how numbers are store.


dubbsta(Posted February) [#16]
@dawlane why is hardware important and how does one learn it. are you talking about a+ or something else. also any books you recommend reading


dawlane(Posted February) [#17]
@dubbsta: Why is it important? Well back in the 8 bit era you really had to know the hardware and it's limitations to get the best out of it. It's the same thing with modern hardware. The most important thing from a game programming perspective is speed. Games are real-time applications and any thing that can slow a game down would make it choppy, not fun to play and in some cases unplayable. Modern PC's make knowing the exact hardware difficult because they can be customised, but they all have to comply to a general standard. So can take it that any device such as a graphics card would work in a similar way.
Speaking of graphic cards leads us to one of the things that you need to know:
The graphics card can only hold a limited amount of images. In older hardware images(aka textures) are stored in powers of 2; though newer graphics card as far as I know don't need to do this anymore, but I would suspect that there is small performance hit as a GPU would be able to handle a power of two image much quicker. So back to images in a power of 2. An image with a size of 50x100 would need to take an the memory size for an image of 64x128 (a size in a power of 2). This means that there is a lot of wasted memory space, but wait, there is more. Here's a lovely article that I think that should cover the problems with graphics cards.

Do a search on 'Why use sprite sheets and texture atlas' or 'What are sprite sheets and texture atlas'.


dubbsta(Posted February) [#18]
Thanks great link