Suggestions for my new book?

Monkey Archive Forums/Monkey Discussion/Suggestions for my new book?

MikeHart(Posted 2013) [#1]
Hi folks,

in 2014 i,would love to write a new book about Monkey and/or fantomEngine. I would love to hear your suggestions for it.

So in the case you are interested, please let me know what you would like to see in it.

Take care
Michael Hartlef


therevills(Posted 2013) [#2]
Because of all the new members here IMHO I think a pure Monkey book might be better, teach them the basics moving onto advance features and then let them buy your original book using fantomEngine.


Nobuyuki(Posted 2013) [#3]
Haven't read the first book yet, but it would be nice to cover some things the manual doesn't cover, and depending on the situation, show some more general techniques to things you'd want to implement in Monkey when making your own game. Here are some ideas:

* Setting up a state machine in Monkey and how to allocate assets during the game. Explaining when storing everything in memory is most preferable vs. when to load assets at runtime. Explaining asynchronous asset loading operations and where/how to take advantage of them. Explaining how to write a loading screen, and proper use of OnLoading().

* IAP. How it works on the various supported platforms. This is a fairly new thing and may be a bit more confusing to some users than adMob. There are several android seminars on IAP best practices which you can nick some of the ideas off of. IOS might do IAP somewhat differently but a lot of things Android "encourages" in its API style should probably be done on the IOS side too (mainly things that are done to keep the game from taking the user's money without giving them the product)

* Best practices for optimizing your game for mobile platforms, with detailed explanations as to what each practice does to help and why it helps.
Examples: Reduce string manipulations per loop, use stringbuilders, use texture atlases, keep textures within a certain maximum size, how to organize sheets of textures to reduce GPU thrash, limiting the use of certain blending modes per platform, explaining the limits of Mojo audio, how to organize sounds to reduce heap stress on the SoundPool (Android only; there's a 1mb limit which is extremely small), etc. Basically, how to keep your games running at a smooth 60FPS, wherever possible.

* Techniques for handling situations with large amounts of objects. Y-Sorting is probably the easiest thing to cover; but particularly, different techniques for handling large amounts of collision and/or tile mapping and culling the amount of checks/blits needed for these. It would be nice to see more than one technique explained for these things, for example, Quadtrees/AVLtrees vs Spacial Hashing/Partitioning/r-trees in collision detection, phases of culling and difficulty vs. efficiency vs. necessity, ways to handle offscreen behavior like collision, AI and tile mapping, and so on.

* Explaining where Lists are better than Arrays and vice versa, and when to use Stacks over either, particularly because the access and allocation complexity for the various containers is not explained very well in the official manual. You can use big-O notation for this but be aware that certain containers seem to use a different technique than the obvious (eg: Map uses red-black trees, Stack is actually more like a dynamic array than a Stack, etc.). Goes a lot towards the previous thing about handling large amounts of objects for various situations.

* Using mobile devices' various sensors to improve the control experience. Best multitouch practices. Knowing the caveats of cheap phones' multitouch sensors (some have small amounts, some get confused which finger's which when axises swap) and working around them. Understanding generalized screen density to provide areas that normal sized fingers can press and get the expected result. Movement thresholds. Click thresholds. Filtering accelerometer input for a smooth experience; filtering thresholds. Axial assumptions of accelerometer readings; how to figure out which axis controls the reaction you want based on the phone's orientation without access to the gyroscope/grav vector (a current Monkey limitation). Describing/explaining an algorithm for 3d translation of accelerometer input based on an assumed device orientation so your game can refer to "virtual axises" that are consistent regardless of the user's preferred device orientation (think standing up vs sitting down vs. lying down). How to translate console/desktop control schemes to mobile gracefully.

* Explaining Monkey's scope rules. Differences between Local, Field, Global, Const beyond the obvious definitions -- how does the scope change within a class? (Think about how statics work in Monkey) How does scope change within a module? Within the Private directive (for Globals particularly, on Class/Module level)? Within the Extern directive?

* How to effectively use preprocessor directives and externs in Monkey. Explain various approaches to externs, including function definition vs. class definition levels, how to handle passing certain types.


Wylaryzel(Posted 2013) [#4]
I liked your first book and it was a good start into monkey development :-)
For a second book I would wish - as others already mentioned - to cover more the core monkey modules and not relying on an engine which makes already several design decisions.

Maybe you can additionally provide examples for the different core modules to somehow extend the documentation to see how to implement them for different purposes. And as you are an long term member here - I think it would be need if the book could cover several of the 'FAQs' frequently asked but burried deep in the forum.

Looking forward to purchase it :-)


Arabia(Posted 2013) [#5]
I'd be more than happy to fork out some cash for a complete reference guide - cover every function with a basic explanation and working example. This is probably a massive piece of work, but it's always been IMO where BRL products have been let down. I look at the online docs for some commands and I'm just left scratching my head - surely I'm not the only one?

e.g. From the online docs:

Function PopMatrix : Int ()
Pops a matrix from the internal matrix stack and makes it the current matrix.

See also PushMatrix

Function PushMatrix : Int ()
Pushes the current matrix onto the internal matrix stack.

The matrix can be restored at a later time using PopMatrix.

See also PopMatrix



Really? I know what this does now, but give this product to a complete newbie and tell them "use PushMatrix" and see what they make of it without knowing in which context it should be used.


Raul(Posted 2013) [#6]
I would like to see in the book chapters the making of a whole game. starting by explain the variables and what are them for and finishing with the deployment.

also from your developer experience I would like to learn tips and tricks (about memory management, loading and playing music, the content of a 'level', etc.)


MikeHart(Posted 2013) [#7]
Thanks guys your your great suggestions. I would like to hear more from others. Even just a "I agree with XYZ". So I can see if you are interested in a new book and what your interests are.


Paul - Taiphoz(Posted 2013) [#8]
I would go through all of the monkey core commands, methods and functions and give an example of their use, something the docs currently don't do, I would then teach the reader about monkey bare bones, no modules, no plugins just what it can do out of the tin.


ordigdug(Posted 2013) [#9]
I agree the monkey docs and examples are very vague and a lot of time is spent searching the forums to find answers. You could start with teaching in detail monkey programming core basics then expand into more advanced monkey features by creating many basic simple games/programs to show off each feature (or just expand on the current monkey examples). I think the key is for the reader to be able to follow the code and understand how to take each small code project and put them together to make one large code project (game/framework). The final chapter could explain the benefits of using a monkey framework like fantomEngine versus starting with a blank page.


spintop(Posted 2013) [#10]
How about two books? One book is for elementary Monkey X users and the other book is for advanced Monkey X users.


Paul - Taiphoz(Posted 2014) [#11]
if I could just add a little to what ordigdug said, at the end of the book or nearing the end you could introduce frameworks, but I would also introduce other's not simply fantom, show diddy, flixel and any others that are used a lot as these will probably be used by the people reading your book, a book like that would fit perfectly as a prequal to your current book which takes fantom I assume and goes into a lot more detail.


Sammy(Posted 2014) [#12]
Still looking for that "Monkey In A Nutshell" reference type of book. Cross referenced command look up with a per command micro example.


tiresius(Posted 2014) [#13]
I second Nobuyuki's suggestions.


pls(Posted 2014) [#14]
I read the first book... I was looking for a reference to the language. Not quite what I found... Having quite a lot of experience in blitzmax (c, perl, python) I manage to deduce quite a lot from the examples, but did not like the book all that much. What I wanted was a Monkey premier, much like the ones you can find for C/C++ or the worderful perl books (learning perl and programing perl). Such a book would do wonders for Monkey in termos of popularity. As it stands it has a rachel step "exploration" (learning by looking at the fóruns and code) curve.

PLS


VicViper(Posted 2014) [#15]
An explanation of how to create optimized gameloops. Notes on habits that lower the framerate of the game ... That would be an interesting topic, I think. :). Just a idea.


MikeHart(Posted 2014) [#16]
Don't worry about the book anymore. It won't come.


MikeHart(Posted 2014) [#17]
Simon: if you want, you can delete this topic. It is pointless now.


TeaBoy(Posted 2014) [#18]
@MikeHart

Probably not a great idea but what about starting a book created by the Monkey community? Most of us could write a tutorial based on atleast one
aspect of Monkey.

Wha'dya fink?


Goodlookinguy(Posted 2014) [#19]
@TeaBoy I started a project like that. If you want to contribute, uh...I dunno. I should setup some way to contribute. I kinda stopped because I was too busy (...and not being paid). You can take a look here, go to chapter 2 to see how much the system supports. http://www.nrgs.org/beta/books/Learning_Monkey/

The pages are generated by a tool I made in Monkey.


TeaBoy(Posted 2014) [#20]
@Goodlookinguy,

Looks like a great project, perhaps a sticky in the forum? I can see this
definately growing to become a proper book ;)

Place a banner ad on it and you may earn a few <place your chosen currency here>


MikeHart(Posted 2014) [#21]
Probably not a great idea but what about starting a book created by the Monkey community? Most of us could write a tutorial based on atleast one aspect of Monkey.

Wha'dya fink?



Seriously, I am not excited about working in community projects anymore. I have participated big time in the past in something similar, but for a different tool. And guess how that ended. Others never finished their part and it never got done. And judging the past efforts and plans of this community... well... I don't see it happen. Writing a book is a serious effort. Most people will never finish it.


Why0Why(Posted 2014) [#22]
I like the format of what you have there.


Goodlookinguy(Posted 2014) [#23]
Writing a book is a serious effort. Most people will never finish it.


QFT. Receiving no monetary compensation for a large undertaking like this is why I haven't gotten far.

Looks like a great project, perhaps a sticky in the forum? I can see this
definitely growing to become a proper book ;)

Place a banner ad on it and you may earn a few monies


This was actually a pretty good idea. Although I took it a slightly different direction and put up a Flattr button instead. If I start receiving money for it I'll definitely start working on it again. At the moment I'm broke so...I'm more focused on finding a secondary job.

Way Late Edit: I just re-put up the chapters I had planned to do. That way you can get an overview for what I was going for. I wanted a complete guide to the language, not just Monkey as a game language.


Danilo(Posted 2014) [#24]
Very nice, Goodlookinguy. One of the pieces that are missing here, it's too bad that you can't continue/complete it.