The Daily Click ::. Forums ::. Klik Coding Help ::. Questions about MMF, GlobalStoreX and Arrays )
 

Post Reply  Post Oekaki 
 

Posted By Message

Bronek Watkowski



Registered
  11/06/2006
Points
  1
11th June, 2006 at 01:49:05 -

Hi there!

I have a bunch of questions that I guess You pro's could give me an answer to. They're not too hard to answer, I guess, hope that someone will take time to answer them.

1) A question about the "GlobalStoreX" object. I know what "integers", "strings" and "bools" mean (I'm unsure about the "shorts" - could anyone explain what's the difference between them and integers? I can't find the right word in my dictionairy, and I'm not a native speaker, so this thing probably has a different name in my language ), but what's the difference between them when it comes to MMF engine? I didn't notice any difference between storing a number (for example: "112" or "78") as an integer, short or a boolean. Can I use all of them for any purposes, or are there any restrictions of the engine that I should be aware of?

2) What array works smoother with the MMF engine - a text one or a number one? I mean: which one works faster when it comes to loading and storing data both inside the game and outside of it (in various saved files).

3) Are there any problems with using a couple of arrays in one level? For example, I use a different array for storing character data (like attributes, abilities, experience level etc.), a second one for storing inventory data (how many and which objects does the player have, etc.) and a third one for storing level data (for example - has this quest started yet, etc.) - is this a bad method? I've done it so, because I have the inventory screen as a different level.

4) A question about game performance - I'm using a big backdrop picture as the backdrop for one of the scenes, and I need to have some invisible rectangles set as borders for the player movement. Which of the methods would work smoother (with which one would the game work better and faster?):

a) Having the rectangles saved as BACKDROP objects and giving them 120 semi-transparency (that's 100% - they are invisible), and then setting as "blockers".

b) Having ACTIVE OBJECTS as rectangles, adding them to one group, and then - when the game starts - making that group invisible.

Both methods work fine for me - I just want to know which one would work faster (I don't see a difference, since I have quite a good computer - but I'm afraid that users that have a bit slower machines can feel the difference).

5) Last question - is there a way to quickly check if there's a position in the LIST OBJECT, and then delete it? I mean a fully automated process, without the user having to click on the right position and pressing "delete".

For example - I have a list with all the weapons the player has. This list is not segregated - the player can pick up weapons in random order, so the shotgun can be both picked in the first position, and in the last one (or in the middle, or as the second item, or... etc.). I want to make it so, that when the player touches an object, his shotgun disappears from the list - how to do this? How to delete a specific line when the program does not know which line number is it? How to tell him which one is it?

Will be glad if someone takes time to answer me.

Cheers!


 
-= MultiMediaFreak =-

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
11th June, 2006 at 02:29:35 -

I dont think that the difference between strings and numbers is so much performence, its more so about which you plan to use. I'd venture to say though, that if you plan on using only numbers, I wouldnt put them in a text. Just incase there is a slight nanosecond difference, and you dont want it.

As for backdrop vs active. Active objects drain performence if they are very large, so having a backdrop thats set to be completly invisable, is your best bet, unless you want to have spacific actions done when you hit different "blockers", because as backdrops, its 1 type, object hits backdrop. With actives, you can have various different actives hitting different blockers, and have more flexability. If your doing a tutorial, you can use active objects, so that you can toggle them visable and invisable.

Didnt read much into the other questions, if I get to them later though, I'll see what I can do. Hope this helps so far though.

 
http://www.facebook.com/truediamondgame

Werbad



Registered
  18/09/2002
Points
  235
11th June, 2006 at 09:38:51 -

I think 128 semitransperency is fully invisible...
List objects has a FindString function which can be used to search for specific lines
example:
- FindString( "List", "Shotgun", -1 ) >= 0
* List delete line FindString( "List", "Shotgun", -1 )

this checks if there is a line starting with "Shotgun" and if it exists it is deleted
Note that if the list is 1-based you should use > 0 instead than >= 0

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
12th June, 2006 at 09:02:24 -

A "short" uses a different amount of storage space from an integer, and therefore has different upper and lower limits - it usually uses 16 bits, rather than Integer's 32 (I'm assuming). So you won't notice a difference until either you're storing vast amounts of numbers, or working with very high/low ones.

I'm surprised that there wasn't a difference between Short/Int and Bool, though.

And Werbad suggested the same as me for the inventory - using a list will allow you to search. The on-screen inventory should be updated according to the list contents rather than directly.

 
http://www.davidn.co.nr - Games, music, living in America

Werbad



Registered
  18/09/2002
Points
  235
12th June, 2006 at 13:17:46 -

Isn't boolean the same as a flag? You can't store values as boolean since boolean only has two states (on and off)... Are you sure that worked?

 
n/a
   

Post Reply



 



Advertisement

Worth A Click