Page 1 of 2 1 2 >
Topic Options
#124633 - 01/16/09 10:59 PM Global values
Angelfox


Registered: 01/16/09
Posts: 43
Loc: Usa
ok on this game i have, i have a BUNCH of global values and i have absolutley NO idea how arrays work and all of the tutorials i have checked are a bit too complex for me to understand.

The question of the day is ......

Is there any way for me to reduce the number of global values i have? i need all of the ones i have.
_________________________
Angelfox and Whitefox own firefox

A boat is stranded at sea and you are the only person on board are you(A)Helpless(B)Sucidal(C)Crazy(D)Praying to Chuck Norris

Need Rpg help? Message me for help

Top
#124649 - 01/17/09 02:24 AM Re: Global values [Re: Angelfox]
nivram


Registered: 07/11/06
Posts: 420
Loc: Bandon, OR
Are you worried about using up global values? There is no limit for them. You can also use alterable values, and flags, but there is a limit on them. 26 for alterable values and 32 flags.
_________________________
A decision making process is binary.

MMF2 Examples and games (open source).
http://www.castles-of-britain.com/mmf2.htm

Top
#124885 - 01/17/09 08:44 PM Re: Global values [Re: nivram]
Novabrain


Registered: 07/01/06
Posts: 2597
I'm not quite sure what you mean by "reduce". If you have data and need to store it, then its more about finding ways to do that. You are by no means restricted to MMF's built-in variables.

Maybe you can elaborate and users can give you ideas and tips on creative data storage?

It all depends on your ability to understand storing data and the type you want to store. You are not bound to just the array unless you absolutely need the structure it provides. Using x, y, and z cells in an array is useful for data that has many elements or corresponds to a matrix.

Also, the amount of data and the way you need to access it and retrieve it makes a difference as to the best means to do it.

You have many options for storing information. There are are several objects that can even load and save files with your stored data.

There is the Associative Array and the Named Variable Object, as well as the Array Object. You can even use the listbox, paragraphs in the string object, etc. There should be no problem or limit for your situation if you find out more.

I am going to recommend that you start by trying the Named Variable Object. It is easy to use and even has some similar features for values, (add, subtract, etc). It uses "keys" which are just the name of the slots for your data. You can load and save them easily. It is very simple to get used to and you can store everything you need to with it.

You can make the object global to your application and save strings or values as needed.

Example Keys:
CharacterName = Greeny
Strength = 150
etc.

Here is a tip: Let's say you want to save similar types of data, (having the same names like "points".) You can always name your keys more descriptively:

PlayerOneCharacter_Strength
PlayerTwoCharacter_Points

That makes it easier for you to keep track of what you are doing and so, it should be easier to work with and refer to your code than arrays might be without commenting.

Again, I bet other users have systems of their own that work well using other objects.

It is a matter of being creative, not frustrated. Take your time!

Top
#124890 - 01/17/09 09:04 PM Re: Global values [Re: Novabrain]
Angelfox


Registered: 01/16/09
Posts: 43
Loc: Usa
OMFG

i understand arrays now
lmao as soon as u said "matrix" i understood

TY!!!!!!

ok so i have like 1000 global values and.....
think about it


U ARE A FREAKING GENUIS

i have to load and save EVERYTHING
is there a simpler way to do that?


Edited by Angelfox (01/17/09 09:04 PM)
Edit Reason: IQ
_________________________
Angelfox and Whitefox own firefox

A boat is stranded at sea and you are the only person on board are you(A)Helpless(B)Sucidal(C)Crazy(D)Praying to Chuck Norris

Need Rpg help? Message me for help

Top
#124894 - 01/17/09 09:46 PM Re: Global values [Re: Angelfox]
nivram


Registered: 07/11/06
Posts: 420
Loc: Bandon, OR
As Novabrain said, there are storage methods for saving and loading, one being the Associative Array. Among the examples on my website there is an Associative Array Example for saving and loading positions, and items.

The Associative Array also uses keys simular to the Named Variable Object. The Associative Array is a third party extension, which means you would have to download it from ---> Neatwares Extensions List. The site will take you to the correct download link.
_________________________
A decision making process is binary.

MMF2 Examples and games (open source).
http://www.castles-of-britain.com/mmf2.htm

Top
#124895 - 01/17/09 09:53 PM Re: Global values [Re: nivram]
Angelfox


Registered: 01/16/09
Posts: 43
Loc: Usa
ok thats good to know

now the last question i need to know is....

can anyone direct or give me an example on how save a bunch of global values

i know how to do it but i use counter

and think about 1000+ counters.....
_________________________
Angelfox and Whitefox own firefox

A boat is stranded at sea and you are the only person on board are you(A)Helpless(B)Sucidal(C)Crazy(D)Praying to Chuck Norris

Need Rpg help? Message me for help

Top
#124984 - Yesterday at 01:04 PM Re: Global values [Re: Angelfox]
Novabrain


Registered: 07/01/06
Posts: 2597
INI++ can save and load your Global Values in bulk, as well as other data.


INI++ is rather powerful and even though it looks complex, it is not hard to use. The documentation is good.

Top
#124992 - Yesterday at 01:17 PM Re: Global values [Re: Novabrain]
Angelfox


Registered: 01/16/09
Posts: 43
Loc: Usa
Sweet ty

i can WAIT for my MMF2D cd to arrive!
_________________________
Angelfox and Whitefox own firefox

A boat is stranded at sea and you are the only person on board are you(A)Helpless(B)Sucidal(C)Crazy(D)Praying to Chuck Norris

Need Rpg help? Message me for help

Top
#124996 - Yesterday at 01:39 PM Re: Global values [Re: nivram]
Raylax


Registered: 11/29/07
Posts: 379
Originally Posted By: nivram
Are you worried about using up global values? There is no limit for them. You can also use alterable values, and flags, but there is a limit on them. 26 for alterable values and 32 flags.


Global Values are unlimited? Wow, I never noticed that. They'll come in handy, then
_________________________
http://raylax.weebly.com

Top
#125000 - Yesterday at 01:48 PM Re: Global values [Re: Raylax]
Angelfox


Registered: 01/16/09
Posts: 43
Loc: Usa
Btw
can your game lag if you use too many global values?
_________________________
Angelfox and Whitefox own firefox

A boat is stranded at sea and you are the only person on board are you(A)Helpless(B)Sucidal(C)Crazy(D)Praying to Chuck Norris

Need Rpg help? Message me for help

Top
Page 1 of 2 1 2 >


Site Links
Forum Index

Home Page
Online Store
Tutorials
Download Center
French Forum
Quick File Links
Multimedia Fusion 2
Updates - build 248
Standard Version
Developer Version

Extension Packs
Bonus Pack 1
Bonus Pack 2
z33z Extension Pack
LIJI Extension Pack

The Games Factory 2
Latest Update - build 248
Community Links
Madword Arcade

GameBuilder
Fusion2Developers
The Daily Click

Extensions
Neatwares Extension List
Extension Updater (FusionUpdater)
Zoom Gamer
Click Chat
11 People are chatting