The Daily Click ::. Forums ::. General Chat ::. The thread of randomly useful MMF knowledge
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
7th December, 2008 at 17:08:26 -

Just wanted to put a thread for all the MMF knowledge you wish you knew earlier, but didn't

- There are only a limited amount of flags in MMF. 32, I think. Setting a flag 1000 or flag 192 means that you could be overwriting one of those flags.
- MMF by default uses integers, and up to a certain amount of digits. So, if you made a code that does 3/2, it could result in 1.5 in some places and 1 in some other calculations. To convert it to have decimal places, make it (0.0 + 3)/2
- Pressing the 'Next' button in the expression editor, automatically highlights the next empty space there.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
7th December, 2008 at 17:13:13 -

A global active object will keep it's alterable values across frames, whereas a non global active object's alterable values will all be reset to 0.
This basically lets you have more global values.

If i knew this when i only had The games factory 1, it would have made making an rpg much easier.

 
.

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
8th December, 2008 at 07:17:49 -

random() is base 0....
shut up, that still screws me up

if it screws you up or base 0 confuses you:
random(2) will give you either a 0 or a 1
if you don't want a 0 at all a simple fix would be random(2)+1 [which gives a 1 or a 2 ]

simple but might be useful to know

 
thinking is like pong, it's easy, but you miss sometimes.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
8th December, 2008 at 08:25:35 -

youre points say you are negative leet

is this mmf in general? or specifically mmf1.5? mmf2?

 
n/a

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
8th December, 2008 at 08:28:40 -

spreading values and starting fast loops in the same event will not work, you must spread the value in one event, then in the next event, start the fast loop

 
-

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
8th December, 2008 at 09:06:44 -


Originally Posted by Ricky
spreading values and starting fast loops in the same event will not work, you must spread the value in one event, then in the next event, start the fast loop



this one is really a pain. Some times coding is easier to read if you just start loops in a separate event ALL the time.


Oh and this is a repeat:

When a fast loop is called, the game will load ALL the fast loop events and check if the string is the same as the loop it is on, for each loop run. So you need to put your loops into event groups that are opened before the loop starts, and closed after it finishes, or else just running too many loops will slow down your game

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
8th December, 2008 at 09:27:57 -

Be wary of using the "NOT overlapping object" condition
It will not test true if none of those objects exist

 
-

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
8th December, 2008 at 10:36:39 -


Originally Posted by Ricky
Be wary of using the "NOT overlapping object" condition
It will not test true if none of those objects exist



You can work your way around that by doing this

Always - Set flag 0 off (any flag will do)
X overlapping object Y - Set flag 0 on (obviously the same flag as above)
If flag 0 is off (you guessed it, same flag) - Whatever you want it to do while not overlapping

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
8th December, 2008 at 11:39:34 -

Oh, on what Liquixcat said, the built-in random function is not very random! Use the MT Random object instead, but the MT isn't very random either on some computers.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
8th December, 2008 at 12:50:01 -


Originally Posted by X-Member1900

Originally Posted by Ricky
Be wary of using the "NOT overlapping object" condition
It will not test true if none of those objects exist



You can work your way around that by doing this

Always - Set flag 0 off (any flag will do)
X overlapping object Y - Set flag 0 on (obviously the same flag as above)
If flag 0 is off (you guessed it, same flag) - Whatever you want it to do while not overlapping



another way is simply checking if objects exists first
Count X no objects > 0
Count Y no objects > 0
x not overlaping y


 
Code me a sausage!

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
8th December, 2008 at 13:00:57 -

GROUP OF EVENTS
It can easily be used to create different weapons system, pause system and many more.

PAUSE SYSTEM
making a inventory or a menu call that pauses the game behind.
Simply make two groups MENU and GAME... and disable/enable them.

WEAPONS SYTEM
If you are making a shooter with 9 weapons don't make it complicated. just make one first in a group and copy that group 9 times.
customize them and make active only the one that is currently equiped.

 
Code me a sausage!

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
8th December, 2008 at 17:44:13 -


Originally Posted by Don Luciano

WEAPONS SYTEM
If you are making a shooter with 9 weapons don't make it complicated. just make one first in a group and copy that group 9 times.
customize them and make active only the one that is currently equiped.



Thats what I did for Lil' pirate. But at first I was a bit of an idiot and put all the projectile and collision events in the same groups so when you change your weapon, the bullets froze in midair lol.

 
.

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
10th December, 2008 at 20:41:14 -

Originally Posted by Cecil
youre points say you are negative leet

That's because I'm not leet

something useful:

Have a sweet engine on one file and working on another game but don't want to rewrite the code?

Get your working engine, rename the char the engine applies to to the name of the new char and copy and paste the events... wala auto links to new char

 
thinking is like pong, it's easy, but you miss sometimes.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
17th December, 2008 at 14:32:02 -

Oh, very important:
Legibility of your code is much more important than coding it quick or making it efficient. It can save you hours of debugging.

Also, for events with a lot of actions that take up the whole screen, it's good to split it up into other events. E.g.:
On loop "X"

[Action1]
....
[Action62]


..should instead be...

On loop "X"

Start loop "X0" once
...
Start loop "X6" once

On loop "X0"
[Action1]
...
[Action10]

On loop "X1"
[Action11]
...
[Action20]

(and so on)


It takes 6 times more events and loops, but it's much, much easier to read. You could always use a Nifflas-Pixelthief fast group if the extra loops become a burden on the core, but it saves a few days on debugging and many more days of headache

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click