Mirage Source
http://miragesource.net/forums/

[Feature] Display Sprite on Character Creation
http://miragesource.net/forums/viewtopic.php?f=183&t=4324
Page 1 of 68

Author:  Lea [ Mon Sep 15, 2008 12:42 pm ]
Post subject:  [Feature] Display Sprite on Character Creation

Here's the tutorial in PDF format.
http://www.valkoria.com/CharCreateSpriteTutorial_LeaRae_MSE3_50.pdf

Author:  DarkC [ Mon Sep 15, 2008 12:51 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Awesome tutorial, I got it working on my MS4. Thanks.

Also, I'm trying to get it to animate itself and, trying to get it so when I press, the up arrow(or any other) it turns that way. Any idea how I could start doing that?

Author:  Matt [ Mon Sep 15, 2008 12:51 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

For those of you who don't have Adobe Reader on your computer and don't want it (I hate the damn thing. -_-) you can use this link:

http://view.samurajdata.se/psview.php?i ... &size=full

It still works as a pdf, but it's in html format. Still no copy paste. :D

Author:  Lea [ Mon Sep 15, 2008 12:58 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

To make it so an arrow key changed the direction the sprite was facing

Search for the arrow key to be pressed in Form_Keypresses
When that arrow key is pressed, change the src rectangle to grab the right frame
call picSprite_Paint() to redraw

Author:  JokeofWeek [ Mon Sep 15, 2008 8:27 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Love the way you did this :) Awesome idea to actually teach the tutorial instead of doing it straight copy & paste. Good job :)

Author:  Hikaru [ Wed Oct 08, 2008 6:32 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Great tut Lea, Are any more of these in the works? I can't go back to copy and paste becuase, well, becuase I never learn anything.

Author:  Stomach Pulser [ Wed Oct 08, 2008 9:41 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Nice tut, and

FoxIt Reader is better than Adobe... IMHO

Author:  Lea [ Wed Oct 08, 2008 9:57 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Hikaru wrote:
Great tut Lea, Are any more of these in the works? I can't go back to copy and paste becuase, well, becuase I never learn anything.

Put in a request for something, or IM me...

If it interests me, or it's something that's bitched about often (wrongly, as in this case)
I may feel motivated enouhg to do a tutorial


... instead of work on Merrimint :D

Author:  Dane [ Sun Oct 26, 2008 2:18 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Can somebody post this in here instead of pdf -.-

Author:  Mattyw [ Sun Oct 26, 2008 2:45 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Night wrote:
Can somebody post this in here instead of pdf -.-


No.

Author:  Lea [ Sun Oct 26, 2008 6:38 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Mattyw wrote:
Night wrote:
Can somebody post this in here instead of pdf -.-


No.

Author:  Blodyavenger [ Mon Dec 22, 2008 10:26 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

PDF doesn't exist anymore?

Author:  Lea [ Mon Dec 22, 2008 6:14 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

my server's down for maintenance. Relax and I'll get it back up when I feel like it :D

Author:  Blodyavenger [ Mon Dec 22, 2008 7:18 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Thanks for reply. Worry not and take your time, meanwhile, I'll try to do something on my own

Author:  Matt [ Mon Dec 22, 2008 8:06 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Pass me the PDF Lea, I'll host it for now.

Author:  Blodyavenger [ Fri Dec 26, 2008 6:43 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Indeed, that's great tutorial. Not that I just made "Display character" in creation screen BUT I've learned some things as well just because tutorial is not 100% copy paste. Thanks!

However, there is one thing I want to point out for others.
Code:
Call DD_SpriteSurf.BltToDC(picSprite.hdc, src, dest)

that is not working, at least not in MS4.

Instead of that you have to put in this:
Code:
Call DDS_Sprite.BltToDC(picSprite.hdc, src, dest)

Author:  Lea [ Fri Dec 26, 2008 7:04 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Thanks for the update, they must have changed that surface name in one of the revisions.

Author:  Blodyavenger [ Fri Dec 26, 2008 11:18 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

No worries...

I have another problem, or is it bug maybe? I'm not so sure.

Well, everything works perfectly, I login, create new char and logout to main menu.
I log-in to another account (without leaving game) and try to create new char.
When I click to create new char I get RTE "91": " Object variable or With block variable not set"
(that happens always when you try to create new char when you log-in at least two times in one runtime.

and VB points at:

Private Sub picSprite_Paint()
Call DDS_Sprite.BltToDC(picSprite.hdc, src, dest)
End Sub


I tried to unload picture box and few others but I can't figure anything...sorry if I'm silly but I simply can't figure anything out

Author:  Matt [ Fri Dec 26, 2008 11:22 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

I don't think the buffer is being cleared or something. I'm not 100% sure.

Author:  Lea [ Sat Dec 27, 2008 4:48 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Mouse over the three arguements to the call, and let me know which one is goofing up. Is it the picture box? the hDC of the picturebox?

Author:  Blodyavenger [ Sun Dec 28, 2008 9:59 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

I mouse-overed three arguments and only on picSprite.Hdc showed "picSprite.Hdc = 33624106"

I'm not sure if that's what are you asking for, so let me know if that's not that

Author:  GIAKEN [ Sun Dec 28, 2008 10:13 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

DDS_Sprite isn't initialized.

Author:  Blodyavenger [ Sun Dec 28, 2008 10:53 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Sorry but...where should I intialize that and how :oops:

Author:  Lea [ Sun Dec 28, 2008 11:50 pm ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

What's probably happening is this:

When you log out to main menu, the directdraw surfaces are being killed
when you go back into the sprite create screen, it's trying to pull from a surface that was just killed.

Edit the log out code so it doesn't kill the DD surfaces, and make sure the surfaces are killed when the game exits instead

Author:  GIAKEN [ Mon Dec 29, 2008 12:41 am ]
Post subject:  Re: [Feature] Display Sprite on Character Creation

Look in Sub DestroyTCP and remove the call to DestroyDirectDraw...

Page 1 of 68 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/