We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Basic super slow ??
#21
LitDev,

Thank you very much for the instructive example.  Shy
Reply
#22
Google made wwwBASIC (for Node.js and web) but syntax is Dartmouth BASIC-like, which makes it confusing.
Reply
#23
Smile 
I had thought about this optimization, but I figured it would flicker more, and it does.

We should create the image of the next frame without displaying it, and then replace the image of the current frame with this new image...
That way, the display wouldn't be showed during the tests.
It would be prettier because it would be instantaneous.
Is this feasible?

I'm not sure I'am clear  Smile
Reply
#24
You are clear - since we are looking for speed, in the last example I gave (DKJX394.000-0) I use the extension command to Pause graphical updates (LDGraphicsWindow.PauseUpdates and LDGraphicsWindow.ResumeUpdates) while the drawing is being done - this significantly reduces flicker as it only updates the visual GW after all the changes have been made.  Its not perfect, but with SB we are crafting 'the best we can!" which for me as I said is half the fun.  

Also I changed the logic so we do the life calculations only considering the alive cells, not wasting so much time on the dead regions - combined these are optimisations give reasonable performance, not compared to native C++ code for example, but good for SB.
[-] The following 1 user Likes litdev's post:
  • stevantosic
Reply
#25
I started to study your DKJX394.000-0 version which is amazingly fast ! ?
But at this time I don't understand everything.
I keep trying to understand !
Thanks a lot for all your help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)