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 / ShapeUp By Baxslash Resurrected

Author
Message
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 20th Sep 2020 00:45
UPDATE:

I implemented the above idea. Now the data for the sprite shapes is exported to individual files according to the file image used for the spirte creation. Still one can create multiple sprites for each image, as in the map of Japan only one image is required as a template to create the sprite shapes for all the prefectures, each prefecture being an individual sprite. With this implemented the user can go back to the start screen with the "Restart" button and choose whether to work on a new image or carry on working on a previous one.

Also each file name has an interactive thumbnail that the user can click on with LMB to select the image to work on or input the image number into the edit box that is always in focus, no need to click on it.



A possible scroll function might be required in the case the user wants to keep more than 8 or so images in the input folder (the folder inside the media folder of the project where at present the images are kept).

Have a good night.
????????
Virtual Nomad
Moderator
15
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th Sep 2020 01:38 Edited at: 20th Sep 2020 03:48
accidental posts deleted, as requested.

meanwhile, you should probably consider giving this project a name of its own where, at this point, its only "based on ShapeUp by Baxslash". IE, anyone looking for the original, here or on youtube, is not going to end up where they might have hoped to.

otherwise, looking good, lupo. and, i KNOW that song from ~the middle of your last vid. what's the name again? is it an NHK Blends cover? add: my best guess, so far?

keep up the good work. and, when are we going to get to play with it?
[My Itch.io Home] [#LowRezJamAGK2020]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 20th Sep 2020 15:52 Edited at: 20th Sep 2020 15:53
Thank you Virtual Nomad.

About the name for the project, I'll private message you.

That song in the middle is a cover of a Chinese song. The link to the cover https://www.youtube.com/watch?v=IxM1tjTvFAc and the original https://www.youtube.com/watch?v=LJms1CGHjn8. I didn't hear the original until you enquired about it, I really like it. BTW, how do you add URL links like you do to not see the URL, but words like you put a link under the words "-the middle" or "best guess", how do you do that?

As for publishing this upgraded version, would you like me to present it in a partially finished state? If I was to do that, I would need to clean up the code and make sure everything is working fine in the present state.

Thank you for the support and take care.

PS I really like that song by DIO you shared, my kind of taste.
????????
blink0k
Moderator
8
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Sep 2020 21:20
MadBit's File Explorer will allow you to use Open/Save file/folder dialogs
The whole file explorer thing you will have to make yourself using the GetFileFile/GetNextFile or OpenrawFolder/GetRawFolderFileName functions
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 21st Sep 2020 01:48
Hi Blink0k,

Thank you! Your help is much appreciated!

The GetFirstFile/GetNextFile, I have already used in this tool that Baxlash has used to search for an image file, so I learnt a bit about how the SetFolder works, cause I had problems with it originally. With a bit of playing around, I see how this works now.

BTW how do I install this plugin?
????????
Virtual Nomad
Moderator
15
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 21st Sep 2020 05:36 Edited at: 21st Sep 2020 06:38
Quote: "how do you add URL links...without the URL"

you've basically done it already. just type in the word or words that you want to name the Link, select the word(s) with the mouse cursor & hit the Link button to enter the URL.

So, all of this:
[href=https://youtu.be/OKcuPnkG-mM] THIS [/href]

becomes:
THIS

meanwhile,
Quote: "would you like me to present it in a partially finished state?"

no, no. if you have something you'd like to share, do so when you're comfortable with sharing.

i mainly just want to feel what it's like to operate within. and, perhaps, put it to the test/try to break it for you

finally, don't worry about re-naming it. it's only my opinion that it deserves its own title, if/whenever you might think so, too.
[My Itch.io Home] [#LowRezJamAGK2020]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]
blink0k
Moderator
8
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Sep 2020 21:49
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 22nd Sep 2020 00:00
Virtual Nomad, thank you for the explanation.

As for presenting the creation in the present state, it is still not ready. I am the sort of person that builds the house first and finishes it before inviting guests to use it. Originally, I did not intend to do so much changes to the tool, however on this wonderful Baxslash code adventure, I have learnt so much from him and was inspired personally and others as yourself and blink0k to expand this tool beyond what I originally intended it to do and as I am progressing with upgrading, I keep coming up with more ideas to implement. To tell you honestly, I have no idea when these ideas will come to an end, however I do plan to get it to the state that:

1) Start screen will be full interactive with scrolling in the case required.

2) An option to browse for a file that might be else where on the system.

3) Fully functional Edit feature, that as of now is fully functional.

4) Fully functional delete feature, that previously was a right mess that would cause the program to crash. I have managed to fix that issue, so that now you can delete whatever shape of whatever sprite or whatever image the user is working on, all is updated to the database and array system and exported to the relative file for the image concerned. However, at present the delete feature can crew up the box shapes, meaning in the case one wants to delete a polygon shape that will get replaced with a box shape, then the result box shape will be screwed, because I need to update the array responsible for the tool that created the shape, otherwise the box shape will export as a standard polygon shape, which doesn't calculate nor creates a box shape, but a strange polygon shape. To fix that will be simple.

5) Fully functional export feature that at present is fully functional for polygon and box shapes, but does not export chain shapes. To implement the export of chain shapes will be a simple task also in comparison to exporting box shapes that require two different methods of exporting depending on whether the user edits a box shape with points 1 or 4 OR 2 or 3. Originally the box shapes export was according to points 1 and 4, meaning the x1,y1 and x2,y2. In order to adjust the size of the box shapes with any of the 4 points that make up the box, such implementation in the export had to be made.

6) The scale and offset thing. That is an important one. Basically, in the original ShapeUp tool Baxslash implemented the offset and scale to all exported shapes code to the file. For the purpose to better know what is going on whilst working on the upgrading of this tool, it was better to get rid of the offset and scale and set the offset to 0,0 always and scale was not part of the equation at all. This 0,0 offset and no scale factor works perfect for big images like the map of Japan, however for the tiny sprites that many people might be working on for their games, for 2D RPG tiles and features in such games or platformers, the images are as small as 32x32 and to try to create specific polygon shapes for such small images and then try to use the edit feature on them, doesn't work well in my epxerience and I was editing points and adding points to that bird image that is about 120x120 and it created problems as the ranges were so small for all sides that it was difficult to place a precise point on some of the sides without the adjacent or opposite side intefering with the process. The scale factor and altered offset will play a crucial role for images smaller than a certain size that would make difficult such polygon shapes creation and especially editing of such shapes. At present I am working on the logic for the scale factor to be applied to images that are smaller than a specified limit and especially on adding this factor to the export feature that basically divides the export into two separate modes, one for sprites of small images and one for spirtes of large images.

7) I want to add to the edit feature the delete point capability, which ought to be much easier than the add point implementation, just a reverse of the process without all the calculations for the new point location and that.

Until now, that is the bare minimum I want this tool to be able to deliver. On the journey towards that, I know not of what other ideas I might be enlightened with to further improve the tool, however I do not intend this to be a never ending story. Other than the above mentioned points to be realized, the remaining works would just be more of a more cosmetic nature and overall graphical look to the entire tool, rather than any further improvements. It is good to leave room for another person to further improve this to another level altogether in the case one would require more of such a tool.

As for the name for the upgraded ShapeUp tool, I agree with you to give it a new name with reference to the original in the actual code and a README.txt file to explain the history of the tool and it's original author and name with a folder added to the actual project folder contatining all the files and code of the original ShapeUp tool by Baxslash, so as to give the opportunity for others to compare and learn from both and even recreate the entire thing in a different way, in the case one would want to address the problems in a different fassion for the purpose of a learning experience and perhaps for the purpose of creating something even better. I would reason to call this upgraded version not from an artist's approach, but more from an engineer's approach in practical terms of it's functionality, , something of the sort "Sprite Shapes Creation Tool For AGK" or "AGK Sprite Shapes Creation Tool", in order for anyone searching for such a tool, the problem being Sprite Shapes for AppGameKit, that would be an obvious result to one's search.

As for the time to complete all this, I dare not to announce it as it would probably stress me out and lead to prolong the progress instead to meet the deadline. I am the sort of person, that if I would tell you, I will get it done in a month's time, I would probably stress about the deadline to the extent to make mistakes and lead to finish it in two months, and on the other hand without giving a deadline, I could potentially finish it in half of the time. To complete the basic functionallity this will not take much long to accomplish. The final touches to the overall visual appearance and cleaning of the code and adding rem statements, that would be the longer part to finishing this off.

blink0k, thank you. I will study this when I will get to the point to implement that browser part. Actually to implement that might be problematic for me at first, cause this will be the first time I would use a plugin in AppGameKit, so please be patient my friends.

Have a good night.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 23rd Sep 2020 20:17 Edited at: 23rd Sep 2020 20:20
UPDATE:

Whilst working on the delete feature I encountered another problem. Here is a scenario.

Let's say I have created 47 sprites for my prefectures, each sprite having dozen or so shapes.

If I delete let's say 3 shapes from each sprite, the shapes are updated, however what happens when I delete all shapes of one sprite, let's say sprite#=33?

Then the st hits the fan as despite the data for sprite# 33 does not exist any longer, the sprite is still created according to the export code and messes up everything as it is part of the for loop in the export subroutine.

I could have checked for if sprite shapes exist in the database to account for that, however I decided to make it more organised by resorting the database and arrays to get rid off the extra sprite, rather than to do a patch up job, so that now it works fine so far.

All this resorting of the sprites in order for the tool to function propely after deleting all shapes of a given sprite in an image, brought me to reason to make the sprite shapes being added to be created only for one sprite being the image rather than according to the spriteID variable, however after reasoning about this strategy I came to the conclusion that it would mess up the entire individual sprite shape creation process and would create a problem, as new sprites always start with the command SetSpriteShape command that is coded to delete all previous shapes before reloading the database and array data from the file , so will not work well. I could modify this to make it work with such a system, but it is better to make it work as it is meant to work in the actual target application than suit it to work in the tool and then fail to work in the actual application/software/game/whatever, same applies for resorting the sprite# after deleting all shapes of a given sprite. I share this for educational purpose for anyone that can comprehend and to just to share my various reason processes, sometimes stupid and illogical TBH with you.

Have a good evening/night.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 24th Sep 2020 21:06
UPDATE:

I have just been working on the Start screen, changing it a bit, cause previously the thumbnails were kinda small, so I made them bigger with no file name displayed unless the user points with the pointer to the thumbnail of a file image. Now the user can put a maximum of 24 image files in the input folder. For practicality I will leave it so and will attempt to implement the browser plugin thing. I have left the input edit box, despite it is really no longer required, I mean if the user has no mouse to input, then the user cannot use the tool to begin with, so might in the end get rid of the edit box all together, unless the user wants to use the keyboard as the mouse, not fun.

Have a good night/evening.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 25th Sep 2020 00:26
UPDATE:

Alright, so the plugin is installed. Now, I begin to understand what Blink0k meant by saying
Quote: "The whole file explorer thing you will have to make yourself using the GetFileFile/GetNextFile or OpenrawFolder/GetRawFolderFileName functions"


Give me some time to figure this out.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 26th Sep 2020 22:45 Edited at: 27th Sep 2020 03:24
UPDATE:

I have been working on this explorer implementation. I started with something that you could start from the base drive, however after playing around with it for a bit, there are just too many folders involved in some folders and would require to basically more work to make them all visual on the screen. I reasoned the best approach would be just to start with the working directory using the handy command from MadBit's plugin GetWorkingDirectory. To be honest, so far that is the only command I used from the plugin to get this explorer working. It is a very basic, DOS style explorer and will start with the main AppGameKit folder in the Documents, so in the case a person wants to work on an image, it would have to be in one of the project folders in the X:\Users\xxxx\Documents\AGK Projects folder. As there can be a lot of images in a folder then to display them would mean more work. I will probably add another feature to the Start Screen that would let the user choose a folder which can have up to 24 images, so in the case a person wants to work on multiple images, multiple folders can be created in the tools media input folder. In the future, I might continue on making a more advanced explorer as a separate project, but not as part of this project as it would involve too much work and in two weeks time my university course starts, so I will be even more busy other than work itself and I need to come back to progress on my own project also, which I have made some progress, especially with data for the map. Still I have been having such a wonderful learning process on this project, that at present it is still my coding priority.

Apart from that, I implemented the delete point feature, obviously not without difficulties, but now it works really good and only for polygon shapes (chain shapes will folllow), but not for box shapes for obvious reasons, despite there are benefits of turning a box shape into a triangle that with polygon shapes is harder to achieve.

Have a good evening/night.

EDIT:

I just came up with a cool little scroll feature for the explorer to be used with the print function, so kinda solves the problem of not seeing beyond a certain number of folders/files. At the moment it is just displaying folders. A display files in folder button would be appropriate to toggle between viewing folders/files, makes the choosing of the files then much simpler and clearer. With a single thumbnail to generate for each image file, would be very handy especially with a lot of image files with names such as 1-100, for my project it is like so, everything is just a number at the database level.

EDIT2:

Did you know that with the SELECT/CASE command you can go case negative? This is really good, which means, that I can set the explorer start at the X:\Users\xxxx\Documents\AGK Projects folder, but for whoever wishes to explore anything under or on other drives, they can go back. It seems I am making this explorer as originally intended, but it still will be very basic/DOS like, I guess some people would love to see this.
????????
MadBit
Valued Member
Gold Codemaster
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 27th Sep 2020 10:27
Hi,
I have not followed the whole thread. But I noticed that you are using my FileExplorer plugin - I am glad to see that.
I wanted to ask if there is a reason not to use the ChooseFileDialog to select single files/images.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 28th Sep 2020 09:36
Guten Morgen MadBit,

I am glad you write to me about this. This is my first attempt at making any form of explorer, so as for the list of commands provided in your plugin, I don't even know what some of them do nor how to use them. If you can send me some code on how to use that what you suggested, that would be great!
????????
MadBit
Valued Member
Gold Codemaster
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 28th Sep 2020 11:05
This will open a file selector with two filters - (only png files and all image files with the extension png, bmp and jpg).
The 1 enables multi file selection.
With SetInitialDir you enter a path where the dialog will be opened.



folder$ you will find your selected files all separated with '|' (Pipe). the first entry is always the directory where the files were selected.

Ich hoffe das hilft dir weiter
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 28th Sep 2020 15:14
Dankeschön!

I will play around with it and hopefully make it work. Is it OK to PM in case I will need further assitance with this?
????????
MadBit
Valued Member
Gold Codemaster
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 28th Sep 2020 19:57
I have nothing against it. So feel free.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 28th Sep 2020 20:08
MadBit, you are a genius! This is so simple, but what about my DOS explorer, I had so much fun making it? This was too easy for programming. I will surely resort to using your plugin more in the future.That is what I call, MADE IN DEUTSCHLAND. Really good work. Danke.
????????
MadBit
Valued Member
Gold Codemaster
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 28th Sep 2020 21:09
Thank you, I am happy to see more of your project.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 28th Sep 2020 21:22 Edited at: 28th Sep 2020 21:45
UPDATE:

The superfast browser is kinda implemented. Whilst playing with this, I discovered something interesting, probably nothing new to the veterans, but for anybody that doesn't know about this, here it is.

Using the command OpenToWrite(1,Tfile$) in the case Tfile$ = "Folder/File.txt", it will create in the directory both the folder with the name "Folder" and the File with the name "File.txt" (In the case both the folder and file do not exist on the first place).

That is actaully a pretty cool function, cause for this tool, this can prove very handy to separate multiple images with the same file name, such is the case with everything in my project, where all file names are just numbers. The best way in my opinion to organize this, is to make Tfile$ = to anything from AppGameKit Projects root directory in the Documents folder. For anyone wanting to use an altrenative directory for his/her projects, I would probably end up using MadBit's wonderful command ChooseFolderDialog for the user to specify an alternative working directory, for your image files, which will mean more work on the export to account for such a possibility. Might probably end up creating a separate database for the strings of the root directories with all the sub folders leading to the file, that would be read first from a file to check is such exists and then automatically set up the root directory according to the file selected where ever. My brain is fried this evening, so cannot reason how to do this right now, but it will get done somehow.

Have a Gute Nacht/Evening.

PS MadBit, in the case required, will do brother. Danke!
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 30th Sep 2020 00:43 Edited at: 30th Sep 2020 01:07
UPDATE:

So far, the explorer works that you can choose whatever file from "whatever" location and it will generate a simple directory string going back and starting with AppGameKit Projects all the way to the file name, that then is used to create the data file for the image being worked on, so that upon switching between files, when you open that one, it will load up the shapes from the previous session in the case such took place and was stored. This works fine for all images in any folder that is rooted in the AppGameKit Projects folder and it doesn't matter where that folder is, as long as it has the name "AGK Projects" folder, it will work fine. To make this work outside this rule, it would still need to be inside a project folder that has a media folder, then it would go according to the project folder name of the given project. This tool will not be designed to work on images that are not inside a folder of an AppGameKit project or in the tool's media/input folder. Kinda make sense, as it is designed to make shapes for images to be used as sprites in an AppGameKit project, hence the whole point to make it work on the images where they are meant to be in the project, so as not to have the need to move them to the tool's media/input folder to work on them. For this, I must say, this explorer feature is superior over working on images in the tool's media/input folder, cause as long as the images remain in their respective project folders with no changes in name both to the folders and file name, so will the data for the shapes be updated accordingly. I will still leave that media/input Start Screen selection thumbnail thing for anyone who would wish to work on an image outside a project folder, and as a souvenir, cause it looks pretty nice visually (the tool will be provided with few images in the media/input folder to account for that, so it is not empty at start), rather than just a single button to launch the browser, that would be a kinda depressing Start Screen in my opinion.

Have a good night.

EDIT:

Probably the next best thing would be to actually export the data for the shapes directly to the target project folder, ideally where the image file, so that the image file is accompanied by a data file with the same name, but a different suffix. The tool's own shapes data files will still be generated in the AGKApps hidden folder, and would remain as the core data files the tool will be using to produce the shapes for the various images. To export this data directly into the target project, would make the work progress accelerated, so that the user doesn't have to move any files any where, it is all there with the image file ready to use.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 3rd Oct 2020 21:38 Edited at: 3rd Oct 2020 23:54
UPDATE:

Now the explorer works for all images regardless the location. The only difference is that images from actual AppGameKit project folders are better organized, whereas an image else where produces an entire litany of folders going all the way to the root directory drive, minus the drive, this could be good in fact, in the case one would want to work on images in the Users default Pictures folder, then all images worked on in that folder will be added to the data files in that folder in the AGKApps hidden tool folder.

By the way, apart form my schedule getting busier, I also need to move out from my current accomodation by the end of the month, therefore this might affect also the progress works on this tool in this period. Plus I have more overtime coming up this week and need to work Saturdays also at present, so extra busy. Please be patient.

Have a good night.

EDIT:

The data for the sprite shapes now also exports to the original location of the image file, as long as the image was chosen with the explorer, not via the Start Screen thumbnail selection from the tool's media/input folder.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 4th Oct 2020 17:26
UPDATE:

1) Export for Chain shapes now works.

2) Edit for Chain shapes now works, the user can input/delete points of chain shapes. Delete works until total points=2.

The overall tool is now working with all export working. The next step is to implement the scale factor for small images.

Have a good day/evening.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 8th Oct 2020 20:44
UPDATE:

Working on the Scale factor for small shapes and the positioning of the shapes in the centre of the screen. This will require time for testing to make sure everything works well in the target application/project.

Have a good night.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 9th Oct 2020 21:50
UPDATE:

So this is a little bit tricky and thanks to the English way of teaching mathematics it caused some head banging, thanks to the need to put a decimal after a whole number for it to be able to calculate a decimal. Seriously? This is not just programming in AppGameKit, but also in Chemistry at university. In the case this is something essential for programming, that would be a different matter, but I have seen this sort of thing in the educational system itself, hence I don't understand the logic, can I not tell the difference between 7 and 7.0 or are they the same? Not a big deal, but in all my AppGameKit adventure, this one is surely a trip back to the past when after doing a mathematics mock test in the English secondary school, the teacher called me to the side, she actually took me to another room and told me, if I do it this way, on the exam it will be marked as incorrect, despite the logic was correct and the answer was the same in the case I would use that specific method to solve the same problem. To cut the story short, in attempting to make this scale thing work, I was "correcting" the already correct logic, not realizing that the problem was in the lack of .0 after the number, so that AppGameKit understands, that I mean 4.0 and not 4. Logic? Even dividing 10/4 and rounding to the nearest number will give you an answer of 3, because you always round up from 0.5, not down. Hence my lack of understanding of the logic in the mathematical sence of logic. Correct me in the case I am wrong.

Apart from the little adventure with .0, it begins to work more or less. I still need to understand better how this thing with the offset and scaling works, so it will take me some time to figure out completely and make this work. I reason that in the tool the scale factor has to be applied to the image that has been scaled, but in the target application this cannot be so and so far the target application coordinates for the shapes work, but not for the tool. I find this part of the works the most difficult out of all the previous, so please be patient. I need to understand this fully, so that in my actual project I don't need to solve such problems anymore, I will just know how. Once this part is complete, then the tool is pretty much finished. I have already cleaned up much of the code. Then the last part will be my own personal testing and hopefully by Christmas it will be ready. I'm just kidding, I hope to finish it before Game Guru MAX gets complete the beta stage.

Have a good night.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 12th Oct 2020 21:09 Edited at: 12th Oct 2020 21:17
UPDATE:

The tools scale thing works now, so that small images are up-scaled and put in the center of the screen, the scale factor being inversely proportional to the image size. Not sure how this works, but will do testing at the end to determine the best scale factors for the image dimension ranges. Large images are simply placed at position 0,0.

Also, I might be implementing edit for set sprite offset point, so that the user can specify the offset point with 9 default possible according to keypad directions and a custom buttom to set it where ever. I noticed that once you set the sprite shapes, changing the offset alters the sprite shapes locations, hence if the user makes shapes with offset 0,0 as it is at present and actually wants central offset, then this will not work at present, so will need to allow the user to choose the offset prior to the making of the shapes.

Have a good night/evening.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 23rd Oct 2020 23:51
UPDATE:

With all that is going on, I did not progress with the works at present. I also wanted to take a brake from the code to have a fresh look at it later. Once I have fully moved to the new cave, which will be next week, I will continue with the works.

Have a good night.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 29th Oct 2020 00:18
UPDATE:

Until works are complete, in the case you want to use the working version of ShapeUp by Baxslash for the time being, please see the beginning of this thread for the update and explanation or download it here.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 10th Nov 2020 22:32
UPDATE:

I have already moved to the new cave. I am still busy with work in general and study is pilling up with uni, so I need to balance the various things in the time provided.

Just to let you know, Paxi our brother, shall be assisting me to finalize the works on SuperShapeUp, the name we have came up with for this upgraded version. He will be helping me to test it in various ways and make it so that it is optimal for the user to use, so the final works on this upgrade works will be joined forces between Paxi and myself. From the depths of my heart どうもありがとうございました!

This might take time until Christmas, but I will update our progress accordingly.

Thank you for all your patience with these works.

Have a good night all.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 13th Nov 2020 22:00
UPDATE:

So this evening was the first time I played with this code for the past two weeks or so. The good news is that I was able to create shapes for a scaled image in SSU and then export the data to target application with original scaling and it worked. That was the part I had most problem with, so I thought. This test was just for polygon shapes of upscaled small images in SSU. I need to update the export code to account for all shapes and for non-scaled images. Also due to these changes and playing with the sprite offset, the edit feature doesn't work as it supposed to be, so after making export work for all shapes and image sizes, I will focus on the offset feature that will further change the export code. With Paxi's help we will decide in the end what is the most appropriate and user friendly way for the user to load sprite shapes created in SSU into their games/applications without much confusion and complication. As of now, the data file exported into the sprite image target forlder works very well. No need to move files, any updated shapes in SSU update the shapes data file in target application. It might be good to use a separate file for loading the sprite shapes and all data with it for images etc. so that the loading of sprite shapes data from SSU generated file can be separate from the main code file of the user. That is the plan.

Have a good night.
????????
george++
AGK Tool Maker
13
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 17th Nov 2020 19:30
@Lupo4mica37: Nice music on the last video!
baxslash
Valued Member
Bronze Codemaster
14
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Nov 2020 18:14
Awesome to see my stuff being worked on, great work Lupo!
If you want any help hit me up
Using AppGameKit V2 Tier 1
janbo
12
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Nov 2020 15:54 Edited at: 22nd Nov 2020 15:58
The Editor makes it easier to create collision shapes but an algorithm that creates the shape by itself could make it much faster to get the desired shape.
Im talking about generating the shape using marching squares (maybe you can use custom flood fill) to create a detailed line contour of the image and then run the Douglas–Peucker algorithm over it.

The Marching Square algorithm is there to create a detailed outline of your sprite which will have too many vertices/points at first.
The Douglas–Peucker algorithm then takes the result with the aim to produce a similar shape but with less vertices by keeping the most prominent vertices between two points
You want to refine it afterwards with your Editor

Marching Square


Douglas–Peucker
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 27th Nov 2020 23:21
@george++ Life without music is like cells without oxygen. Music or rather vibration sets the rythym of life from the fundamental level to the level that your ears and brain can register.

@janbo Thank you for your input, it is much valued. I will look into it. From personal experience no artificial intelligence can match the possibilities of infinite human intelligence. I will need to study what you have shared with me before I can properly give feedback, so please be patient brother.

@baxslash The master himself has returned! Greeting to you my friend! I have learned so much from you and without your solid foundation I would not be able to progress with upgrading your work. It is truly a wonderful learning experience. I really love how you use simplictity and mathematics to solve problems. I got sucked into your code to such an extent that I had to temporarily abandon my own project to upgrade this wonderful tool you have made for us. I fear to ask you for advice, cause you might change everything all together and then I will be lost completely. I am just kidding, kinda. I would need to advise from you about certain aspects of the finilization of the project, especially concerning aspect, virtual resolution, device resolution, scale and offset point. These are the things I still need to understand in AppGameKit, but please be patient, I need to get to the point to ask you the right questions and I am super busy with work and study and trying to get more sleep.

UPDATE:

I have worked on the scale factor thing and changed a lot of the export and LoadSprite code including the edit mode code and I messed it up even before running it. After having a break from upgrading this tool, I saw that a lot of the code could be optimized and reduced in lines, however trying to do that on the export, I did not realize that the way I changed the export can be for scaled images or non-scaled images, whether that is ideal, probably not, but it works. Trying to optimize it, I realized, that the laws of the scaled images are not the same as the non-scaled, hence I had to reverse all the changes back to how it was. I am sure someone can optimize it more, but for now, I need to focus on optimizing the basics. I am busy with work Mon-Sat and study is really a lot to study, so please do not expect any date to finish this, just be patient. Paxi has been an amazing help, his suggestions already are drifting the completion these progress works in yet another direction will which require more work, but it is worth the time and patience. We want to complete this properly, not rush something to give you an uncomplete work. I am sure that once it is done, you will find ways to improve this, and I do intend to upgrade this on the long term, as I love this little tool, it really has much potential for upgrade. So the story will not end once we complete the initial stage, but we want this to be a solid initial stage complete.

Baxslash, once again 本当に心からどうもありがとうございました!

Have a good night dear friends.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 27th Nov 2020 23:36
UPDATE2:

@janbo I see where you are getting at. It makes sense, like create a rough outline first and then perfect the rest, or something a long that line. I would say, before we can go to that stage we need the basics to work properly. I will need to study the videos first properly, but I can understand better what you are communicating, but that is more advanced progress. Thank you.
????????
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 1st Dec 2020 00:12 Edited at: 1st Dec 2020 00:15
UPDATE:

I have been working on implementing the offset feature. It got confusing with the scaled images placed in the centre of the screen and then exporting to two different files, one for the tool, the other for the target application. So far, the offset feature works fine in the tool for both large images and scaled images. The edit feature works only for large images, cause I left it simple to just test the basics, especially with the edit feature I had a lot of adventure/nightmares. The basics work fine with large images, now need to add the scaled images edit export/load code, which ought to be the same as the actual permanent file sprite shape export/load code. It is taking time to get back into this code with the limited time, but slowly progressing. The offset feature at present is according to the keypad directions with 5, being centre. I created virtual buttons, but will add the ability to use actual keypad keys to determine the sprite offset from the top left = 7 to bottom right = 3. Zero will be for custom offset, but will need to work on that one, so one can visually place the offset on the sprite image. There are also 2 edit boxes to input sprite offset, not sure whether they will remain in the end, maybe a sliding bar instead or/and +/- buttons when using place custom offset mode, to fine tune the custom offset point. Before working on the custom feature for the offset point placing, I will make sure the offset point basics work in the target application, cause at present I have not tested it. There are plans to make the scaling factor dynamic, as Paxi suggested, cause at present it is just image width and height ranges that determine the scale factor of images smaller than 1000 x 1000. It would be more efficient with a dynamic system and much more precise at scaling, inversely proportional, the smaller the image, the bigger the scale factor. Thank you Paxi for your help and advice, it is much valued!

Have a good evening/night.
????????
baxslash
Valued Member
Bronze Codemaster
14
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Dec 2020 16:34
No pressure or anything Lupo, just ask if you want help as I have a LOT of interest and experience in AGK. I still use it for proof of concept work professionally. Anything I can help with just ask! Sending you my email.
Using AppGameKit V2 Tier 1
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 20th Jan 2021 21:06
QUICK UPDATE:

Happy New Year to everyone and Merry Christmas, despite Christmas has passed, despite it feels it hasn't even arrived.

I haven't got much time to write ATM, so I will be very brief. Currently I am busy on a super important Project for which I have about 2 months to accomplish. The study is another factor, so I am like flat out. For this I need to pause the upgrade works. I will pop in every now and then, so that this thread doesn't get locked. Be patient, we have centuries ahead of us.

Good night/day to all.

To Baxslash: Thank you very much dear brother.
????????
Virtual Nomad
Moderator
15
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 21st Jan 2021 03:04
Quote: "so that this thread doesn't get locked"

the author of a thread that gets locked due to 90 days of inactivity can unlock it themselves.
[My Itch.io Home] [Now Playing]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 10th Mar 2021 21:00
UPDATE:

Thank you Virtual Nomad for the info, much appreciated as always.

I have been super busy with study lately, a lot of exams in a short period, however I have been coding a lot these days. Basically, for quiet some time during my studies, I had the need for a tool to aid with the study and recently I began to work on a tool for that purpose and it is shaping up pretty good. Also, I noticed how my coding has changed since before, it became more organised and efficient. I still need to learn to use functions more properly and began to slowly implement them whilst working on this tool for the study. I can see ahead how the experience of working on this tool for my studies will further help the progress works on the sprite shape tool, I'm pretty sure I am going to change quiet a bit of the code to make it more organised and efficient.

Hope you all are good and healthy.

Blessings to you all.

Have a good night/day.
????????

Login to post a reply

Server time is: 2021-04-10 22:30:59
Your offset time is: 2021-04-10 22:30:59