Forum Replies Created
-
AuthorPosts
-
At the moment the solution I could use is to write in MX2 the application as console application, and use BlitzMax+MaxGUI to create the front-end. Not the best solution, but the only one that could work.
I’m using this approach in many applications I wrote in Bmax, as it easy to maintain and make it modular.In any case I would pay for a Monkey2 GUI module (ala MaxGUI, lightweight and fast!)
Hi
screenshots have different sizes (depending on the source code – see for example StarGate is 966px wide), so I ask if you want a ‘fixed’ size for any pictures taken or not; it will possible (with a graphics program) to resize/scale the image if bigger than 640×480 (for example) or ‘add canvas’ to enlarge it to that size (the original image is not touched, just added ‘space’ around it)I think a ‘generic’ name like ‘picture.png’ is not a good solution, otherwise I don’t see a reason to put it in the banana.information file as it’s the same for any entry!
It should be better to use something like ‘mx2-name_of_folder.png’ (or monkey2-name_of_source_code.png) as it will be easier to manage/change/update the screenshot in future without errors.
Coding that is not impossible (just check the presence of a .png file starting with mx2-/monkey2- in the folder to load it)
Or it would be faster/better to have a separate folder where to put/read every screenshots – if present (bananas/_screenshot)
Mine are just ideas of course.ps:
It would be better if the screenshots taken could be used – easily – in future for a gallery on the website/wordpress forum (there’s plenty of plugin for that): so one work today, for more results tomorrow.
(added some images to make it clear)
Attachments:
I’m taking ‘screenshot’ (PNG) of the source examples: not really sure they are always in the minimum size of 640×480 pixels, in case I will resize or add canvas
Question: where to send/store that images?
I needed to use updatemx2cc.bat to have something to play with.
BTW, nice examples! it’s quite a full game itself! Very good (and thanks for sharing the code)
surely to add to ‘bananas’
Another thing should use these information for documentation.
For example:
audiotest.monkey2 has no refer (direct) to mojo.audio module (is automatically imported by Using mojo.
At least user can ‘understand’ that the audio functionality are in that specific module/sub-module.As consequence, the documentation *could* use that tag to link (as example) any source code that refer (directly or not) to the ‘audio’ (this means that even the game could be linked).
OK
the ‘parsing’ will be only during the saving process, in any entry in banana.info isn’t found.Question:
– what about the picture size?
– do you want to add a ‘category’ or other info-tag?Monkey12345678910111213141516171819202122232425262728{"title":"Calculator","author":"Mark Sibly","description":"Monkey2 calculator","picture":"picture.png","file":"calculator.monkey2"}{"title":"Audio Test","author":"Mark Sibly","description":"Monkey2 audio test","picture":"","file":"audiotest.monkey2"}{"title":"Commanche Voxel","author":"GW","description":"Commanche Voxel for Monkey2 by GW, Original code by Sebastian Macke","picture":"","file":"commanche.monkey2"}{"title":"Shoot-out","author":"Playniax","description":"MX2 demo by Playniax","picture":"","file":"demo.monkey2"}I think there will be some problems if ‘file’ is not unique: demo.monkey2 could be anything (but it is the real source name inside the folder shoot-out.
Same for the example ‘stargate’ (file: ‘main.monkey2’ – so unique!)@about the banana.info file
A possible solution:
1. define (not as part of the syntax) a sort of ‘keyword’ as #_AUTHOR, #_TITLE, #_WEB, #_ONLINE_DOC etc that the programmer should add (in a rem block for example) to the source code
2. it should be possible to ‘scan’ the code looking for that information
3. store it in an external fileps:
I would add a ‘class/tag’ item: so it would be easy to show everything is a game, a gfx effect, code about sound etc
Gorilla: I like the name (but I would use for the 3d module!)
Showcase: great idea. Easy to understand (without looking for an ‘example folder!’)
I would use some ‘defaults’ if some information (ie: image, author etc) are not available…Ted2GO: never understood why call an IDE ‘ted’ (as teddy, a bear???). Adding ‘2 GO’ doesn’t make sense to me.
I would choose Primate (you could read as Prime Mate if Prime was the programming language)
But also Lemur is ‘good’.Wow, I like that someone found my concept/idea useful and make it real & working
I will read carefully your code to see your implementation (I still have an ‘old function/type’ style..!)
Hope that this thing will be one day a Monkey2 compiler ‘feature’ as default.Hi
reading the source of miniz module it seems that it will be possible to write (in memory or on filesystem) a .zip file.
std.zipfile has only functions to ‘read’ data from a .zip unfortunately: it seems a ‘not completed’ work.I tried to use miniz & some info taken from internet, but results are not very satisfactory
…
Just see it on the Marks’ twitter account.
Honestly, ‘following’ the various source/account (twitter, fb, yt !!) is too much work for me :)!
Nice implementation, very useful!
Ok, as I’m a very lazy person I created this (not full working at the moment) to find what modules should be rebuild because a change in the source code (of a file in them) has happened.
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120''edit:''as exercise I'm trying to write a little thing with this goal: check what module needs to be recompiled.'The logic of the program should be:'1 * every module as a folder called MODULE_NAME.buildvXXXXX, where MODULE_NAME is the name of the folder TOO.'2 * scan every single module in the 'modules' folder and register the FileTime of the 'buildv/windows_release' folder (see #1)'3 * scan every single other file with .monkey2 extension in that folder: if just one has a more recent timestamps, that module is marked as 'to_be_compiled''4 * at the end, launch the mx2cc_XXX commands to compile what needed.'Namespace myapp#Import "<std>"Using std..Global map_module:=New StringMap<Module>Class ModuleField name:StringField path:StringField timestamp:ULongField rebuild:intField list_source:StringList 'just for debugFunction Store:Module(_path:String,_file:String)Local m:=New Module'find the timestamp of' path+module/build xxx /windows_debug/module.am.name=_file.Slice(0,_file.Find(".")).ToUpper()Local t1:=GetFileTime(_path+"/"+_file+"/windows_debug/"+m.name+".a")Local t2:=GetFileTime(_path+"/"+_file+"/windows_release/"+m.name+".a")m.timestamp=Max(t1,t2)'consider the youngerm.path=_path+"/"+_filem.list_source=New StringList 'not really needed... just for debugmap_module.Set(m.name,m)' Print "Module '"+m.name+"' "+m.timestampReturn mEnd functionEnd ClassFunction Main()'scan Modules folder to check the latest 'change'Local path:="E:\monkey2-develop\modules" 'here my MX2 folderReScan(path)'get the modulesPrint "Check source in modules scanned..."For Local k:=Eachin map_module.KeysLocal v:=map_module.Get(k)If vSourceScan(path+"/"+v.name,v)End ifnext'these are the modules that *should* be recompiledFor Local k:=Eachin map_module.Keyslocal v:=map_module.Get(k)If vIf v.rebuild<>0 Print v.name+" "+v.rebuildEnd ifNextendFunction SourceScan:Int(path:String,v:Module)'check if exist any file younger than the module build'it should be possible to add a filter to eliminate files and folder not to be scannedLocal dirs:=LoadDir(path)Local codeext:=New String[]("monkey2","c","cpp","h")For Local f:=Eachin dirsFor Local exx:=Eachin codeextIf ExtractExt(f)="."+exx'monkey2"' Print "--- ["+f+"]"If GetFileTime(path+"/"+f)>v.timestampv.list_source.AddLast(f)v.rebuild=TruePrint "File <"+path+"> <"+f+">"End IfEnd IfnextIf GetFileType(path+"/"+f)=FileType.Directory SourceScan(path+"/"+f,v)NextReturn 1End FunctionFunction ReScan:Int(path:String)Local getfolder:=StripDir(path)getfolder=StripDir(path)'get the FOLDER NAMEpath=path.Replace("/","\")Local mname:=GetFolderName(path)+".buildv"Local dirs:=LoadDir(path)For Local f:=Eachin dirsIf f.Contains(mname)Print "MODULE BUILD FOLDER <"+f+">"Module.Store(path,f)f=""End ifIf GetFileType(path+"/"+f)=FileType.DirectoryReScan(path+"/"+f)End ifnextReturn 1End FunctionSURELY not the best thing written in MX2, but it could be the starting point to integrate this in Ted2/Ted2Go (a specific menu to build MODULES CHANGED
ps: I checked only the folder ‘windows_debug’ and ‘windows_release’ as I’m working on Win.edit: support for other source file (monkey2, c, cpp, h)
How I can convert a Unix Timestamp (the value returned from GetFileTime() for example) in a ‘human ready thing’?
I tried to toy around with Time Class, tried to convert blitzmax code to MX2, but it seems I can’t convert a Ulong to anything needed in Time.ps: about the Time Class I suggest
* add some methods to convert from/to timestamp
* make days/months public as anyone should get a ‘local’ (=in their own language) date/time
* add STRFTIME support… it is so useful to get ‘date/time’ in the own/required string formatUnfortunately I get stuck with type conversion between time-class & etc
-
AuthorPosts

