Search found 7 matches

by vbro
Wed Jun 12, 2013 5:58 am
Forum: Games
Topic: Starfield Simulation
Replies: 8
Views: 9054

Re: Starfield Simulation

I played around with that tool a bit, and from what I could tell, multi-dimensional arrays are only a little bit faster than object properties, but single-dimension arrays are usually about twice as fast! I also didn't realize that accessing items in lists was so very slow, but I guess that makes se...
by vbro
Tue Jun 11, 2013 8:59 am
Forum: Games
Topic: Starfield Simulation
Replies: 8
Views: 9054

Re: Starfield Simulation

Wow. That's great stuff, Bernd! I'm actually surprised that the array implementation was faster since it had one more step in the animateStars loop than the non-array implementation did. I'm guessing it was looking up the star's position in the graphic's loc property rather than the star array that ...
by vbro
Sun Jun 09, 2013 10:16 am
Forum: Games
Topic: Starfield Simulation
Replies: 8
Views: 9054

Re: Starfield Simulation

That is what I meant by blocking. Have a look at the Resource Center in the Help Menu. Thanks I'll take a look at that. too bad, I like arrays but I admit it is easier to read without an array. If you are doing animations you want to be as fast as possible. At times arrays are faster. Oh, so do I. ...
by vbro
Sat Jun 08, 2013 8:19 pm
Forum: Games
Topic: Starfield Simulation
Replies: 8
Views: 9054

Re: Starfield Simulation

That is perfect, Bernd! I'm still new to LiveCode so I'm not exactly clear on the term 'blocking'. However, I can see how you set up the animateStars to automatically loop itself with the conditional statements at the beginning and end of the handler. I had no idea that setting the location of the g...
by vbro
Sat Jun 08, 2013 9:17 am
Forum: Games
Topic: Starfield Simulation
Replies: 8
Views: 9054

Starfield Simulation

I'm currently trying to code an animated starfield (with parallax) for a game I'm working on, however, I've run into a bit of difficulty. I started by taking an implementation in Python that I found and 'translating' it to LiveCode. It 'works' so far, except that each repeat of the main loop runs ex...
by vbro
Sat May 11, 2013 7:19 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Defaultfolder Issue
Replies: 2
Views: 2189

Re: Defaultfolder Issue

Thank you very much. With this handler I can now set the defaultFolder appropriately according to the environment and OS the stack is running on. I think I may have been putting malformed folder paths into defaultFolder, but I'm not sure. Either way, greatly appreciated.
by vbro
Thu May 09, 2013 8:11 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Defaultfolder Issue
Replies: 2
Views: 2189

Defaultfolder Issue

I added a handler to my stack that reads a number of .txt files from a folder and stores their content in an array. It uses the defaultfolder property and the files keyword to get the list of files to process. At first, the handler was working fine and producing the expected results, but then the ne...