Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Makin Save files in MMF
Canada
Ike Bravo
  Posted: Feb 5 2007, 01:05 PM
Quote Post


Memories Of All Kinds...
[*][*]

Group Icon
Group: Members
Posts: 1685
Member No.: 2972
Joined: 21-November 06

Status: (0d) [--]


Like... you can save the data and load it back up like a level editor would. ohmy.gif


--------------------
user posted image user posted image user posted image user posted image
PMEmail PosterUsers Website
Top
Canada
Ike Bravo
  Posted: Feb 5 2007, 03:30 PM
Quote Post


Memories Of All Kinds...
[*][*]

Group Icon
Group: Members
Posts: 1685
Member No.: 2972
Joined: 21-November 06

Status: (0d) [--]


Why wont anyone anwser? ohmy.gif sad.gif


--------------------
user posted image user posted image user posted image user posted image
PMEmail PosterUsers Website
Top
United States
Xgoff
Posted: Feb 5 2007, 05:27 PM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


yes

it depends on how complex your levels are

if they're simple, you can use INI files. More complex levels should be saved via arrays


--------------------

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth:
DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message
DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it
DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep
DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot
this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence
NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above

QUOTE
(5:25:58 PM) Mikau: xgoff
(5:26:00 PM) Mikau: guess what
(5:26:04 PM) Xgoff: chicken butt
(5:26:09 PM) Mikau: **** you
PMEmail PosterUsers WebsiteAOLMSN
Top
Unspecified
add bravo
  Posted: Feb 5 2007, 05:46 PM
Quote Post


Welcome to MFGG! I'm BabyMarioFan!


Group Icon
Group: Members
Posts: 13
Member No.: 3123
Joined: 30-December 06

Status: (0d) [--]


How do I do it?
EDIT : This is PunkYoshi on babymariofan's account! ohmy.gif

This post has been edited by babymariofan on Feb 5 2007, 05:49 PM


--------------------
We wish you an MFGG man! I support MFGG 3.0.
Duds are people who don't lisson to me!
user posted image
PMEmail Poster
Top
United States
Xgoff
Posted: Feb 5 2007, 08:38 PM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


eh I'll put up just the array method for now


a *cough*simple*cough* method of doing it (if you're using active objects as level objects)

pretty much EVERYTHING (including background objects) has to be an active object (obviously background

objects are pasted into the background when they are loaded)

this is also assuming you use a 16 x 16 grid (you'll have to change some values if you're not). For the

arrays, you have to set their X and Y dimensions to the width and height of the level divided by whatever

your tile size is (16). Obviously your levels should be a multiple of the tile size

---

This is needed for both methods (and is one of the most painfully tedious things you will ever do in your life):

CODE
--- SAVING ---

Start of frame
--> Level Object type A - Set Alterable Value A to: 1
--> Level Object type B - Set Alterable Value A to: 2
--> Level Object type C - Set Alterable Value A to: 3
--> Level Object type D - Set Alterable Value A to: 4

... etc

--- LOADING ---

On loop "LoadY"
Global Value A = 1
--> Create (Level Object type A) at: -64, -64

On loop "LoadY"
Global Value A = 2
--> Create (Level Object type B) at: -64, -64

On loop "LoadY"
Global Value A = 3
--> Create (Level Object type C) at: -64, -64

On loop "LoadY"
Global Value A = 4
--> Create (Level Object type D) at: -64, -64

... etc.

keep doing that until you get through all your objects
---

Array Method (make sure the array is numerical, set to 0-based index, and that all the level objects have the same qualifier [i'll use qualifier "1"]):

QUOTE (Saving)
Start of Frame
--> Array - Set file to: Appdrive$ + Appdir$ + "test.lev" (you'll want to use a better way of referencing the files)

(save event)
+ Only one action when event loops
--> Start loop "SaveX" for: Frame Width / 16

On loop "SaveX"
--> Start loop "SaveY" for: Frame Height / 16

On loop "SaveY"
+ Group.1 - X position is equal to: Loopindex("SaveX") * 16
+ Group.1 - Y position is equal to: Loopindex("SaveY") * 16
--> Array - Write value to XY: Alterable Value A("Group.1") ; Loopindex("SaveX") ; Loopindex("SaveY")


QUOTE (Loading)
Start of Frame
--> Array - Set file to: Appdrive$ + Appdir$ + "test.lev" (same as your saved file, obviously)

(Load event)
+ Only one action when event loops
--> Start loop "LoadX" for: DimX("Array")

On loop "LoadX"
--> Start loop "LoadY" for: DimY("Array")

On loop "LoadY"
--> Set Global Value A to: ValueatXY("Array",Loopindex("LoadX"),Loopindex("LoadY"))
--> Group.1 - Set X position to: Loopindex("SaveX") * 16
--> Group.1 - Set Y position to: Loopindex("SaveY") * 16


you'll still have to add the background objects to the backdrop afterwards

i did this in my head (with some reference from MPUZ's level editor), so it might not work... but it should

Level editors are complex as hell so I hope you weren't expecting something simple

This post has been edited by Xgoff on Feb 5 2007, 08:42 PM


--------------------

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth:
DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message
DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it
DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep
DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot
this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence
NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above

QUOTE
(5:25:58 PM) Mikau: xgoff
(5:26:00 PM) Mikau: guess what
(5:26:04 PM) Xgoff: chicken butt
(5:26:09 PM) Mikau: **** you
PMEmail PosterUsers WebsiteAOLMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0536 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.50 ]