Mirage Source http://web.miragesource.net/forums/ |
|
Making Sprites 32/64 http://web.miragesource.net/forums/viewtopic.php?f=210&t=45 |
Page 1 of 3 |
Author: | grimsk8ter11 [ Thu Jun 01, 2006 9:12 pm ] |
Post subject: | Making Sprites 32/64 |
Originally posted by Misunderstood This has been updated to work with the new MSE Ok Find the for next loop which calls bltPlayer Code: ' Blit out players For i = 1 To MAX_PLAYERS If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then Call BltPlayer(i) End If Next i Now copy it, we need to make another sub to blt the top of the player, this way it will be above other players bottoms. We need to make a new loop instead of adding just another sub in the first one, because otherwise if there was a player ontop of your player, which was bltted after you in the loop, it will show ontop of your head, and thats not cool. So make it look like this: Code: ' Blit out players top For i = 1 To MAX_PLAYERS If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then Call BltPlayerTop(i) End If Next i (it goes right after the other loop if you hadnt figured that out) Now we need to make the sub. Copy the bltPlayer Sub Paste the bltPlayer Sub right below there Rename it bltPlayerTop Find this if statement in the BltPlayerTop Sub, its something like: Code: If y < 0 then y = 0 With Rec .top = .top + (Y * -1) End With end if Change it to this: Code: y = y - 32 If y < 0 And y > -32 Then With Rec .top = .top - y y = 0 End With End If This blts it 1 tile higher then normal. Now go to the BltPlayer sub Find: Code: .top = GetPlayerSprite(Index) * PIC_Y Make it: Code: .Top = GetPlayerSprite(Index) * PIC_Y + PIC_Y This takes one block down from the top of the sprite Oh yea, in both of the subs, add a * 2 after the getplayersprite(index) in the rec.top line, this make it so each block of 2 is thought of as 1 sprite. you dont really NEED it though. Oh, and for the names... Go to the BltPlayerName sub and find the texty = whatever and change it to: Code: TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset + 28 '(or-4 + pic_y) Or if you want the name to show up above the player(the one there ^ makes it below) make it this: Code: TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 50 '(or-4 - pic_y - pic_y/2)
Now you will probably have to change other things, like for the npcs if you want them like that too. Or whatever. If I missed something in here let me know. |
Author: | Krloz [ Fri Jul 07, 2006 7:39 pm ] |
Post subject: | |
Ok what about if I want some npcs 32*32 and some 96*96 npcs? |
Author: | Rian [ Fri Jul 07, 2006 7:54 pm ] |
Post subject: | |
This cover players only. |
Author: | Misunderstood [ Fri Jul 07, 2006 7:57 pm ] |
Post subject: | |
The hope is that you can see how it is done for players and are able to modify it to work in other scenarios....such as with npcs. |
Author: | Krloz [ Fri Jul 07, 2006 7:58 pm ] |
Post subject: | |
I mean is it possible have to different sizes for npcs? |
Author: | Robin [ Fri Jul 07, 2006 8:00 pm ] |
Post subject: | |
Of course it is. Practically anything is possible! |
Author: | Misunderstood [ Fri Jul 07, 2006 8:03 pm ] |
Post subject: | |
Yes, its not very hard, I think its even in elysium. |
Author: | Rian [ Fri Jul 07, 2006 8:05 pm ] |
Post subject: | |
Completely possible, but would require adding a couple more variables to the NPCs and adding some options to the npc editor |
Author: | Tosuxo [ Fri Jul 07, 2006 8:35 pm ] |
Post subject: | |
woah, sonire, it's not impossible... it just means a menu selection of 64 and so on sizes, and having diff sprite sheets for diff sizes.... |
Author: | Matt [ Fri Jul 07, 2006 8:36 pm ] |
Post subject: | |
Sonire wrote: Completely possible, but would require adding a couple more variables to the NPCs and adding some options to the npc editor
He didn't say impossible. Please, read through it, don't just skim the posts. |
Author: | Tosuxo [ Fri Jul 07, 2006 8:42 pm ] |
Post subject: | |
Advocate wrote: Sonire wrote: Completely possible, but would require adding a couple more variables to the NPCs and adding some options to the npc editor He didn't say impossible. Please, read through it, don't just skim the posts. hey, leave me alone... i'm tipsy!!! i misread it |
Author: | Robin [ Fri Jul 07, 2006 9:12 pm ] |
Post subject: | |
Tosuxo wrote: woah, sonire, it's not impossible... it just means a menu selection of 64 and so on sizes, and having diff sprite sheets for diff sizes....
LoL. If you can do it, I think Sonire can xD |
Author: | Tosuxo [ Fri Jul 07, 2006 9:42 pm ] |
Post subject: | |
Kite wrote: Tosuxo wrote: woah, sonire, it's not impossible... it just means a menu selection of 64 and so on sizes, and having diff sprite sheets for diff sizes.... LoL. If you can do it, I think Sonire can xD i'm tempted to try and finish my player housing tutorial whilst drunk.... *giggles* |
Author: | RyanBlandin [ Sat Oct 14, 2006 10:30 pm ] |
Post subject: | |
Adding the name above the player doesn't work. The name stays on the top tile even when the player is on a lower tile. Nevermind, I just made a stupid mistake >.< |
Author: | Elmrok [ Sun Dec 10, 2006 3:02 pm ] |
Post subject: | |
When i add this, only the top part of my sprites show and the bottom does not. Anyone know why this is like this? |
Author: | Reece [ Sun Dec 10, 2006 3:36 pm ] |
Post subject: | |
Are you using the right sized sprites? Are you using MSE? two possible errors there |
Author: | Matt [ Sun Dec 10, 2006 4:41 pm ] |
Post subject: | |
If you're using sprite number 0, try changing it to 1. |
Author: | Elmrok [ Sun Dec 10, 2006 9:34 pm ] |
Post subject: | |
Ok i got that part working but now only the even number of sprites work. Like, 0 will show it all, but sprite 1 will show the bottom of sprite 0 and the top of sprite 2. Anyone know how to fix this? |
Author: | Rian [ Sun Dec 10, 2006 10:21 pm ] |
Post subject: | |
That's just the way the tut works. It's not like only 50% of your 32x64 NPCs work. They all work, you've just gotta odd numbers only. |
Author: | Elmrok [ Sun Dec 10, 2006 10:48 pm ] |
Post subject: | |
o ok thanks. Thats all i needed. |
Author: | Elmrok [ Tue Dec 12, 2006 2:52 am ] |
Post subject: | |
Ok anyone know how to make the sprite check by 64 instead of 32 on the sprite sheet? Not like it does in the script, where it goes sprit 0, sprite 4, ect. but where u can actually go spite 0, srite 1, sprite 2, ect. Dos anyone know how to make it do this or can tell me what to change to do it? |
Author: | kakashi [ Sun Apr 15, 2007 10:31 pm ] |
Post subject: | |
is this server side or client side? (i came from elysium so i am not as technicly minded as all of you) |
Author: | Misunderstood [ Sun Apr 15, 2007 10:48 pm ] |
Post subject: | |
client side, since the client deals with all of the user interface aspects(although some UI tweaks also need to modify things serverside). This tut is all clientside though |
Author: | Nexarcon [ Sun Apr 15, 2007 10:49 pm ] |
Post subject: | |
kakashi wrote: is this server side or client side? (i came from elysium so i am not as technicly minded as all of you)
Client-side; if it has to do with purely graphics and nothing else it's usually client side |
Author: | kakashi [ Sun Apr 15, 2007 11:05 pm ] |
Post subject: | |
ok now i can implement it and try to find a paperdoll tutorial for it *first some thing to eat then i will implement it i'm thinking pizza LOL* EDIT: what i can't spell so sue me (need a time to sue me try half past never) |
Page 1 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |