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.

DarkBASIC Professional Discussion / memblock? what use are they.

Author
Message
Neotron
16
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 9th Oct 2010 12:54
i know what they do but i don't know how to implement them.

A tutorial is welcomed.

can it help me increase my FPS?

tutrorial for images and objects only.

ALLAH IS THE GREATEST
May he forgive me
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 9th Oct 2010 16:04
Not counting very special outside plugins, memblocks is the fastest (custom) image / object editing and manipulating method. I learned it a couple of weeks ago, and i can't really do anything without them since then. Right now it helps me greatly with fog of war and radar screen creation, which task was many-many times slower using bitmaps edited invisibly with the 'dot' and 'get image' command.

Though if you want to use it on large images, you should split up that into 4 or more different memblocks, and make image from them each per loop, so the slowdown which is already nearly invisible completely vanishes.

You don't need any hardcore tutorials for that, just search after it here on the forum.

Also, here is the thread, and also the guy called '29 games' who got me going back then: http://forum.thegamecreators.com/?m=forum_view&t=175619&b=1
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Oct 2010 01:34
Manipulate images at a usable speed, create 3D objects (mostly to replace the matrix before the advanced terrain plugin) and creating sounds in-game.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
29 games
20
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 12th Oct 2010 01:01
I got a name check!

By using memblocks you can get access to how images, sounds and objects are constructed, which as Phaelax said, can be used to manipulate or make images, sounds and objects. But you can also uses memblocks to in other ways. The code snippet below uses a memblock for collision purposes.



The collision shown is very simple but, with a bit of mathematics, you can create much more complicated collision detection.

You can also use memblocks to pass data to dlls (which I believe is how things like sparky's collision dll work) and I've seen them used to pass information to other computers as part of multiplayer games.
Neotron
16
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 14th Oct 2010 21:54
thnx for the replies.

i was thinking using memblocks to render many objects.i.e. if 500 objects slow my game down then use memblock to speed things up.Will this happen

ALLAH IS THE GREATEST
May he forgive me
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th Oct 2010 22:15 Edited at: 14th Oct 2010 22:17
Memblocks are only used for fast data processing of memory. The actual display of objects can not be sped up. However, I do remember someone making a dll where you could draw one object again and again to make it look like you're using more than 1 object... I'll look for it and post here

Haha, thought it was kaedroho Here you go : http://forum.thegamecreators.com/?m=forum_view&t=176486&b=1&msg=2103264#m2103264

TheComet

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Neotron
16
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 16th Oct 2010 15:25
@batvink

thnx for the tuts but i would really like memblock with objects thnx.

ALLAH IS THE GREATEST
May he forgive me

Login to post a reply

Server time is: 2026-07-23 10:30:33
Your offset time is: 2026-07-23 10:30:33