EarlyMorning - Progress & Discussion

One suite to code them all. An complete IDE and assembler for all your z80 projects!

Moderators: benryves, kv83

Post Reply
User avatar
blueskies
Calc Wizard
Posts: 553
Joined: Tue 25 Apr, 2006 2:24 pm

Post by blueskies »

oh sorry! I did try it, and it fixed the saving problem. Also, delete works like a charm. I 'hooray' wasn't a very descriptive response.
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

Well it's getting better also in terms of speed but it still lags on my computer :'(.
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

kv, I assume you're using the Bitmap class to hold your image?
If you are, do not use the .Width and .Height properties, for example in a loop. They are extremely slow. Cache them in a Point class (or similar) instead.
Even better, write a class that inherits from Bitmap and override the Width/Height with getters that caches the base.Width/base.Height and use that instead.
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

the slowdown is caused by drawing, which doesn't use the width and heigth values afaik... I'm not sure though, and will check it out for sure :) thnx
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

I assume you're using Bitmap.SetPixel then... Which is, quite understandably, extremely slow (locking a surface, doing bounds checking, calculating where in the bitmap to write, performing the bitdepth conversion, writing, unlocking - for each pixel).

As far as I am aware, VB.NET will not allow unsafe/unmanaged code blocks, though. (As a rough figure, I dropped an image decoder from ~10 seconds for a single image to ~500 images in < 1 second just by switching to unmanaged code).
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

I assume you're using Bitmap.SetPixel then... Which is, quite understandably, extremely slow (locking a surface, doing bounds checking, calculating where in the bitmap to write, performing the bitdepth conversion, writing, unlocking - for each pixel).
No quite. The most slowdown is in the map drawing. I draw the "tile-bitmap" to the "map-bitmap" (buffer), then reload the bitmap in the picturebox.
Image
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

Hey guys. Don't know if anyone is still intrested in this, but i'm working on the next release (0.3.0.0).

This will fix some bugs (for example a very nasty bug when trying to use 8x8 b/w sprites)...

Some of the new features will be:
- Property panel for all resources to change their properties (for now it's only the name you can change)
- Import .bmp's as sprites
- Buildscript wizard
- Build resources through command prompt (handy for external tools like LateNite)
- Masked sprite support for both 1bit and 2bit
- MAU support
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

I am interested in this project :)
Those new features sound very cool.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Im still interested kv83! And i agree with Ben, those new fetures are very handy.

We have not forgotten kv :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
NanoWar
Extreme Poster
Posts: 365
Joined: Fri 17 Dec, 2004 6:39 pm
Location: #$&"%§!
Contact:

Post by NanoWar »

Oh YES! I am definitely interested.
Revolution Software
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

Guys, i'm writing the mask feature atm, and it works fine for 1bit. For 1bit there are two options atm,

The 1st vies you the "normal" spritedata and maskdata:
sprite_data
mask_data
(so two different sprites)
The 2nd gives your interlanced spritedata and maskdata:
sprite_byte, mask_byte, sprite_byte, mask_byte

Now, i'm no prof at grayscale. So i don't know which dataformat is used with grayscale masking. The 1st one of 1bit is the only one I could think of and that one is already implemented (that was easy). However, does someone know of a different grayscale masking format?

Note: I won't test grayscale masking, since I don't have any program which uses it. But it should work alright

Edit: Here is a screenshot of how the masking is done:
Image

The "pink color" indicates which pixels are masked. If I'm right, only "white" pixels can be transparent, right? I mean. It doesn't make sense to have another color transparent... but maybe I'm confused after working so long it :P Please say "yes, you are right. only white can be transparent"

Edit2: Thanks for the support btw. I really appriciate that. It keeps me motivated :)
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Awesome!
Image
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

Just wanted to announce another planend feautre:
Flags for maps :) (For example to indicate "non-walkable" sprites). The feature was also requested by Jim, IIRC. It will support up to 3 flags... hope that is enough!
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

For grayscale masking it really depends on the routine you are using on calc. I just have a mask followed by the sprite data in Smash Bros.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

I actually like the mask to come before, since they need to be appilied first anyway. So the my order is MASK, DARK, LIGHT.

Would it be concievable to have the order of the layers optional?


There is submaps that I always wanted that would be nice. If you look at ducks source for Zelda you can see a good example. He used calc gs to make the tiles and a whole bunch of small maps, then made new black and white large tiles and made the full sized map.
Image
Post Reply