blitz-research / monkey Goto Github PK
View Code? Open in Web Editor NEWBlitz Research Monkey Source
Blitz Research Monkey Source
Doesn't return integer but returns [object WebGLUniformLocation]
#ANDROID_APP_LABEL="Ape's Banana Conquest"
leads to the following lines when compiling for GLFW:
TRANS monkey compiler V1.80
Parsing...
Semanting...
Translating...
Building...
g++ -O3 -DNDEBUG -Wno-deprecated-declarations -Wno-free-nonheap-object -Wno-unused-result -I../glfw/include -I../glfw/lib -I../glfw/lib/x11 -I../openal/include -I../stb -D_GLFW_HAS_GLXGETPROCADDRESS -D_GLFW_USE_LINUX_JOYSTICKS -pthread -c -o ../main.o ../main.cpp
../main.cpp:5:34: warning: missing terminating ' character [enabled by default]
#define CFG_ANDROID_APP_LABEL Ape's Banana Conquest
^
Seems it does not get encoded correctly.
It's a a great idea to have this modman tool Really useful but I would like to suggest two small additions/changes:
1.- Make the repositories list a remote file, so the modman can also show new modules. Having this hardcoded is a bit rare. It can be just the same txt file placed anywhere at monkeycoder.co.nz or something... ?
2.- It would be nice if the modman notifies on missing version control systems. That is, it seems to just not show git or hg modules if command line tools are not present. Some additional information such as: You need Mercurial to install this module, with the appropriate link somehow would be much better.
those are just a couple of small ideas. No sure if they make sense. Also, not sure if they're also on any todo list or something
Also, the Module_ext used to install them... Is there any way to customize this so them gets installed whenever you want?
Hope this is seens as a constructive post. Also, if there's not dev time to make this, but they're reasonable additions, I may have some time next week, so I could try to get something done in this area.
Can add this just for the stdcpp builder? It'd help a lot for DLLs.
add this to " src / transcc / builders / stdcpp.monkey" after line 53
LIBS+=GetConfigVar( "LIBS" ).Replace( ";"," " )
Example:
Interface TestForCast
End Interface
Class SampleApp Extends App
Field test1:Object[] = New Object[100]
Field test2:Object
Method OnRender:Int()
Cls(200, 200, 200)
Local i:Int = 0
While TestForCast(test1[i]) <> Null And i < test1.Length
i += 1
End While
If TouchHit(0) Error("")
Return 0
End Method
End Class
Android target generates the following code:
class c_SampleApp extends c_App{
public c_SampleApp m_new(){
super.m_new();
return this;
}
Object[] m_test1=new Object[100];
public int p_OnRender(){
bb_graphics.g_Cls(200.0f,200.0f,200.0f);
int t_i=0;
Object t_=m_test1[t_i]; // ???
while((t_ instanceof c_TestForCast ? (c_TestForCast)t_ : null)!=null && t_i<bb_std_lang.arrayLength(m_test1)){
t_i+=1;
}
if((bb_input.g_TouchHit(0))!=0){
bb_std_lang.error("");
}
return 0;
}
}
XNA target:
class c_SampleApp : c_App{
public c_SampleApp m_SampleApp_new(){
base.m_App_new();
return this;
}
public Object[] m_test1=new Object[100];
public override sealed int p_OnRender(){
bb_graphics.g_Cls(200.0f,200.0f,200.0f);
int t_i=0;
Object t_=m_test1[t_i]; // ???
while((t_ is c_TestForCast ? (c_TestForCast)t_ : null)!=null && t_i<bb_std_lang.length(m_test1)){
t_i+=1;
}
if((bb_input.g_TouchHit(0))!=0){
bb_std_lang.Error("");
}
return 0;
}
}
Obviously while loop doesn't work as it is supposed to.
As the title states, you forgot to change the ANGLE target's 'PathToFilePath' method. This is the commit in question.
Hi,
not sure if you are interested in GLFW targets getting png 4-bit (i am!), but with picopng it can be done easily. picopng is a zlib license, so i feel this can work, but you will have to ok it. let me know if you need my code, i can create a pull req.
the problem may be with the VS project which needs the picopng.o file added in. not sure if i can pull req that,
//AdamRedwoods
I get the wrong keys when using KeyHit() and KeyDown() only on GLFW3. (html5 is okay)
I am running macOS 10.11, have a german keyboard layout but use english system language. When using the code below the output is the reverse of what I expect.
If KeyHit(KEY_Z)
Print "key z" 'prints y
Elseif KeyHit(KEY_Y)
Print "key y" 'prints z
End
I found this github Issue and a workaround seems to be to use glfwGetKeyText() to get a string representation.
What do you think about adding links to binary translator files or add information about how to build Monkey translator? At the moment, there are some issues with understanding how to build Monkey translator without a translator.
Mark,
Any possibility we could get annotations in the language?
http://www.monkey-x.com/Community/posts.php?topic=2344
Edit: Bumped the enter key...
Hi all,
I'm an IT Technician at a school/academy and I have been assisting our computer science teachers with an issue they have been having with their MonkeyX programs today.
We are using:
About Ted
Ted V1.25 (Monkey V84f; Trans V1.85; QT_VERSION 0x040804)
Copyright Blitz Research Ltd.
A simple editor/IDE for the Monkey programming language.
Please visit www.monkeycoder.co.nz for more information on Monkey.
OK
It appears, from looking into the issues that our computer science faculty have been having today that if there are spaces in the file name of the *.monkey file, then when this gets translated into C++ for compilation the spaces get inserted at various code points. This then makes an invalid C++ file which fails to compile.
I'm afraid that although I did have an example cpp file that demonstrated the issue I deleted it while resolving the issue. Hopefully as the issue is easily reproduced that won't be a problem.
Many thanks for your time
Peter
Too lazy to make a pull request, sooooo...... brl/json.monkey, line 89:
Method GetBool:Int(key:String, defval:Bool = False)
The return value should be Bool, obviously 👯
Thanks for making Monkey open source, the mojo native files are still missing?
https://github.com/blitz-research/monkey/blob/develop/modules/brl/databuffer.monkey#L278
Should be:
PokeBytes address,q,0,j ' p -> q
The native implementation of the DataBuffer currently offers no way to resize the DataBuffer.
Since the _length and the _data fields are private (C++) there is currently no way to interface with C++ code which needs to resize the Buffer. It is also no option to create a new BBDataBuffer because it cannot be passed back to Monkey X without problems. It would be nice if you could implement a native resize method for the DataBuffer.
Transcc currently supports no way to order Imported files.This causes a lot of trouble when interfacing with C and C++ Project which rely on a specific order of imports (and are not Monkey optimised like MySql). It would be nice if there was a possibility to import files in a more ordered way.
https://github.com/blitz-research/monkey/blob/develop/src/transcc/builder.monkey#L71
e.g. possibility to import headers first and files that use these headers last (or just later)
(even a simple ImportFirst / ImportLast would probably do?)
Whether users can create new targets and native mojo files? For example, http://www.monkeycoder.co.nz/Community/posts.php?topic=4780. In this case, I think, Stage3D mojo version will be based on original mojo. Whether the author will be able to publish the source files openly? Would not that be a license violation?
The following code will allow us to use AdMob's smart banners.
switch( _adStyle ){
case 1:_adView=new AdView( activity,AdSize.BANNER,MonkeyConfig.ADMOB_PUBLISHER_ID );break;
case 2:_adView=new AdView( activity,AdSize.SMART_BANNER,MonkeyConfig.ADMOB_PUBLISHER_ID );break;
}
Yesterday I tested new module manager. It seems, everything works perfectly with all modules and repositories. But I’ve noticed that manager runs git clone without --recursive option. So, if module uses git submodules, directory with submodule will be empty after installing.
I’ve tried to just add the --recursive option, but it didn’t work. The installation was not completed, and I had to kill the git process manually... Although it works fine if I run the same command directly from the command line
I would like to know if there any chance that the git submodules will be also supported. Or I should refuse from having them in my repositories?
Thanks!
Please add keys like MODULENAME_IMPLEMENTED=False into all the remaining Monkey modules:
This shall allow to create new targets without having to change the Monkey source code.
I'm currently working on the Java_Tool target and users will not be able to install it without modifying by hand some of previously listed Monkey modules.
This one's probably an easy fix. The free version of Monkey now includes desktop targets, but the develop branch hasn't yet reflected this by including native mojo files for those targets.
(Perhaps they're still covered by the original copyright license?)
This is the detailed crash:
Monkey Runtime Error : ReferenceError: Audio is not defined
C:/Monkey_Compiler/MonkeyPro70b/modules/mojo/audio.monkey<43>
The expected behavior is that the app just ignores sound commands and does not crash.
The trans tool section suggests the command line build options: glfw, ios, etc.
Should be updated to iOS_Game, etc.
Small error with SaveState.
The code in question.
Function SaveState:Void( state:String )
Return _game.SaveState( state )
End
Looks like you have forgot to add this directory to the .gitignore and commit new files to the repo.
Thanks!
linux needs
in the main.h target for glfw, or minib3d won't work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.