[XP][VX][VXA] Show Event Name

Started by LiTTleDRAgo, December 22, 2010, 10:00:05 am

Previous topic - Next topic

EZ Destroyer

i put 'Show Name' in the comment box.(the seventh option in the event command)

Aqua

Are you sure you defined the font name correctly?

EZ Destroyer

well, the default is 'Calibri' so i didn't change it. i tried 'Comic Sans MS' and it suddenly works! THANKS!

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

LiTTleDRAgo

March 16, 2011, 11:14:31 pm #24 Last Edit: March 16, 2011, 11:15:54 pm by LiTTleDRAgo
here demo link

http://www.mediafire.com/?lssbdx1fk2phrc3

edit :

Quote from: EZ Destroyer on March 16, 2011, 08:40:56 pm
well, the default is 'Calibri' so i didn't change it. i tried 'Comic Sans MS' and it suddenly works! THANKS!


oh, already solved?

EZ Destroyer

March 17, 2011, 07:26:53 am #25 Last Edit: March 17, 2011, 07:30:24 am by EZ Destroyer
yeah but thx 4 the link too.

i think my com don't have calibri installed. same thing happened 2 your demo(no words until i change font). damn! i gotta install that font. well, my com's really old. maybe, that's why.

Xuroth

Just wanted to mention that when I tried this with 8 named events on a default map, I had major lag issues. is there a way to resolve this?

G_G

Simply edit Sprite_Character and you probably could make your script a lot less complicated.

LiTTleDRAgo

Quote from: Xuroth on March 19, 2011, 05:42:37 pm
Just wanted to mention that when I tried this with 8 named events on a default map, I had major lag issues. is there a way to resolve this?


fixed

Quote from: game_guy on March 19, 2011, 08:18:10 pm
Simply edit Sprite_Character and you probably could make your script a lot less complicated.


if just that, the event name will be drawn even in outside scene map

Xuroth

March 22, 2011, 11:32:26 am #29 Last Edit: March 22, 2011, 05:21:45 pm by Xuroth
Great script. unfortunately, when i use a Transfer player command, all the event names are still there. possible bug?

EDIT: Here's some more info after some more in-depth testing. I started the player on a new map with no named events. using a Transfer player command to a test map with about 30 named events, the names all appear. when going back to the original map, the names persist, until the screen was refreshed a few times by opening and closing the menu a few times. so the disposal might need improvement.

Ill keep testing this and trying to find a solution. Great script by the way!

EDIT2: So I thought it might be a compatibility issue with other people's scripts. However, I pasted it into a new project, set up the event and named it and I get a NoMethodError undefined method for 'name' (line 62) which is:
      next if event.name == ""

which is wierd cuz it works (with bugs) in my game, and this error came up in the new project with me edit of your script and the original (copied from the first post)... This is confusing...

LiTTleDRAgo

March 22, 2011, 09:37:54 pm #30 Last Edit: March 22, 2011, 09:39:47 pm by LiTTleDRAgo
script updated

not sure for the cheap fix, I'll look at it when I have the time

Xuroth

well the fix DID dispose names when transferring player. it just takes a moment after the movement for the names to update/clear. also, going into and exiting a scene (like the menu) causes the names to lag (and FPS to drop to 1) i would assume while the system updates the information to be displayed.

Now I do understand that a problem would be having ~30 or so named events on one map (in view) because graphics (sprites and bitmaps) are lag inducing in general. But I'm sure there has to be a way to update the graphics well

Suggestion: Maybe make it possible so the names only appear when you are within a (configurable) distance. ex: player is within 2 squares radius of event, the name(s) (assuming a couple of events) are drawn. and add an option to allow certain event names to show no matter what.

Please note, I am not trying to be offensive here, I am just trying to comment on certain things I see the system has problems with, and ways you might be able to improve it. This is a great script on its own, but I think you could extend it and make it more powerful. Just trying to help out.

LiTTleDRAgo

I trying to make numerous moving events at the map and it seems not lag at all



---edit

Quotewell the fix DID dispose names when transferring player. it just takes a moment after the movement for the names to update/clear. also, going into and exiting a scene (like the menu) causes the names to lag (and FPS to drop to 1) i would assume while the system updates the information to be displayed.


yeah, I just didn't have enough time to properly fix the script, I have exam next week, not mentioning tons of PR (homework) at school

Blizzard

Include the name sprites in Spriteset_Map instead of Scene_Map. Then won't have to think about when you dispose it and when not.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Xuroth

I still think the proximity idea is viable. even if disposal is done correctly, it could cut down on lag dramatically by only showing the sprites (names) within range. so instead of 30+ sprites, it could just be 3-4  or less (unless the user piles all the events around the player to box him/her in...)

but back to the topic: it only seems to lag when updating after a scene change or the player transferring between maps. once it has a moment to "catch up" it works fine at about 39-40 FPS.  Your screen shot there LiTTleDRAgo, shows an FPS of 18, indicating the system was either loading/drawing names, or just a little bogged down from so many events.

Blizzard

The best way to do it then would be to include the name sprite inside the Sprite_Character class. Since Blizz-ABSEAL destroys all sprites out of range, it would take care of that as well if you have it installed along with this script.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

LiTTleDRAgo


Xuroth

Great! It works fine now! I just had one last nitpick. When going into the menu (or any other scene) the names still stay on screen.

I've tried adding a check to see if Scene_Map is active, but no matter what method I add it to, the system comes up with really weird errors

 if $scene != Scene_Map
   return
else
<your original code/method>
end

they usually give errors with Tons (in addons that aren't even turned on) or it will throw up a NoMethodError for something random like a . or a /

G_G

You're using the Sprite class all wrong. First, inherit the class Sprite. Second, don't create a sprite within the sprite class, thats just a bit redundant. Instead just use this line of code in the initialize method.
self.bitmap = Bitmap.new(width, height)


Replace @name_event with self through the entire class. I also still think that the SpriteName should be created through Sprite_Character.

LiTTleDRAgo

Quote from: Xuroth on March 24, 2011, 04:14:26 pm
Great! It works fine now! I just had one last nitpick. When going into the menu (or any other scene) the names still stay on screen.


can you put the screenshot?
because I didn't encounter that error (I calling scene_menu and the names did'nt appear)

Quote from: game_guy on March 24, 2011, 04:46:34 pm
You're using the Sprite class all wrong. First, inherit the class Sprite. Second, don't create a sprite within the sprite class, thats just a bit redundant. Instead just use this line of code in the initialize method.
self.bitmap = Bitmap.new(width, height)


Replace @name_event with self through the entire class. I also still think that the SpriteName should be created through Sprite_Character.


I'll look at it later