Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Chris Tate - memblock walkthrough help?

Author
Message
Bulsatar
13
Years of Service
User Offline
Joined: 19th Apr 2011
Location:
Posted: 7th Sep 2011 04:26
Hello,

I was going through Chris's new Memblock explanation and I ran into someplace I couldn't figure out. It was on this page http://www.binarymodular.com/main/articles.php?article_id=75
Chris creates the memblock as a 2 (word, rangeL 0-65535) but then it looks like he fills it with float??? I thought that you had to designate the size of the memblock first? So if he is filling it with 60 floats, how does that work? or does dbpro automatically increase the size of the memblock as needed? and if that is the case, why declare a specific memblock size when you can just declare whatever and increase automatically as needed?

Thanks to all who understand this stuff
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 8th Sep 2011 23:28
What's probably confusing you here is that in the example Chris is using the MAKE MEMBLOCK FROM FILE command which gets the memblock size from the file being used.

The first ten lines of Chris' example code are where this file is created. The float values are being written to this file and then the MAKE MEMBLOCK FROM FILE command uses this file.

The file "Land.dat" should appear in the same folder as the project file.

Have a look in the help file index to find the MAKE MEMBLOCK FROM FILE as for some reason it doesn't appear in the memblock command list.

Hope this makes sense.
Bulsatar
13
Years of Service
User Offline
Joined: 19th Apr 2011
Location:
Posted: 9th Sep 2011 00:21
aahh, yep, I was reading the code incorrectly. Got it!
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Sep 2011 17:26
Thanks 29 games, I have been working on a few projects and have finally found more time for the site.

I hope the information was useful Bulsatar. I am currently working on more explanations of more memblock commands and have just released a new tutorial in the XML section.

Bulsatar
13
Years of Service
User Offline
Joined: 19th Apr 2011
Location:
Posted: 10th Sep 2011 03:37
It was very useful! I am coming from a database background so I have the basics, but the more detailed parts of a standard game are still elusive and I need all the help I can get

Login to post a reply

Server time is: 2024-11-22 17:05:41
Your offset time is: 2024-11-22 17:05:41