Users browsing this thread: 1 Guest(s)
PGE Project - 2D platform game engine
#5
I get's image size when read file into memory and saves it into internal variables. Old engine had pre-defined tile-size for each item-ID [Blocks, BGO's, NPC's on the level, Tiles, Paths, Sceneries, Level entrances - are different types and usually have individual method of working with image]

Level graphics:

Blocks - sizes are equal to size of original image loaded file [when file loads, size values are saving into variables and uses on render and defines physical size of collidable block]. Except is sizable block which have item-object specific size values which giving able to draw same item but with different sizes. The algorithm of render uses divided to 9 pieces image.
BGO's - sizes are equal to size of original image loaded from file. [in the old SMBX engine size values was hardcoded and violating of them on customization will cause cut-off of result image].
NPC's - has individual method of GFX size definition: it may by how pre-defined [height of 1 frame] or may by calculated automatically on initialization from number of frames by special formula.

World map:
Tiles, Sceneries, Paths, Level entrances - like BGO's.

It's about graphics size, but also a lot of things about grid aligning. Blocks, BGO's, Tiles, Sceneries, Paths are aligns relative to left-top corner, but NPC's and level entrances are aligns relative to bottom-center or bottom-center with "half of default grid size" offset.

While I researched old SMBX engine, I made a documentation about internal content here: http://engine.wohlnet.ru/pgewiki/SMBX64 - It's an SMBX64 standard - research document about internal content standard of old SMBX engine.

PGE extends everything which presented in the SMBX and provides new features [and new file formats too].

________________________________
Also, I don't loads everything which presented in config pack: I loads only used on current level.
I.e. if tile of than type is using on current level, it loads as texture. Each tile/item/element has individual texture.

in the editor I loads everything which is not uses OpenGL: everything loads into RAM. If some PC's are slow, the ability to stop animation is presented. [For example, it perfectly works on Pentium 4 with 2.4 Ghz without hurting to performance].
Unlike editor, engine part is "tiny" for CPU/GPU and works quicky and fast [Box2d and OpenGL. By anyway I will replace Box2d with own physical engine because usage of Box2d is not good for my case. But first and hardest thing is a collision detection].

By anyway you have to try out the old SMBX engine which presented here: http://www.supermariobrosx.org/
SMBX 1.3 - is a LAST version of engine which released in 2011'th year and no more updated. SMBX 1.3.0.1 just a COSMETIC work with modifying of EXE file and with fixing of included GFX files, and it still same SMBX 1.3 internally. It uses software graphics and works creepy slow on single-cored CPU based PC's like Intel Pentium 4 or AMD Athlon 64 with 2.4 Hz even under Windows XP.
New PGE Engine uses OpenGL hardware acceleration and works smoothy and quickly. Each level file loads FASTER than in the SMBX. Also stupid Microsoft MCI in the SMBX works too slow [to take playing of music file you should wait some time while file will be loaded, PGE uses SDL and SDL Mixer to play musics and sounds (I also making some mods over SDL Mixer to improve some things in them).
Reply
Thanked by:


Messages In This Thread
RE: PGE Project - 2D platform game engine - by Wohlstand - 03-31-2015, 05:10 PM

Forum Jump: