OpenConsole
BlitzMax Forums/BlitzMax Programming/OpenConsole
| ||
I've been playing about over the last few hours and have created the beginnings of (what I believe to be) a useful tool. OpenConsole(tm)(c)(R)(ASAP) What it is: A command console for adding to your apps. Useable pretty easy to plug in to an app probably riddled with bugs and memory leaks What it isn't: anywhere near finished attractive a banana related to Bob Monkhouse riddled with spiders and leeks perfect properly commented My hope is that people will add and post useful fixes/additions to it so everyone can benefit from it. It took me two lines of code to add this to rockout.bmx so it's definitely easy to implement. Comments and feedback welcome. |
| ||
What a great piece of code. Cheers for this. I was searching for a text entry function for my console but I think I'll use your console instead. Thanks again, Perty Matt |
| ||
wow! someone actually looked at the thread. I was beginning to think I'd done it all for nothing :) |
| ||
Which reminds me, am I allowed you use this in my game with the following: OpenConsole(tm)(c)(R)(ASAP)? And if not, *slaps monitor* why not? |
| ||
Of course you are *slaps Rimmsy* it's a joke dammit! a joke! |
| ||
I know, I know! I was joking too. *double table slap* my hand is hurting. I'm really slapping these things you know. I'm not just typing it. |
| ||
I know you were joking *triple slaps table*. I was joking about you joking about me joking... em... or something like that. |
| ||
ohhhh, really? Well, cop this: I wasn't joking about your joking. I was joking *at* my joke, which was a joke in itself at my own joke. *slaps moderator currently looking at this thread with disdain* |
| ||
uh, gee, this looks like a pretty good tool. Too bad it got abandoned like a year ago. Anyone but me think it's a good idea to revive this thread? |
| ||
I do, but I'm biased :) |
| ||
Well, duh. :P Hey, tell you what. I'm working on a completely different project right now, but it uses a console command line in graphics mode. When I'm done with it, I'll post the command line parser I'm using, it just splits stuff up in to words based on a delineator. That's what you have here, except that was a long time ago. I tried your old stuff, and it doesn't work in newer blitzmax at all anymore. Even after I fixed everything that generated a compile error, it still didn't work. I'll also post an implementation of the parser in a command line like program. It uses wave~'s Max2D input module. |
| ||
After changing some constants and the flushmem statements to GCCollect() and commenting out the setAppTitle command (it's a custom command in a module of mine), this compiles fine on the latest version: |
| ||
Here's a modified version that handles multiline input (but commands still are single line so as is it is not of much use; rather a starting point). Pertubatio, would you mind if I included a modified version of this console code with BVM 2? |
| ||
Pertubatio, would you mind if I included a modified version of this console code with BVM 2? No, I don't mind. :) Obviously I would like it, if you made any changes, for you to post them here. (ideally in a codebox :) ) |
| ||
Well, no problem, but the idea is to use the console to allow the execution of BVM scripts, as the application runs. So without BVM itself it won't be of much use. What I posted in the previous post will most probably be the only change I do to your code that can be compiled on its own. BTW, I replaced the code tag with a codebox. Well spotted :) |
| ||
Well, no problem, but the idea is to use the console to allow the execution of BVM scripts, as the application runs. So without BVM itself it won't be of much use. What I posted in the previous post will most probably be the only change I do to your code that can be compiled on its own. Ah well, I've still no problem with you using this :) |
| ||
Here is my contribution, a console with debug variable watching / changing. Comes in very handy for me all the time. Example program: debug.bmx: Manages the console and debug variables console.bmx: Feel free to make any suggestions or changes (Just make sure to post them here) and if you use this in your project let us know. Enjoy! |
| ||
Anyone else getting slowdowns when running the code above? |
| ||
Has anyone had a chance to try this? I'm trying to figure out why I'm getting random(?) slowdowns here. |