Sprite Drawing Tools

The Partridge Family were neither partridges nor a family. Discuss.
Walka
Posts: 19
Joined: September 7th, 2014, 3:45 am

Sprite Drawing Tools

Post by Walka » August 25th, 2019, 7:55 pm

This a new project I've been working on. The purpose of this program is to make it easier for you to figure exact screen
positions for drawing sprites, text, shapes etc. Instead of using trial and error, this program will allow you to get the perfect screen
coordinates for all your drawing needs. I recommend reading the Read Me found in the HELP AND READ ME folder before use.
Attachments
Sprite Drawing Tools.zip
(5.43 MiB) Downloaded 10 times

User avatar
chili
Site Admin
Posts: 3841
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Sprite Drawing Tools

Post by chili » August 26th, 2019, 11:52 am

Oh shit, sounds neat.

What is the new project about? :D
Chili

User avatar
krautersuppe
Posts: 75
Joined: September 14th, 2015, 10:58 pm
Location: Istanbul

Re: Sprite Drawing Tools

Post by krautersuppe » August 29th, 2019, 8:08 am

Nice program. There is some sort of assertion fail in debug mode(vector subscript out of range) but release works fine.
I thought it would be useful to use this in combination with s0llys Excel tilemap stuff.
Will try to use this when i finally got enough willpower to proceed with my next game project.
Kraut

Walkabp
Posts: 8
Joined: September 6th, 2019, 6:02 am

Re: Sprite Drawing Tools

Post by Walkabp » September 6th, 2019, 6:05 am

chili wrote:
August 26th, 2019, 11:52 am
Oh shit, sounds neat.

What is the new project about? :D
Chili buddy ole pal long time no talk. I’ve doing a lot of coding but I don’t have internet at home. So I haven’t been active here. I’ve manage to lock myself out my account again. Can’t remember my login info. The project is just a utility allows to mark point or regions where you would want your sprites and then you cann export all the screen coordinates to a text document download and lemme know what you think.

Walkabp
Posts: 8
Joined: September 6th, 2019, 6:02 am

Re: Sprite Drawing Tools

Post by Walkabp » September 6th, 2019, 6:11 am

krautersuppe wrote:
August 29th, 2019, 8:08 am
Nice program. There is some sort of assertion fail in debug mode(vector subscript out of range) but release works fine.
I thought it would be useful to use this in combination with s0llys Excel tilemap stuff.
Will try to use this when i finally got enough willpower to proceed with my next game project.
Thanks bro. I’m just seeing your reply. I compiled it on my machine and got the same error. I’m not really sure why though. I looked up that error and it says basically that I’m trying out elements into a vector with the size 0 but in my initializer list I reserve 17 spaces for it.
Last edited by Walkabp on September 6th, 2019, 6:17 am, edited 1 time in total.

Walkabp
Posts: 8
Joined: September 6th, 2019, 6:02 am

Re: Sprite Drawing Tools

Post by Walkabp » September 6th, 2019, 6:14 am

Chili you think can help solve this issue. If you compile in debug it throws the error vector subscript out of range. I’m only using one vector. It’s declared in tools.h. In my tools constructor I’m reserving 17. The program will run just fine in release.

Walkabp
Posts: 8
Joined: September 6th, 2019, 6:02 am

Re: Sprite Drawing Tools

Post by Walkabp » September 6th, 2019, 6:38 am

ok I found a solution that works though I don’t think it’s the best. Right after my reserve call. I call rects.emplace_back(0,0,0,0); and that fixed the assertion error

albinopapa
Posts: 3801
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Sprite Drawing Tools

Post by albinopapa » September 6th, 2019, 7:26 am

You are reserving, but not resizing.
rects.reserve(NUMRECTS);
All this does is allocates space for NUMRECTS, but the size is still 0. You can use rects.resize(NUMRECTS)

Or, you can call .emplace_back() or .push_back() on all the new elements.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Walkabp
Posts: 8
Joined: September 6th, 2019, 6:02 am

Re: Sprite Drawing Tools

Post by Walkabp » September 6th, 2019, 7:36 am

albinopapa wrote:
September 6th, 2019, 7:26 am
You are reserving, but not resizing.
rects.reserve(NUMRECTS);
All this does is allocates space for NUMRECTS, but the size is still 0. You can use rects.resize(NUMRECTS)

Or, you can call .emplace_back() or .push_back() on all the new elements.
Thanks for the response but I did solve the issue. I explained what I did in the response just before yours.

albinopapa
Posts: 3801
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Sprite Drawing Tools

Post by albinopapa » September 9th, 2019, 6:33 pm

Hope the explanation or reason for your previous usage was in error was helpful at least.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Post Reply