Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Retro Game Fantasy Computer Framework

Author
Message
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 1st Jul 2020 05:55 Edited at: 2nd Jul 2020 00:49
Okay one last dev session before I get to sleep... HUD is in and with this the 4-part mini sample game project is complete.



GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 2nd Jul 2020 00:07 Edited at: 31st Jul 2020 01:46
The Retro Game Sprite Editor is HERE!

It is an AppGameKit project so you can build it on your machine: Windows, MAC or Linux.

NOTE: I made this for my own personal use and am sharing it with the community just in the interest of being helpful.
That being said... USE THIS AT YOUR OWN RISK! Don't blame me for any loss of data or anything else that happens from YOU using it.


Alright with that out of the way...



The Help Screens will provide you with most of the information you need.

Some important bits I will cover here.

The Retro Game Sprite Editor is primarily intended to be used with the Retro Game Fantasy Computer Framework.

Together... these two make up what I call the Retro Game Fantasy Computer System.

The Retro Game Sprite Editor has 10 built-in 24-color palettes. The Retro Game Fantasy Computer has the same 10 built-in palettes.

Every image (each project / sheet contains 256 images) has 24 different flags that can be set. The Flags are numbered 0 to 23.
The Retro Game Fantasy Computer Framework allows you to check those flags and use them for sprite to tile collision checking.

When your mouse is over the sprite grid (i.e. where you draw and edit your images) pressing the arrow keys will shift the image by one pixel in that direction.

When your mouse is over the images grid (the area near the bottom where you click to select the image) pressing left will move to the previous image and pressing right will move to the next image.
So if Image 21 is currently selected, pressing left arrow will select image 20 and pressing right arrow will select image 22. This is a very simple way to test animations.

The Sprite Editor supports 8x8, 16x16 and 32x32 images. The Retro Game Fantasy Computer has 80 8x8 sprites, 32 16x16 sprites and 8 32x32 sprites. It also supports tilemaps using size 8x8, 16x16 or 32x32 tiles.

There are two project files in the media folder: sprites16 and tiles16.
You can load these and use them as a way to help you to learn the Sprite Editor. The images are actually used in one of the sample mini game projects I made for framework yesterday.

NOTE: Out of habit I launched the Classic AppGameKit when I developed this despite also owning Studio. I think the project should load fine unless something major has changed I am not aware of.

Well... that's it. The .zip file is attached. I hope someone finds it useful. Don't expect code perfection. I made this for my own personal use. It actually was a good amount of work especially all of the GUI. The code isn't terrible but it is by no means perfect either.

The Retro Game Fantasy Computer Framework will be coming next. Although it might not be until tomorrow.

UPDATE: SPRITE EDITOR HAS BEEN UPDATED TO FIX SOME BUGS I ENCOUNTERED WHEN WORKING WITH THE WINDOW EXPANDED TO FULL SCREEN... ha ha... I've always used it in normal size so never encountered it til now.

UPDATE 2020-07-15: SPRITE EDITOR HAS BEEN UPDATED to allow copying a section of one image and paste it into another image. Also when saving spritesheet / tilesheets binary files are also now saved as a matter of convenience. I also added a text box where a value from 0 to 255 can be entered as an encryption key. Doing so will perform a very simple encryption on the binary file. If you do this REMEMBER THE VALUE YOU USED! Because you will need this value when loading the binary file in the updated retro game framework.

Press S (for selection) to enter SELECTION COPY mode.
Press the left mouse button then draw a rectangle around the section to copy.
Press S again to actually copy that area (this also exits SELECTION COPY mode).
Click on the image to paste this selection into.
Press B to paste the selection BEHIND the current image.
Press F to paste the selection IN FRONT of the current image.

In practice, it is very simple.
This video shows a small selection being copied and pasted BEHIND another image.
Then the full image is selection copied and pasted BEHIND the other image.
Finally the same selection image is pasted IN FRONT of the other image.

One thing you will notice is it ignores the darkest color.
This is because whichever color has been selected via the RIGHT MOUSE BUTTON (as shown in the color cell with Right beneath it) is treated as transparent.


UPDATE 2020-07-29: SPRITE EDITOR HAS BEEN UPDATED TO FIX A BUG pjsmith67 REPORTED ON OSX. Also updated to increase performance of pixel plotting

Attachments

Login to view attachments
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 2nd Jul 2020 04:46
Wow! I have used Tiled Map Editor for a long time and I never realized until just now it actually lets you create tile animations.

I will have to check that out and see if it something that can be incorporated into the retro game fantasy computer framework.
Animated tiles would be incredibly useful. I was planning on just doing it all in code in my games but if can do it via the GUI in Tiled and can load those in... that'd be very cool I think.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 3rd Jul 2020 22:05 Edited at: 3rd Jul 2020 23:26
Okay, I have went through the RETRO GAME FANTASY COMPUTER FRAMEWORK mini game sample... 4 parts... and added some additional documentation.

I will be releasing the retro game fantasy computer framework along with that game sample today.

Hopefully, someone finds it as useful as I do. For me it is the kind of thing I have always wanted for game development.

It provides a dev environment enforcing some "hard" constraints... enough to keep projects from getting too "out of hand"...

* 24-color palettes
* Limited # of sprites and particles: 80 8x8 sprites, 32 16x16 sprites, 8 32x32 sprites and 136 particles (1x1 sprites)
* Just like basically all 80s machines that had sprites... all of these sprites support normal and double size. So an 8x8 sprite can be scaled to 16x8, 8x16 or 16x16 for example. Even the particles can be set to double size becoming a 2x2 chunky pixel.
* There is no built-in support for loading images beyond spritesheets and tilesheets. For title screens and backgrounds you simply use a tilemap and sprites.
* And the built-in text grids of course. There are 3 of them built-in: One is 8x8 size characters, the second is 16x16 and the third is 32x32.
* Each of these text grids has an option to print the text using shaded characters which has the lower half of each character appear in a darker shade.

On the other hand... the system is designed to not be so limited as the fantasy consoles I have seen and tested.

* There is no hard limit on the size of your program.
* You can have all 120 sprites and 136 particles active at one time.
* You can use one 24-color palette for sprites and use a different 24-color palette for your tiles. In fact, you can even use a different 24-color palette for each sprite size (i.e. a palette for 8x8 sprites, a different palette for 16x16 sprites, and a different palette for 32x32 sprites).
* Instead of only one built-in basic text printing system you have 3 sizes available and a shaded option for each one.
*The framework loads Tiled tile maps and supports up to 4 tile layers (3 for display) and even 1 objects layer.
* Tilemaps are displayed via MapViews. And you can have two completely independent MapViews active at one time.
The constraint is together the total area of the MapViews cannot be greater than the screen. Which shouldn't be much of a limit anyway considering that is all that can be seen. lol
You can for example split the screen with MapViews having one on the top half and another on the bottom for multiplayer games. Or you could even use a small MapView to show inventory and so forth.

Basically this system is all about empowering a developer so their imagination is the real limit. It helps me to think more creatively like we did long ago on older hardware. Constraints can be very powerful to work within.
And for me personally, this RETRO GAME FANTASY COMPUTER SYSTEM (the combo of the RETRO GAME SPRITE EDITOR + this framework) are a perfect balance of constraints and freedom.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 3rd Jul 2020 23:52 Edited at: 5th Jul 2020 03:01
The retro game fantasy computer framework defines these #constants for you...

GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Jul 2020 01:08 Edited at: 16th Jul 2020 01:13
Whew... this was very tedious work... but anyway... finally... here is the

RETRO GAME FANTASY COMPUTER FRAMEWORK API

After loading a Tiled map that contains an Objects layer objects will automatically be processed and stored in one of 6 global object arrays:

objects in the Tiled map that have their type set to interactive are stored in the fciobjects array.
objects in the Tiled map that have their type set to collectible are stored in the fccobjects array.
objects in the Tiled map that have their type set to enemy are stored in the fceobjects array.
objects in the Tiled map that have their type set to zone are stored in the fczobjects array.
objects in the Tiled map that have their type set to trigger are stored in the fctobjects array.
all other objects in the Tiled map are stored in the fcgobjects array and the .category field will be set to whatever the type is set to in the Tiled map for that object.

GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Jul 2020 04:40 Edited at: 6th Jul 2020 04:15
IMORTANT: I made this for my own personal use and am sharing it with the community just in the interest of being helpful.
That being said... USE THIS AT YOUR OWN RISK! Don't blame me for any loss of data or anything else that happens from YOU using it.

The latest zip file is down below... I didn't want to have various versions all over so will update that post to always have the latest version.


Alright with that out of the way...

Here is the RETRO GAME FANTASY COMPUTER FRAMEWORK ALONG WITH MINI GAME SAMPLE #1

There are 4 projects... building a very simple game in 4 steps using the RETRO GAME FANTASY COMPUTER FRAMEWORK

The RETRO GAME FANTASY COMPUTER FRAMEWORK ("fcf.agc") is included in each of those projects.


RGFCFMiniSampleGame1-1


RGFCFMiniSampleGame1-2


RGFCFMiniSampleGame1-3


RGFCFMiniSampleGame1-4



There is also a folder "RetroGameSpriteEditorProjectFiles" that contains the RETRO GAME SPRITE EDITOR project files for the spritesheet and tilesheet.

Again... I am not promising the code is awesome or even that the system is awesome.
I only know that it is awesome for me!

And figured I might as well share it. If someone else wants to use it you are welcome to do so.

I think it might just be possible that you will find it brings back a lot of the joy of game development from the 80s and 90s.

Attachments

Login to view attachments
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 4th Jul 2020 18:48
Just started to play with the samples and noticed something right away... it won't run in AppGameKit Studio, at least not as is.

Got this error: "Vulkan does not support rendering to loaded image, only images created with CreateRenderImage can be used with SetRenderImage in fcf.agc at line 4358"

Easy workaround though... just add '#renderer "Basic"' at the top of your code to use GL instead of Vulkan and then it runs fine.

This was with MiniSampleGame1-4, I have not tried the others yet.

Really impressed with this so far.

Phil
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Jul 2020 18:52 Edited at: 5th Jul 2020 03:07
Okay thanks. I actually made this in AppGameKit Classic. I will have to take a look at it though because I thought I was creating renderimages for everything that is rendered to.

I wonder if using ResizeImage on a renderimage might change the image somehow removing that it is a RenderImage. I will update that section to only resize if needed. I had figured if I passed in the exact same width and height as the image already was it would simply do nothing so no harm in doing it the more straightforward way.

MiniSampleGame1-4 is actually the last part.

It goes in steps...
1-1 just the basics of loading a Tiled map and displaying it, loading a spritesheet for the 16x16 sprites and implementing a player controlled tank that can fire missiles.
1-2 adds enemies and the enemy missiles along with sprite to tile collision detection.
1-3 adds sprite to sprite collisions so the player missiles can hit the enemies and vice versa
1-4 adds a simple HUD using one of the built-in text grids.

EDIT: I have updated that section of code to always delete if already exists and recreate. Normally, I don't like deleting and recreating things because it usually ends up fragmenting memory and / or causing garbage collection to occur sooner or later. BUT I have updated it and maybe that kind of thing just isn't as big of a problem now as it used to be. I suppose resizing would have the same effect too.

THANKS SO MUCH FOR THE FEEDBACK! Always good to get that. I am sure there are some bugs in there. Although I have tested and used it a lot it is pretty involved. And then I made passes to streamline and optimize. Performance should be quite good.
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 4th Jul 2020 19:10
Vulkan is definitely overkill for the types of games this is intended for but OpenGL has been deprecated by Apple and will probably disappear at some point from IOS and OSX.

When, I do not know, and OpenGL is still widely used so I don't think it is going away any time soon.

Just something to think about...

Phil
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Jul 2020 21:16 Edited at: 6th Jul 2020 04:14
I have updated the RETRO GAME FANTASY COMPUTER FRAMEWORK to take care of the issue pjsmith67 ran into above and to correct an issue I found while updating the mini game sample (I still had the hardcoded 8 for tile size in a couple of spots).

The new zip is down below in the post on the new 6 part series.

RGFCFMiniSampleGame1-5 increases the width of the tile map and implements scrolling based on the player's position.
The player bullets and enemy bullets are now positioned "in" the map view. The enemies are not positioned based on the map which creates the illusion the enemies are moving horizontally with the player as the screen scrolls.

RGFCFMiniSampleGame1-5

Attachments

Login to view attachments
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 4th Jul 2020 21:26
Yes, I can confirm now that the example does run under AppGameKit Studio with Vulkan enabled.

Phil
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 5th Jul 2020 04:57 Edited at: 16th Jul 2020 01:17
I have updated the RETRO GAME FANTASY COMPUTER FRAMEWORK to take care of some more issues while working on part 6 of this mini game sample.

The zip file contains all 6 projects (1 for each part in the series) and the framework file has been updated in each of those projects.
The updated tilesheet project containing the trees has been added to the "RetroGameSpriteEditorProjectFiles" folder inside the zip.
Of course, you are free to use the player tank, alien, missiles, ground, mountain, tree for your RETRO GAME FANTASY COMPUTER FRAMEWORK projects.

RGFCFMiniSampleGame1-6 separates the foreground ground and background mountains & sky into different layers.
The foreground is in layer #0.
The mountains & sky are in layer #2.
Trees were added in the middle layer #1.

These layers move at different speeds for a nice parallax fx.


RGFCFMiniSampleGame1-6



Alright... I think everything should be reasonably stable now. And hopefully this 6-part series building up this game is helpful in learning how to use the framework.

I think it is time now for me to actually start using it and then if people are interested in using it I will return with more samples in the future such as that arcade adventure with robots sample. That one is sort of the "granddaddy" example covering it all but it also isn't the best thing to start with. That is why I did this 6 part mini game series.

ENJOY!

EDIT 2020-07-04: Corrected an issue with the enemy missiles... I forgot the enemies are not positioned "through" the MapView so when launching their missiles the map offset needs to be manually added to their position to get the enemy missiles to spawn at the correct spot. That update has been made and is in the zip file.

EDIT 2020-07-05: Corrected another glitch with enemies firing their missiles. The main.agc file in Part 6 has been updated in the attached RGFCSMiniSampleGame1_20200705.zip

EDIT 2020-07-05b: Fixed an issue in the framework fcmin and fcmax functions. The "fcf.agc" framework file has been updated in all 6 projects in the attached RGFCSMiniSampleGame1_20200705b.zip

EDIT 2020-07-15: Fixed an issue where I had been testing and left in a hard-coded value in tilemap drawing forcing 16x6 tile calculations. Implemented a very simple optional encryption on binary files in the Retro Game Sprite Editor and updated the load spritesheet and tilesheet binary functions to have a new key as integer parameter. Pass in -1 if you did not encrypt in sprite editor. Otherwise pass in the value you entered in the encryption box in the RGSE. RGFCSMiniSampleGame1_20200715.zip

Attachments

Login to view attachments
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 6th Jul 2020 01:34 Edited at: 10th Jul 2020 03:38
If anyone uses the framework feel free to post a screenshot of your game in this thread.

There are so many different games that can be made sometimes it is difficult to decide what to make. lol

So... for now I "doodle" and let it unfold naturally.

I thought it might be fun to make a single screen platformer game.
Maybe the main character will be a sneaker or work boot. Or perhaps a coffee cup. Or a rock, blade of grass or bit of lint.
Not sure yet. All depends on the story I want to tell I guess.



UPDATE 2020-07-06
Thinking of a "worker" class shoe. Basically a work boot. There are other boots in the factory. "Bad" boots. Might make a dress shoe for a special enemy like a "boss" lol
The system is all working fine so far so no updates to the framework from this yet.
I simply set FLAG0 on the platform tiles and FLAG0 and FLAG1 on the ladder over platform tiles and FLAG1 over the lower ladder section tiles. FLAG0 is walkable ground. FLAG1 is a ladder.
Actually been very straightforward.


2020-07-07


2020-07-09



GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 10th Jul 2020 23:45 Edited at: 10th Jul 2020 23:47
I updated the Retro Game Sprite Editor...

I needed to have the ability to copy a selection of one sprite image and paste it into another image.

Not just a normal copy & paste but specifically to be able to paste a selection BEHIND another image.
While doing that I also implemented the normal paste functionality to paste a selection IN FRONT of another image.


It works like this... click on the image to copy from.
Press S (for selection) to enter SELECTION COPY mode.
Press the left mouse button then draw a rectangle around the section to copy.
Press S again to actually copy that area (this also exits SELECTION COPY mode).
Click on the image to paste this selection into.
Press B to paste the selection BEHIND the current image.
Press F to paste the selection IN FRONT of the current image.

In practice, it is very simple.
This video shows a small selection being copied and pasted BEHIND another image.
Then the full image is selection copied and pasted BEHIND the other image.
Finally the same selection image is pasted IN FRONT of the other image.

One thing you will notice is it ignores the darkest color.
This is because whichever color has been selected via the RIGHT MOUSE BUTTON (as shown in the color cell with Right beneath it) is treated as transparent.


I will release this update sooner or later. First I want to use it and might just make more updates. Not sure yet.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Jul 2020 16:53 Edited at: 16th Jul 2020 01:03
Thank you Cliff.

I will release the source for the latest version today. I fixed a small glitch I came across (in a completely unrelated area) and I might make a couple other spot updates.

Really, I am just making this stuff for my own personal use BUT I thought if I want this kind of stuff just maybe someone else will find it useful too.

I really like developing with this sprite editor and framework a lot. Just AppGameKit alone is already awesome and adding these on top... it's the perfect combo for me.

EDIT: I planned on releasing the source back 4 days ago but as this is all a hobby to me I just dabbled a bit here and there and off the computer. But I am here now to release it in that post up above.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 16th Jul 2020 01:22 Edited at: 16th Jul 2020 01:26
The RETRO GAME SPRITE EDITOR has been updated and the new .zip file has been uploaded in this post above.
The RETRO GAME FANTASY COMPUTER FRAMEWORK has been updated and the new .zip file has been uploaded to the 6-part sample game series post above.

Unless someone lets me know they are actually using the RETRO GAME SPRITE EDITOR and RETRO GAME FANTASY COMPUTER FRAMEWORK and want to receive the future updates as I make them for my own needs... from this point on I will just be focusing on making games using this system.

I don't mind sharing if people find it useful but no sense in wasting time if I am the only one who finds this stuff useful. LOL!
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 16th Jul 2020 16:05
I want to use it, but my real job keeps getting in the way (how dare they make me work!)

Phil
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 16th Jul 2020 19:08 Edited at: 16th Jul 2020 19:09
pjsmith67 LOL! Yeah jobs can definitely get in the way.

The latest versions I think are in a decent condition. Looking forward to seeing what you come up with when you get a chance.

What I will do is update them here maybe once every 2 weeks or month. I am thinking of making a couple more small samples too. I am just kind of having fun prototyping with it for the most part. Until I get a solid idea that I want to commit to.

Thanks for posting!
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 25th Jul 2020 16:00
Finally have some today to play with this. I will let you know what I find.

Phil
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 25th Jul 2020 16:52 Edited at: 25th Jul 2020 16:54
Sprite editor does not show the bottom row of any sprite.
See the attached image.

Attachments

Login to view attachments
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 27th Jul 2020 23:21 Edited at: 27th Jul 2020 23:24
That's odd. I honestly have no idea what is causing that because as shown in my screenshots and videos it all displays fine for me.

Maybe there are differences with how the graphics, images, renderimages, etc work between the different platforms? I use Windows.

Especially I don't understand why the actual sprite editing area displays fine but both of the others do not. The Sprite Preview box and the actual tilesheet images preview at the bottom both are "off".
The Sprite Preview box looks like it is just 1 pixel row off. But the bottom looks like some kind of corruption.
I always find this stuff so odd when things work perfectly fine on one machine and not on others.
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 28th Jul 2020 01:20
It doesn't save the bottom row either. I've tried it on OSX Mojave and High Sierra.

Phil
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 28th Jul 2020 02:42 Edited at: 28th Jul 2020 02:47
I've been looking at the code trying to think what could be causing it.

Try changing the pixel function that starts on line 2685 from this


to this...


rect is correct there because I had wrote a wrapper around the built-in DrawBox function to make it more straightforward to use.

Maybe DrawLine works differently between Windows and OSX.

If you load in one of the example projects contained in the media folder: just type sprites16, tiles16 or tilestree16 (don't add the .gse to the end) and click the Load button then click on YES. Does it load and correctly display those?
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 28th Jul 2020 03:01
This is what I am seeing now after making those changes.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 28th Jul 2020 03:42 Edited at: 28th Jul 2020 04:02
I don't understand why it's acting so differently.

Do you have AppGameKit Classic that you can also test with?

I am wondering if it is different because of that. I will test it in Studio and see if I reproduce this kind of issue.

....

Interesting, I tested in AGKS and got an error on MakeColor. In AKG it allows specifying the alpha. In AGKS it does not. So I removed the last ,255 on those to get it to compile.

It ran fine. Worked correctly and displayed fine for what I tested. Drawing into different images and loading the sprites16 sample project. I will keep looking and see if I anything jumps out at me but that particular piece should be just drawing a single pixel into the renderimage. If I had an OSX machine so I could reproduce the issue it would help a lot but unfortunately I do not.
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 28th Jul 2020 04:29
Yeah, I agree, its not easy problem when you don't have an OSX machine. I tried this on both classic and studio. I do have windows virtual machine that I can try it on tomorrow just to verify that its an OSX problem.

Phil
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 28th Jul 2020 16:23
The plot thickens... this is what I see on my WIndows VM running under OSX.

GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 28th Jul 2020 19:10 Edited at: 28th Jul 2020 19:12
Thanks for letting me know. I wish I had an idea of it. It definitely looks like there is some kind of problem with it drawing into the renderimage. But I do not know why.

I will have a look at that part and see if I can do it a different way. I really made this for my own personal use and just thought I'd share BUT I am curious as to what the cause is. Figuring it out might help all of us going forward.

I know at one point Blink had tested it and as far as I know encountered no problems.

Blink if you have happen to see this can you test the latest version and see if it still works for you?
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 28th Jul 2020 19:47 Edited at: 31st Jul 2020 01:48
pjsmith67... what happens if you change the CopyImageColorDataToImage() function that begins on line 2476 with the following...


This approach uses membank writing instead of renderimage for the core pixel drawing. It isn't optimized in any way of course because for me I originally just wanted to get this Sprite Editor done to use it so it always redraws the entire image for each point plotted. Since it is just a tool and not a game and did not cause any issues I never focused on optimizing it. Just saying that because I do not know if this will possibly add some delay. I wouldn't think it would be that much different than using drawbox or drawline but possibly.

I'm wondering if using memblock writing for the pixel plotting instead of renderimage will make any difference on your system.
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 28th Jul 2020 19:57
I wouldn't spend a whole lot of time on it since its a personal project. The game engine itself seems to work fine. I do think its something screwy between OSX and AGK.

I'm looking into creating a workaround using Xojo, a cross platform programming language. The problem is going to be duplicating your palette stuff to make it compatible with your engine.

Your engine is really cool which is why I'm willing to go through all this.

Phil
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 29th Jul 2020 03:41
I replaced the CopyImageColorDataToImage() with the code posted above and it worked... sprites are being displayed, loaded and saved correctly.

WOO HOO!

Phil
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 29th Jul 2020 04:21 Edited at: 31st Jul 2020 01:49
Fantastic! I'm glad it worked! Seems that it might be better to use memblock writing than renderimage in some cases.

I made another update to optimize the pixel plotting only updating the actual pixel data needed instead of the entire image as originally.
It also contains the update to remove the last ,255 in the MakeColor calls that was breaking it on AGKS.

The latest source has been attached to the post above.

EDIT 07/30/2020: I updated that new function to delete the memblock. The zip is updated as well as the code snippet above.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Jul 2020 23:35
Just downloaded this for the Lowrez jam.
Just a suggestion, but it might be a good idea to attach the latest version to the first post.
Thanks for the awesome stuff!!
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 1st Aug 2020 05:59
@blink0k that's a good idea.

On the #lowrezjam you will need to update the framework to use it for that one.

That particular jam requires the screen resolution to be 64x64 pixels. The framework supports 256x144 and 160x90.

The Sprite Editor can still come in handy for it though.

I might take a look at adding support for more resolutions that are lower than 160x90.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 1st Aug 2020 06:42 Edited at: 1st Aug 2020 06:43
Actually, the way I designed this framework... it's easy to add support for other resolutions.

I added fcMODE64 which is 64 x 64 resolution and also fcMODE128 which is 128 x 72 resolution.

So there are now 4 modes total:
fcMODE256 256 x 144 resolution
fcMODE160 160 x 90 resolution
fcMODE128 128 x 72 resolution
fcMODE64 64 x 64 resolution

And here is that little platform game with the boots now running in 64x64 resolution.



The updated framework is attached to this post.

I will update the documentation above and the sample projects and move to first post tomorrow.

I was just checking the forum before going to bed and saw your post and after I left I thought... hmm... I bet that will be easy because when I first designed this I had implemented it thinking I might add more modes at some point.

Anyway... enjoy and good luck in the jam!

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Aug 2020 00:10
Awesome. So i assume we'll have an entry from you in the Jam
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 2nd Aug 2020 06:02
Ha! I haven't done any game dev today. Been sleeping and doing a bit of work around the house.

But I've often thought of doing a jam. And this one has 2 weeks left which is a reasonable amount of time.

If I come up with something to make I will indeed enter it. Good idea Blink!

Infiltration, Hotdogs, Life As An NPC sound interesting.

I will let them simmer in the back of my head and sleep on it and see if anything comes to me tomorrow.
pjsmith67
8
Years of Service
User Offline
Joined: 2nd Feb 2016
Location: Nebraska, USA
Posted: 16th Aug 2020 20:56
Ok, so while I have not done a lot (yet) with this framework I have done this... I created my own sprite editor for it. No offense GarBenjamin but AppGameKit is just not well suited IMHO for applications/tools. It just eats up too many CPU cycles and really wears down my Mac battery and I have a one year old Mac Pro. Your sprite editor is very good though so I basically copied most of its functionality using my preferred app development language and added a few things. The only thing it doesn't do, right now is import existing sprite/tile sheets and transform them into one of the current palettes. I may just use your editor for that.

Again, please don't take this the wrong way. This framework is really good. I am considering writing a tile map editor for it. I just like to write my own tools.

Phil

GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 17th Oct 2020 17:39
Hey pjsmith67 no worries at all! I just made this mainly for my use and shared it to be helpful so definitely create your own tools, update the framework itself, etc.

I think your Sprite Editor looks great! Nice work!

Login to post a reply

Server time is: 2024-04-25 03:05:09
Your offset time is: 2024-04-25 03:05:09