Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Basic Eyecatch Framework


Carim123
 Share

Recommended Posts

I've wanted this system for a while, so I've started work on this yesterday, but I'm putting it here today for people to use. If you don't know what an Eyecatch is, I'll use Pokémon HeartGold/SoulSilver as an example. When you enter certain areas, it fades into a graphic that represents the area, in essence giving you an idea of what you're entering. This does that.

* * *

This is completely client side.

Start, by making a new folder in "Client\data files\graphics", and call it "eye".
After that, open your client in VB6, and make a timer on frmMain (Currently somewhat inefficient, I'll make an update that makes use of Tick.) Name the Timer "timCatEnd", set the enabled to False, and set the Interval to 5000\. (Or whatever you like, so long as it's long enough to be visible.)

Now, also on frmMain, make a picturebox, preferably over the picScreen, but make sure it's not within it. Name it "picCat" Make it whatever size. Now, before we enter the code, we need to make some graphics. Because it's an Eyecatch, you want to graphic to correspond to your area, but that can be done after. Just make some blank bmps, and you can edit the graphics after. Name the graphics "1", "2", etc, to the amount of maps you have.

* * *

Now for the code.

To start, inject this into timCatEnd:

```
' Carim's Basic Eyecatch Framework
picCat.Visible = False
timCatEnd.Enabled = False
```
When the Eyecatch ends (In this case, 5 seconds), this makes sure the picture disappears.

Then look for:
```
            ' Check if they can warp to a new map
            If Map.Up > 0 Then
```
After **CanMoveNow = False**, add:
```
' Carim's Basic Eyecatch Framework
                frmMain.picCat.Visible = True
                frmMain.picCat.Picture = LoadPicture(App.Path & "\data files\graphics\eye\" & Player(MyIndex).Map & ".bmp")
                frmMain.timCatEnd.Enabled = True
```
This loads the picture!

Now, do the same for Map.Left, Map.Right, and Map.Down. I shouldn't need to help you here.
Test it out, and you should have a working Eyecatch Framework! Feel free to improve on it on any way, and I don't require any credit. Have fun !

Things to be done: Add checking for files, so it doesn't error; Change it from a timer, to Tick…and that's about it.
Link to comment
Share on other sites

I tried it, I had some spare time.

I like the idea!

But the loading times don't that that long, but sure it's okay if you have a active server and lot's of people playing it. So adding a timer delay would just delay it for no reason, besides the player still can be attacked?

I know that's where the timer is for, but still..

Anyhow I want to tweak it to only be there when there is a need to load it. I'll shear it when I'm done.

-=-=-=-=-=-=-=-=-=-=-=-=-
Edit - I'm done.
-=-=-=-=-=-=-=-=-=-=-=-=-

Ok instead of  looking for this:
```
        ' Check if they can warp to a new map
            If Map.Up > 0 Then
```
And do what Carim did, like adding timer etc.

Do this:

Go to:
```
Public Sub LoadMap(ByVal MapNum As Long)
Dim fileName As String

```
And find:
```
    fileName = App.Path & MAP_PATH & "map" & MapNum & MAP_EXT
    ClearMap
    f = FreeFile

```
Right under that add:
```
frmMain.picCat.Visible = True
          frmMain.picCat.Picture = LoadPicture(App.Path & "\data files\graphics\load\" & "load.bmp")

```
_(And yes, now instead of map 'eye' use: 'load' - also use only one image 'load.bmp')_

Which is just above:
```
Open fileName For Binary As #f
    Get #f, , Map.Name
```
Now add the part to close it when loading is finished:
Find:
```
    For X = 1 To MAX_MAP_NPCS
        Get #f, , Map.Npc(X)
    Next

```
Right after that add:
```
                frmMain.picCat.Visible = False

```
Which should be right above:
```
    Close #f
    ClearTempTile

```
You're done!! :)

- Though, in most cases it will just show up for like… 1ms? :P I'm playing it local host and stuff, but I even tried 100x100 maps and it still didn't take long at all.

**You still must add the Picture box: 'picCat' like told before by Carim.**

~Adr990
Link to comment
Share on other sites

> I like the idea!
>
> But the loading times don't that that long, but sure it's okay if you have a active server and lot's of people playing it. So adding a timer delay would just delay it for no reason, besides the player still can be attacked?

Thanks, and I like how you've added to it. :D

Keep in mind, to anybody who thinks the general eyecatch thing is for loading; this isn't for loading, it's just to establish the scene, pretty much. Although, your idea is good too. Also keep in mind, you don't have to make it over the whole pic-screen, I just made it a small section on the top-left corner. Also, adr990, wouldn't that be better to do that by having a label in the bottom-right corner, saying "Loading…", or something? Just my suggestion. Nice to see a good use out of this. ;D.
Link to comment
Share on other sites

Yea, that's actually a good idea too. :P
I indeed was making it a loading screen, as those 3D games have. But now I see what you wanted to do with it.. that's no bad idea at all!

Hmm, I'll see what I can do with it, I need to rebuild the GUI anyhow as of yet. :)
Link to comment
Share on other sites

Like I said, it's only a framework, and is somewhat inefficient. Besides, I've no idea how to, anyway. xD

Also, another thing, I've got a problem; I can't record it, CamStudio is acting all screwed up for whatever reason. ;[
Link to comment
Share on other sites

let me check if i can find my old code for it, brb xd

```
Sub BltMapImage()
    Dim Ycoor As Long, Xcoor As Long, Image As Long

    Image = Map(GetPlayerMap(MyIndex)).MapImage

    'use these to modify the position of the mapname onscreen
    Xcoor = Int((20.5) * PIC_X / 2) - (Int(250) / 2) + sx
    Ycoor = 30

    If Image = 1 Then
        Rec.top = 0
        Rec.Bottom = 35
    ElseIf Image = 2 Then
        Rec.top = 35
        Rec.Bottom = 70
    ElseIf Image = 3 Then
        Rec.top = 70
        Rec.Bottom = 105
    ElseIf Image = 4 Then
        Rec.top = 105
        Rec.Bottom = 140
    ElseIf Image = 5 Then
        Rec.top = 140
        Rec.Bottom = 175
    ElseIf Image = 6 Then
        Rec.top = 175
        Rec.Bottom = 210
    ElseIf Image = 7 Then
        Rec.top = 210
        Rec.Bottom = 245
    ElseIf Image = 8 Then
        Rec.top = 245
        Rec.Bottom = 280
    Else
        Exit Sub
    End If

    Rec.Left = 0
    Rec.Right = 250

    Call DD_BackBuffer.BltFast(Xcoor, Ycoor, DD_MapName, Rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

End Sub
```
please note this is from Stable, just to give you a idea, you load the mapbannerimage on start, i had multiple in 1 file, so i used those cases to determine which part to blit, then the backbuffer call to show it.

:P

Dami
Link to comment
Share on other sites

@QWERTYUIoP:

> Now, do the same for Map.Left, Map.Right, and Map.Down. I shouldn't need to help you here.
> Test it out, and you should have a working Eyecatch Framework! Feel free to improve on it on any way, and I don't require any credit. Have fun !
>
> Things to be done: Add checking for files, so it doesn't error; Change it from a timer, to Tick…and that's about it.

wouldn't using OR statements be more efficient?
though nice job.
Link to comment
Share on other sites

@Xlithan:

> Can somebody PLEASE post a video so I know what's going on here? lol

@QWERTYUIoP:

> If you don't know what an Eyecatch is, I'll use Pokémon HeartGold/SoulSilver as an example. When you enter certain areas, it fades into a graphic that represents the area, in essence giving you an idea of what you're entering. This does that
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...