RPG Maker PY (RMPY)

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

Previous topic - Next topic

Blizzard

If we make something idiot-proof, evolution will come up with a better idiot.
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 January 22, 2011, 04:37:34 am
If we make something idiot-proof, evolution will come up with a better idiot.

a tested and proven statement
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 />

legacyblade

I agree. The config app proves that :P But it would save a lot of trouble for those of us who try to know what we're doing. Imagine if there was a tons of addons plugin that added stuff to the interface based on which addons you have active. You gotta admit, if that could be pulled off it'd be pretty cool. Not saying this would all happen, just geeking out at the possibilities RMPY offers.

Ryex

woo! I finaly got my mac test env set up and did a quick test of just starting RMPY. it worked!  I have a feeling that creating a standalone app bundle for the mac version of RMPY is going to be hell though
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 />

Ryex

so I got the bright idea in my head that I should probably test and make sure the importing process worked on other platforms than windows. so as a first step I did a few edit to make RMPY load the commands it needed to start the import script from a ini style configuration file. that was simple enough. so I pulled the latest version from git hub into my vm of ubuntu and start up rmpy. first thing I notice is that the different fonts on Ubuntu screwed up my import dialog even though I was useing sizers. oh well it was still use able. I selected the RMXP project folder and hit the ok button and waited. the ruby script runs I can see its output in the debugger because the sdout streams for the two process is merged. just as the process is finishing I get some weird assert fail about a mismatch in ending streams. that upon a quick google search is only liked to python on ubuntu in and hasn't been solved in two years. well I decided that I might as well try NOT useing ruby1.9.1 and instead use ruby 1.8 well for some reason the assert problem went away. only to find another error about an x server resources being temporarily unavailable google reviled that this is because I was trying to update the progress dialog which I had created in another thread. well I solved that problem (sort of). and then found that ruby 1.8 can't convert an empty string to a symbol and 1.9 can. I had been converting strings to symbols so I would only be dumping one copy of the string I had to come up with another way to track strings, a simple task one would think. and indeed it was simple. but the only thing more annoying that discovering that something that works on one platform doesn't on another just because is discovering that your an idiot. I kept getting errors that the symbol record for a previously dumped sting didn't exist and I spent two hours searching through the code to see how the key I had saved to the record could be wrong, only to figure out that that was because the record really didn't exist. you see I had mapped the sting to the object id for the first copy of a string I dumped so that the id could be used to access the symbol record. the thing is I had forgotten to empty the table that did this mapping between dumping objects.
adding one line
@@strings = {}
inside my reset method fixed a problem I had been working two hours on.
after that importing on ubuntu worked. oh the time I wasted.
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

When reading/writing files, there is one rule you should follow: Always use rb, wb and ab modes, never r, w and a. r, w and a are Windows specific that change the stream by because of \r. On other platforms r, w and a actually act like rb, wb and ab while when you specify rb, wb or ab, the b will be ignore on non-Windows platforms. This might have to do with your problem.
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.

nathmatt

January 24, 2011, 07:18:27 pm #186 Last Edit: January 26, 2011, 10:30:17 am by nathmatt
off topic
Spoiler: ShowHide
so since your making this in python i thought it would be nice to try and learn it so maybe to add to it while using it and it actually isn't that hard to figure out im in the midst of making a Config for my Battle Dome Script to learn how to use it.  it doesn't look flashy but it will generate the code so eh


edit is this going to be open source ? if so can i see what you have to learn off of
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


ForeverZer0

Yeah, he posted a link to it in the first post, you may have missed it.

https://github.com/Ryex/RPG-Maker-PY

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Karltheking4

uhh... where do you put the folder and contents...?
[/noob question]

Ryex

if you plan on running it note that you will need all of the following:

python 2.6 (yes this version specifically)
wxpython for python 2.6
pygame for python 2.6 (latest version)
numpy for python 2.6 (latest version)
ruby 1.8 or 1.9

of course when I release a build none of that will be necessary

after you have all that installed just run Main.py no need to place it any ware special just so long as it is all together.

Note that currently all you can do is start a new project and import data from an existing project. no editing of data at all.
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 recommend that you use py2exe for the build as well.
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: Ryex on January 28, 2011, 11:36:56 pm
if you plan on running it note that you will need all of the following:

python 2.6 (yes this version specifically)
wxpython for python 2.6
pygame for python 2.6 (latest version)
numpy for python 2.6 (latest version)
ruby 1.8 or 1.9

of course when I release a build none of that will be necessary

after you have all that installed just run Main.py no need to place it any ware special just so long as it is all together.

Note that currently all you can do is start a new project and import data from an existing project. no editing of data at all.


thats what I meant when I said that I'll use freezing utilities for the various platforms to make stand alone executables. in other words when I release a build all you'll have to do is download and double click the exe
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

Ah, alright. I wasn't sure if you were gonna include all of that in the build manually (because it can be done) or if you would be using py2exe.
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 04, 2011, 01:04:41 am #193 Last Edit: February 05, 2011, 04:19:06 am by Ryex
so I finally got the GDI version of the tile-map working fully that means that the mouse square fallows the mouse around. HOLLY SHIT IT'S SLOW! seriously it takes just shy of a full second to draw a 40, 30 map! a pygame version is going to be necessary if any one is to actually use this thing

oh and when I zoomed in to 2x the map took almost 20 seconds to draw completely

ok that settles it. I was moving the mouse around and watching the cpu usage it jumps to 50% from 2% other wise (I have the map buffered) the GDI blit operations are fing slow!
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

Try to see if there are any hardware supported blit operations. They should work significantly faster. Did you implement your own blit or are you using GDI's already? Try to find an alternative to GDI's. Maybe even try your own.

But wait! How are you drawing the map actually? You are using one big image and blit all tile bitmaps onto it?
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

ya thats basically it a bit map for each layer blit the tiles on to it and then blit them together to from the buffer.

in any case I'm working on making it so pygame is doing the bliting as it is much faster. when it is done GDI with blit only once per redraw and the blit will only be the size of the area the user can see (plus a little on the edges)
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 05, 2011, 04:42:39 am #196 Last Edit: February 05, 2011, 04:45:29 am by Blizzard
Ouch, that's a bad way of doing things. ._. You should rather use the same tilemap system like RMXP does. I don't think they blit the map together in the editor.
Another problem is that big images require large amounts of memory. A 40x30 maps needs 40x30x32x32x4 = 4915200 B (almost 5 MB) of memory per map layer. :/ A 100x100 map needs over 40 MB per map layer. :/ You can still not draw the "sprites" that are outside of the viewing scope in the editor. You can simply check the the upper left sprite that is drawn, use the size of the map editor control together with the size of the tiles to determine how many sprites/tiles can be seen on the screen and then just draw those. That way you don't even have to check each sprite whether it is in the view or 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.

Ryex

February 05, 2011, 04:45:37 am #197 Last Edit: February 05, 2011, 05:33:14 am by Ryex
RMXP dose it different? I found a tile map class by I think serophspawn and it drew the entire map to a plane or sprite (or rather three) and scrolled it around...

EDIT:
in fact thats how Zer0 dose it in his resolution script. he has 5 sprites the size of the map one for each priority layer
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 05, 2011, 05:22:56 am #198 Last Edit: February 05, 2011, 05:25:10 am by Blizzard
Seph is an idiot. ._. And F0 did it wrong. I have seen a very old resolution script that didn't have an altered tilemap. Try that one and see what happens. One the 640x480 area will be visible and all sprites outside of that area are not visible. In fact, RMXP has a limited number of sprites for the screen which simply change tile IDs/bitmaps when you move. As you move around, the tiles will appear and disappear.
You can also try F0's resolution script but remove the tilemap to see what happens.
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

just for reference here is how I'm going to draw the map using pygame.

5 surfaces
3 for the layers (these are the size of the map)(map data is only changed after a brush has been committed)
1 for the brush (the tiles that are purposed to be added to the map data (i'm thinking it will also take into account autotiles)(only as large as necessary)
1 for the mouse square (32 X 32)(drawn at creation never touched again)

the three layers are only redrawn when map data changes and then only the tiles that changed are redrawn
the brush is redrawn when it changes

when it comes time to draw the map to the window pygame creates a surface that is just slightly bigger than the visible area of the screen and blits the visable section of the layers onto it in order modifying transparency and zoom size and drawing a black rectangle with 30% opacity to dim the layers depending on which is active the mouse bitmap is resize to the zoom level and blited last. this surface is converted in to a string and then loaded into a wxpython bitmap this bitmap is then blited to the screen. this will happen on a timer that will be set to 20 times a second.


I honestly can't see why it is a bad Idea to hold the map in memory instead of redrawing 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 />