|
Post by drfloyd on May 31, 2019 15:03:42 GMT -6
hi, here are my dreams for RC :
1) A build & portable IDE : DONE ! Thank you ! Now RC basic is accessible to everybody, not only to the geeks A real RCbasic IDE will be the best, but I know it is a big job to do that
2) In my opinion the most important future feature is the possibility to have several commands on the same line (like SDL, Naalaa, Love2D, etc...) Done ! Great job !
3) optional arguments for loadimage (like sdlBasic) example: Picture1 = loadimage ("media/picture1.png") or with array : picturearray[1,1] = loadimage ("media/picture1_1.png")
4) Something like KEYHIT + KEYCLEAR to complete KEY (which is a "KEY PRESS") KETHIT(key) : count nb of time a key has been pressed in the past KEYCLEAR : clear this buffer
5) A more easy Rand() function For example if you want a rendom number betwenn 10 and 20 : number=rand(11)+10 ' it is not cool at all!!!! i prefer : number=rand(10,20)
6) fix the "bug" with RAND () > 32 500 Fixed !
7) a READ/DATA function for arrays (like classic basics)
8) a solution to hide or compile all the .dll when we create an .EXE (don't know if possible)
Thanks !
|
|
|
Post by kennn on Jun 1, 2019 0:49:16 GMT -6
Hello, I like constructive suggestions.....yes!! It is because constructive suggestions will make RCBasic perfect!!!!!!!
|
|
|
Post by n00b on Jun 1, 2019 9:35:00 GMT -6
Thanks for the request. #1 is something that has been on my list of stuff to implement for a while. #2 probably won't be happening anytime soon because it would involve rewriting and potentially breaking parts of the parser but I will look into it.
As for the key hit function, I posted a demo of how to do that on your other post on the topic.
|
|
|
Post by drfloyd on Jun 5, 2019 14:52:44 GMT -6
for me the more "urgent" is several commands on the same line
It will give a real "+" to your language
I don't know if it is complicate to setup...
|
|
|
Post by drfloyd on Jun 9, 2019 5:04:34 GMT -6
I add a suggestion (first post) for the RAND function
|
|
|
Post by johnno56 on Jun 9, 2019 6:47:52 GMT -6
Rather than confuse the command names, rnd and rand, I have simulated range(a, b) using:
function range(a, b) return a + rand((b + 1) - a) end function
for i = 1 to 20 print range(1, 6) next
It's a bit extra coding but it will do what you need until a new command can be created....
|
|
|
Post by drfloyd on Jun 9, 2019 8:02:18 GMT -6
yes, of course extra functions do the job.... I will use this one Just by curiosity : these extra "manual" functions do not slow the program ?
|
|
|
Post by drfloyd on Jun 9, 2019 9:39:01 GMT -6
I will not use your function, i have tested, the progam is very slow with this function (it is procedural and I use thousand lot of RAND) So, my request is justified
|
|
|
Post by johnno56 on Jun 9, 2019 9:49:00 GMT -6
Oh well. It was worth a try.
|
|
|
Post by drfloyd on Jun 9, 2019 10:27:26 GMT -6
but it is good for occasional use
|
|
|
Post by n00b on Jun 9, 2019 10:45:35 GMT -6
Actually johnno56 function is as optimized as you could possibly get for something like that. There wouldn't be any significant peformance gain for this. I compared johnno's code to the python equivalent and it is actually a lot faster than what you could do in python. RCBASIC using johnno56 function function range(a, b) return a + rand((b + 1) - a) end function
x = 0 t = timer
for i = 1 to 1000000 x = range(1, i) next
print "i = "; (timer-t)/1000 print "x = ";x
PYTHON EQUIVALENT import time import random
t_timer = lambda: float(round(time.time() * 1000))
x = 0 t = t_timer()
for i in range(1, 1000000): x = random.randint(1, i)
final_time = t_timer()-t print ("i = " + str(final_time/1000)) print ("x = " + str(x))
Johnno's approach can run over 1 million times in less than a second. The python equivalent is about 1.2 seconds with its built in random library. There is a good chance that the rest of your code is not optimized to that well and you are not allocating work load for your procedures efficiently. Some of your other request are reasonable but may take a long time to actually implement. I typically only add new functions if it adds new capabilities that was not previously possible with RCBasic already. I will provide the building blocks and leave it up to you to do what you want with them if that makes sense.
|
|
|
Post by drfloyd on Jun 9, 2019 17:05:24 GMT -6
I use 1 million time this fonction when a change a screen in my program, with a dim [1000,1000], and there is a difference with the standard RAND and the Johno Function... but it is normal.... and not important ! Difference less than 0,5 sec.... So perhaps forget my RAND request For me the real improvment with be the request 1) But i can do without for now.... I love RC Basic !
|
|
|
Post by drfloyd on Jun 11, 2019 4:06:30 GMT -6
update of my features requests... sorry... whishes
|
|
|
Post by n00b on Jun 11, 2019 6:57:10 GMT -6
drfloyd, you don't need to add the bug fix in feature request. That is something I will definitely look into. I don't catch issues that are specific to Windows to often because I mainly use linux so I really do appreciate you reporting this issue. As you may already realize, RCBasic was initially based on sdlBasic. So I used sdlBasic's instructions as a starting point. If you look at sdlBasic vs RCBasic today, sdlBasic has way more commands than RCBasic does. That was intentional. I also looked at FreeBasic, YaBasic, chipmunk basic, pygame, and love2D. I literally read all the way through each of there manual's before I determined the initial instruction set. If it is a command in one of the languages above that RCBasic is missing, you should be asking why I decided to exclude it. Most of the time it is either for performance or because I felt it was not absolutely neccessary. In particular, I left out DATA, PEEK, POKE, pointers, pallete commands, classes, and lots of other stuff out. And I also intentionally left out GOTO which a few of people had an issue with at first. I do consider every request. Just know that I have probably already gotten some of your request before.
|
|
|
Post by drfloyd on Jun 11, 2019 13:21:27 GMT -6
Thank you. No problem. My list is just a personal whish... from a novice if 10% are taken into consideration, I am happy !
|
|