Scene_Base
#1
This is a locked, multi-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


This is a resource which I hope to develope to the point it is used... A lot. (wishful thinking)

At the moment what it does is allow you to create scenes, while only having to initialize the objects in the scene and writing the seperate update methods. (for interaction)

Don't forget to make the scene a sub-class of Scene_Base, ie - (class Scene_Name < Scene_Base)

In the future I hope to include introduction animation methods and closing animation methods, as well as a variety of other methods to make writing scenes easier.

The only real difference, is that when you create an object in a scene, instead of doing -

Code:
@playtime_window = Window_PlayTime.new

You'd do -

Code:
@objects['time'] = Window_PlayTime.new


And when refering to the object, you'd obviously use -

@objects['time']

as opposed to the prior.


You can also play music in the scene, simply by adding -

Code:
super('Song Name Here')

Into the scenes initialize method.

Example -

Rewritten_Scene_Menu


C & C please.

Script -

Scene_Base
}
#2
I think a Scene_Base class requires much much much more that just BGM initializing.

What you did actually was rather... errr... pointless?

You have the right idea with updating objects (I don't see the point of a hash) but its much more than that.

What I have done in an actually Scene_Base class was divide the main processing up into several catagories.

main_prevariable
main_audio
main_windows
main_sprites
main_spriteset
main_postvariable
main_loop
main_end
main_dispose

(Maybe others, I don't quite remember).

All of those are blank methods, but you are to alias them in new scenes none the less (for further expansion and compat.).

This prevents rewriting the boring main method ever again, updating any object, disposing any object, etc.

If you are interested, I will post it for you and explain anything.
}
#3
Sorry, had school.

I used a hash because that was easier for testing. I'll use the instance variables this time around.

I didn't have much time last night so that's all I got done, this is what I'm working on so far - (Am incuding intro animation, ending animation, and animation on command, and animations include Zoom, Move, and fade)

So Far


The animation loops will be replaced by an animation method, but that'll take to long just to make a post, so, yeah.

Thanks for the offer though.

EDIT : I should actually thank you for your whole post, the real reason I used a hash is because I'm just not completely comftorable using self.instance_variables, etc. You gave me a couple ideas, and I'm interested in how you handled sprites and sprite_sets.
}
#4
Wow. Now lazy people will be upgraded to lazy scripters! Hurray for dumbasses! XD
}
#5
That's an interesting way to put it, but yeah, pretty much.
}




Users browsing this thread: 1 Guest(s)