RPG Maker PY (RMPY)

Started by Ryex, September 07, 2010, 03:57:31 pm

Previous topic - Next topic

Blizzard

You're not redrawing the map at all if you use sprites. You just set the proper pointers. With your method you always have to blit the whole thing each time you make a change.
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.

Ryex

oh I get you, thing is that there is no shut thing as sprites in pygame. or there is but I can't use them in conjunction with the normal editor. If I make a game engine I'll be sure to keep this in mind.

also sprites come down to a blit anyway. how else would they get drawn to the screen surface? :P

when Pygame dose a blit all it dose it tell SDL to do it so it will be fast.

I just have to keep the number of blits I do each "frame" so to speak to a minimum. that means pulling from a pre rendered map if it hasn't changed. and when it dose change only draw the changed tiles. cache autotile patterns so they don't have to be redrawn. ect.

I also have to keep the size of the blit that GDI dose as small as I can because it is likely to be the slowest operation, probably slower than all the pygame blits together even with drawing the map for the first time.
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 />

Blizzard

I don't think you know what I mean. The way how RMXP works with this is just fine. You have a bunch of bitmaps and a bunch of objects that display those bitmaps (in RMXP's case sprites). You never do any blit operation, you just link the sprites with the bitmaps, i.e. sprites have a pointer to the bitmap they are supposed to show. You never have to use a blit operation for this, that's what I
meant. You just have a bunch of sprites that are used for display.
Sprites don't get blit to be drawn. A simply polygon drawing operation with 4 vertices and the proper UV coordinates is all you need to draw a bitmap from a sprite on the screen. Blitting is basically copying bitmap data which is never done or needs to be done here.
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.

Ryex

such a method dose not exist in pygame. when you use sprites you still have to tell them to copy themselves to a surface other wise they never display.
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 />

Blizzard

By blitting? Wow, that sucks ass. No wonder it's slow.
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.

Ryex

February 06, 2011, 04:48:28 am #205 Last Edit: February 06, 2011, 05:08:14 am by Ryex
pygame isn't slow GDI is. GDI is windows internal drawing library the one wxpython hooks into. pygame uses SDL which is FAST. GDI has no notion of sprites only Blits
Pygame uses SDL which is a 2d frame buffer and while it can be used with pyopengl this isn't a stranded feature.

so blits via SDL it is.
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 />

Blizzard

February 06, 2011, 05:16:25 am #206 Last Edit: February 06, 2011, 05:20:51 am by Blizzard
I know what SDL is, thank you. :)
It's still a bit weird how it works. I'm used to direct OpenGL/DirectX processing and drawing of polygons so this seemed kind of a performance eater to me.
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.

Ryex

Quote from: Blizzard on February 06, 2011, 05:16:25 am
I know what SDL is, thank you. :)
It's still a bit weird how it works. I'm used to direct OpenGL/DirectX processing and drawing of polygons so this seemed kind of a performance eater to me.

didn't mean to offend Just rationalizing

but ya I was surprised when I looked into Pygames sprites too.

basically you create a sprite. make sure that Sprite.image is a surface containing the graphic to draw and Sprite.rect is a rect for the position.
then you add the sprite to a spritegroup and call Group.draw(surface) where surface is the surface to draw the sprites in the group to (normally the display screen)
and the docs say the Group.draw does blit operations so ya.
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 />

Blizzard

You didn't offend me, that's what the smiley was there for. :)
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.

Ryex

well after getting out from under the pressure of a chem exam a bunch of homework and some sleep problems causing me to miss a bunch of classes for about two and half weeks. I started work again.

tonight I added a AutotilePattern method to my new cache class written for Pygame. it creates an auto tile pattern and stores it so that it doesn't need to be redrawn. I also redid all the dialogs to display properly on all platforms. and I fixed the new project dialog to create the project folder instead of requiring that it already exists.
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 />

The Niche

Go Ryex! :D Dammit, I had a cool idea and I can't remember it. Fuck.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Valath

Quote from: Blizzard on February 05, 2011, 05:22:56 am
Seph is an idiot.

Well, yes, sir. You, Kefka and I had come to that agreement.


I was wondering, would creating/customizing new Stats, besides the default 4-6, require the editing of default RTP scripts?
1998, I'll never forget it.

Blizzard

I can't wait until the FF sequel is released where I am the final boss. :V:
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.

Fantasist

February 11, 2011, 03:06:40 pm #213 Last Edit: February 11, 2011, 05:29:34 pm by Fantasist
Quote from: Blizzard on February 06, 2011, 05:16:25 am
It's still a bit weird how it works. I'm used to direct OpenGL/DirectX processing and drawing of polygons so this seemed kind of a performance eater to me.


@Ryex: On that note, why don't you look at pyglet? It's based on OpenGL, and should be a faster. But I guess it's too late for that now, considering you've done a lot already. Still, thought I had to mention it.

EDIT: Just took an hour to read through the entire topic. I see switching to pyglet at this point might not be a good idea, sorry ^_^'

I have an idea to contribute.

Issue Title: Custom Event Commands
Description: Let's say I want to make a door event. I have to do the following:
@> Set Move Route (door): <change sprites to animate event>
@> Set Move Route (player): Move towards the door event (in either of 4 directions)
@> Wait For Move Completion
@> Teleport

Suggestion: If I could group some event commands into "Custom Events", it would make my life easier. In the above case, I would group the first 3 commands into the custom event "Open Door" and the result would be:
@> Custom Event (Open Door)
@> Teleport


Also, it would be great if custom events had customizable number of arguments. Something along the lines of:
Add Parameter... -> Type out name of parameter

Each custom event needs to have a list of parameters. The parameters need not even be drop-down lists or anything complex, just text boxes will do. You will have to find a way to transport these parameters to the event commands contained by the custom command. Something like the $1, $2, etc. in regular expressions.

EDIT 2: Wait, common events already do the grouping thing (thanks SRK for reminding me), but passing parameters qualifies as a new new feature, I guess :shy:
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




The Niche

That sounds like an awesome idea.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Starrodkirby86

That suggestion reminds me of Common Events. Though it probably more functionality than a Common Event would, I would guess. xD

But any macro shortcut idea is always a valuable one. :V

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Fantasist

@SRK: You totally totally pwnd me >.< I'm such an idiot. I guess I'm only good at scripting, huh? Though, common events won't let you add parameters every time, so that would qualify as a new feature. This basically means any script calls required by custom scripts will effectively become event commands.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

That's what variables are for; they can act as parameters for common events.
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.

Ryex

event building macros.... HOLLY!  

they would be like event templates. and the event editor would have an interface to them. oh thats a awesome idea!

as it stands my current idea for an event editor is this.
Spoiler: ShowHide



@Fant  thanks for pointing out that library I didn't even know it existed. but alas, after quite a bit of research I find that there is no working method of getting pyglet to draw inside a wxwindow or even a wxglcontext. there are at least 7 attempts in the mailing lists and it only works truly works on widows. the linux version barely worked. and no attempt at an osx version exists.  true I could use PyOpenGl but it doesn't have the sprite capability of pyglet. If I wanted to I suppose I could learn OpenGl and create my own sprite class. but I really don;t feel like it. a OpenGl version of the map display could be a feature in a latter version easily. the plugin architecture easily allows for it.

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 />

Fantasist

Quote from: Blizzard on February 11, 2011, 06:15:13 pm
That's what variables are for; they can act as parameters for common events.

haha, yeah... *facepalm*

@Ryex: Too bad then. Whatever suits your needs then :) (I wonder how RMXP does it...)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews