|
Post by andrian on Sept 5, 2008 11:45:22 GMT -5
When I am working on a large project with a lot of include files, I sometimes want to search the entire project for a certain string. It gets really annoying to go through and open each include file, then search each one individually. I would like to have a function added to the B4GL IDE (BTW, I prpose calling it GLIDE ) that would search through the main file for include files, open them, search through them for include files, and so on, until every file in the project has been searched. This would be an advanced option, standard searching would remain available. Alternatively (or additionally) it might be made so that you could search all open files for the phrase, rather than open one, search it, then the next, and so on. (I like to work with LOTS of include files and often have several open at once) Yea? Nay? Stop making stupid suggestions? All feedback welcome.
|
|
lehk
Newish
Posts: 7
|
Post by lehk on Sept 7, 2008 4:31:40 GMT -5
not a perfect solution but you can search in many files with notepad++ or windows file search.
It obviously isn't as convenient as searching built in, but you can do it now.
|
|
|
Post by Nicky Peter Hollyoake on Sept 7, 2008 4:47:48 GMT -5
Try using less include file, by the sounds of it you got a 1 command in each one.
|
|
|
Post by andrian on Sept 8, 2008 17:08:01 GMT -5
You obviously haven't seen any of my project code. My include files generally contain at least 100 lines of code. I DO NOT want to merge those files! I learned that lesson with Dogfight. It turned into a rat's nest. Finding anything in the code was very difficult without searching. With include files, I could narrow my searches to certain portions of code or avoid searching altogether by simply putting related data and commands in thesame file. Unfortunately, sometimes you must change something that is either all throughtout your code or that is hiding somewhere but you're not quite sure where. Usually I run into this problem with test data that I put into my code temporarily until the restof the code is ready for it. I then lose track of it and need to relocate it and set it up with real numbers or functions.
I have BIG projects! So I'd like to respectfully ask for this small improvement.
|
|
|
Post by Darkjester on Sept 8, 2008 17:10:12 GMT -5
With large projects that contain thousands of lines of code can't you experience slowdown? How do you make a program run faster?
|
|
|
Post by Nicky Peter Hollyoake on Sept 8, 2008 20:12:51 GMT -5
With large projects that contain thousands of lines of code can't you experience slowdown? How do you make a program run faster? 1) Don't make rediculous long codes for something simple. Example ... Print Cosd(45)+ABS(Cosd(45)-1) (stupid, but you get the gist) 2) if using OpenGL put everything in a list (eg: GLNewList) Theres loads of ways ... Just be smart about stuff, if something starts getting slow look at other methods of writing the code once I wrote a code, was really slow, figured out its just because I had to many "if/endifs" and changed alot for REALLY simple coding. - Nicky (Thats why I wanted to leaern how to get an angle from two points for faster collision).
|
|
|
Post by Darkjester on Sept 8, 2008 20:40:17 GMT -5
Im talking about complex games that have AI Physics Glrenderer I dont have vertex buffers so i cant speed up with out a plugin but no one will explain the structure very well for me otherwise this project would have been done already. Any Help with fast AI, Plugins, Or other aspects of game programming would be helpful(just need to get it fast it runs slow on my gaming computer)
|
|
|
Post by andrian on Sept 9, 2008 10:15:22 GMT -5
I use the sprite system and use lots of subs, functions,and gosubs. I do not experience slowdown unless I am trying to do processor-intensive things like searching through a 1000 index structure array in 20 milliseconds. Dogfight, my first real project, is over 2000 lines of code. My current project is even larger. (and its not finished yet!)
The length of the program is unimportant. In theory a 100,000 line piece of procedural code should run just as fast as a 10 line piece of procedural code. Size matters not! its all about efficiency.
I have a 500 MHz proc and I can run professional games well below minimum requirements and notice no difference in gameplay. The reason is that my computer is uncluttered. I use CCleaner and registry optimization tools. I Defrag regularly. But I've also gotta baby the machine something fierce. (AKA no multitasking while running powerful games under minimum specs. Don't let the maintenance get off schedule. Etc.)
My point, mainly, is that the code will still execute at the same rate. What slows down your animation is trying to overwork your computer. Optimize your code. in an IF statement, put the less likely of the two possibilities in the else clause to save executing the extra line of code. Don't have unnecessary code in loops (x = 120 only needs to happen once, not every time your animation runs). Find a faster search/sort algorithm. Always use LOR and LAND. When using LOR, put the condition most likely to be true first. When using LAND, put the condition most likely to be false first. Use some common sense and your code can be sped up dramatically.
|
|
|
Post by Nicky Peter Hollyoake on Sept 9, 2008 12:36:07 GMT -5
Make a program that does this. I knwo it be easier if it was built in but until then you can make some sort of tool.
|
|
|
Post by Darkjester on Sept 9, 2008 14:56:39 GMT -5
Your referring to the lazy opperators? I have never used them can someone explain them im sure they would be usefull for AI that doesn't always act the same
|
|
lehk
Newish
Posts: 7
|
Post by lehk on Sept 9, 2008 16:09:27 GMT -5
condition land CONDITIONS does not bother to check CONDITON if condition is false
condition lor CONDITION does not bother to check CONDITION if condition is true
in an ideal program all ands and ors could be replaced with land and lor, in real life sometimes the second CONDITION has side effects the programmer is counting on for the proper functioning of code.
if you aren't depending on the last CONDITION check having a particular needed side effect you should always use land and lor
|
|
|
Post by Nicky Peter Hollyoake on Sept 9, 2008 16:35:59 GMT -5
Don't know if you got it but heres another explaination.
Dim Array(2) Dim i = 3
if i < 3 Land Array(i) = 2 Then '... Endif
See how it didn't say "Array out of index" because its not executing the second expression just the first as its return FALSE.
if we done this ...
Dim Array(2) Dim i = 3
if i < 3 and Array(i) = 2 Then '... Endif
Would retun the error.
- Nicky
|
|