Page 1 of 2

Sprite Drawing Tools

Posted: August 25th, 2019, 7:55 pm
by Walka
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.

Re: Sprite Drawing Tools

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

What is the new project about? :D

Re: Sprite Drawing Tools

Posted: August 29th, 2019, 8:08 am
by krautersuppe
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.

Re: Sprite Drawing Tools

Posted: September 6th, 2019, 6:05 am
by Walkabp
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.

Re: Sprite Drawing Tools

Posted: September 6th, 2019, 6:11 am
by Walkabp
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.

Re: Sprite Drawing Tools

Posted: September 6th, 2019, 6:14 am
by Walkabp
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.

Re: Sprite Drawing Tools

Posted: September 6th, 2019, 6:38 am
by Walkabp
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

Re: Sprite Drawing Tools

Posted: September 6th, 2019, 7:26 am
by albinopapa
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.

Re: Sprite Drawing Tools

Posted: September 6th, 2019, 7:36 am
by Walkabp
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.

Re: Sprite Drawing Tools

Posted: September 9th, 2019, 6:33 pm
by albinopapa
Hope the explanation or reason for your previous usage was in error was helpful at least.