Zelda WIP Log (Visual Basic)

Do you have a technical question that doesn't really fit a specific console? Want some general info on electronics, hacking, making cookies, etc? Here's the place to ask! Go nuts.

Moderator: Moderators

Harshboy
Portablizer
Posts: 3610
Joined: Tue Oct 11, 2005 3:44 pm

Zelda WIP Log (Visual Basic)

Post by Harshboy »

...Previously "Where to Start" UPDATED: April 9, 2007

Image

Hey Everybody. This is a game i am working on for my Computer Programming class. A Game is required to pass the course and being the crazy LoZ fanboy I am, I decided to make a LoZ game. It could turn into a Majora's Mask 2D remake, or just a new adventure, who knows...For our projects, we are aloud all resources for help and code examples as we can find. Anyway, I posted a demo, a work log, and some screenshots. If anyone here wants to help with the game, post here, PM me, or send me an IM :wink: Anyway, that's about it, Peace.

.:DOWNLOAD DEMO HERE:.


UPDATES:

Updated April 9, 2007

Done:

Storyline (Majora's Mask Varient)
Name System (Enter Your name for a Profile)
Maps
Music
Title Screen
Profile Selection Screen
Collision System
In-Game Menu
Link Animation
Battle System (99% Accurate to the LttP System)
HUD (Health, Magic, etc.)
NPC Speech system
Save/Load System


To Do:

More Maps

Screenshots:

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Known Glitches:

1) When you exit, music is still playing. Temp Fix: While playing, hit esc. Click Ok and you will be fine. Sorry for the inconvenience

2) Sticky Trees. Try to avoid coliding with trees or objects. You will sometimes get stuck. I'm looking for a fix.


.:DOWNLOAD DEMO HERE:.
Last edited by Harshboy on Sat Apr 28, 2007 10:12 am, edited 32 times in total.
bicostp
Moderator
Posts: 10491
Joined: Mon Mar 07, 2005 5:47 pm
Steam ID: bicostp
Location: Spamalot
Contact:

Post by bicostp »

A full-blown RPG is pretty ambitious, don't you think? I've been taking VB classes for the past couple terms, and wouldn't attempt that.

I'm kinda-sorta working on a network printer probe tool. Basically it brings up a bubble (like the "Storage device can be safely removed" bubble) in the system tray that tells you if your printer is online or not. So far it tests the connection, calls the bubble, and changes the notify icon's color depending on the printer's status. (Red for offline, green for online.) The only hitch is that it's hardcoded to look for the lab printer. (I haven't really done much with configuration files.)

I believe the test line is something like this:

Code: Select all

My.Computer.network.ping("123.123.123.123", 1000)
Intellisense is great. What version do you have? (I assume vb.NET 2005 Express?)

EDIT: *notices your school is stuck with VB 6*
OUCH! :( Sorry, I haven't had much experience with that old thing. Your school should upgrade to .NET. It's much easier to work with if you're starting from scratch. (Get Express for your home machine.)
Harshboy
Portablizer
Posts: 3610
Joined: Tue Oct 11, 2005 3:44 pm

Post by Harshboy »

I have Express and "aquired" VB 6 yesterday. Anyway, most of the games people made in the past were all RPGs. Now, when i said a Zelda spoof, it doesnt need to be the full thing.

And we need to make a game as a requirement to complete the course. Who knows, maybe I'll stick to a basic "RPG" where you just put a picture in the form and move a pictures (Which is your Character sprite) Doing it that way would allow me to easily rip graphics from Gameboy Zelda games. But even then i'd need a very simple aggro "script" or "module" I suppose i could borrow it from somewhere :P

But still, if you guys could find any good tutorials on RPG Making, that'd be great. The last "game" we made was a Turn based battle system (Just a turned based battle system (no quests, worlds, etc lol) So i guess if i had to, i could atleast do a Final Fantasy spoof....but we all know Zelda is better :wink:
EnterTheHatrix
Portablizer
Posts: 482
Joined: Thu Jul 27, 2006 2:15 am
Location: UK
Contact:

Post by EnterTheHatrix »

My course requires me to learn VB.net 2003, but I'll be using 2005.

I've got to make a game too for an assignment.

I bought two books in game programming in VB.net. There were a lot more in VB6, so you might want to buy a book in it.
gamemasterAS wrote:Solder is also bad for you, says on the spindal that its known to cause cancer in the state of California.
vskid wrote:I'm safe, I live in Utah. :P
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

http://www.markbsplace.net/tutorials/vb ... efault.htm

this is the tutorial i followed to learn most of what i did about VB, its VERY long and detailed, but you can skip parts of it.

it covers using API calls to bitblt graphics in, which is a lot faster. its a tile based game, i supposed it would be that hard to replace the tiles with zelda ones :)

quote: "This tutorial is specifically aimed at fairly new VB programmers who are interested in writing a game, a tile-based RPG game."
Image

"Linux is only free if your time is worthless"
EnterTheHatrix
Portablizer
Posts: 482
Joined: Thu Jul 27, 2006 2:15 am
Location: UK
Contact:

Post by EnterTheHatrix »

Sweet... I'll take a look at this aswell..
gamemasterAS wrote:Solder is also bad for you, says on the spindal that its known to cause cancer in the state of California.
vskid wrote:I'm safe, I live in Utah. :P
Harshboy
Portablizer
Posts: 3610
Joined: Tue Oct 11, 2005 3:44 pm

Post by Harshboy »

I've actually read some of that guide the other day. Its very good. Anyway, thanks for the help so far. Any other recommendations?

And honestly, the only things to really change in that guide would be that instead of making it:

Code: Select all

Sub MoveCharacter(ByVal MX As Integer, ByVal MY As Integer)
    ' this procedure moves the character
    ' MX, MY are the mouse x,y when the map(form)was clicked
    
    ' step 1, calculate map offset from the mouse x,y
    ' since we know all the squares are 50x50 pixels, calculate the actual
    ' X,Y on the form
    ClickedMapX% = Int(MX / 50) + DisplayXOffset%
    ClickedMapY% = Int(MY / 50) + DisplayYOffset%
    
    ' step 2 - since the hero only moves 1 square at a time, calculate
    ' the adjacient square to the hero
    DirText$ = "The hero walks"
    If ClickedMapY% > Char.Y Then DY% = 1: DirText$ = DirText$ + " south"
    If ClickedMapY% < Char.Y Then DY% = -1: DirText$ = DirText$ + " north"
    If ClickedMapX% > Char.X Then DX% = 1: DirText$ = DirText$ + " east"
    If ClickedMapX% < Char.X Then DX% = -1: DirText$ = DirText$ + " west"
    
    ' step 3 - check to see if its a legal move
    LegalMove = True
    If Char.X + DX% < 1 Or Char.X + DX% > 100 Then LegalMove = False    'cant go off the map
    If Char.Y + DY% < 1 Or Char.Y + DY% > 100 Then LegalMove = False    'cant go off the map
    If LegalMove = True Then    ' only check if inside map otherwise may crash
        ' check to see if the desired square is blocked
        If Map(Char.X + DX%, Char.Y + DY%, Char.MapNo).Blocked = True Then LegalMove = False
        ' check to see if there is a monster on that square,
        ' if there is then call the Attack routine and exit so the hero doesn't attack ALL
        ' monsters in a square and doesn't actually move
        For X% = 1 To Universe.TotMonsters
            If Monster(X%).X = Char.X + DX% And Monster(X%).Y = Char.Y + DY% And Monster(X%).StrMax > 0 Then
                Call Attack(1, X%)  ' 1=hero attacking, X% = monster number being attacked
                Exit Sub
            End If
        Next X%
      
    End If
    
    ' step 4 - if its a legal move, erase the character
    ' by drawing the ground where the hero is
    If LegalMove = True Then
        Call DrawASquare(Char.X, Char.Y, 1, Map(Char.X, Char.Y, Char.MapNo).icon)
        ' now draw an object if it was in that square
        For X% = 1 To Universe.TotObjects
            If Item(X%).X = Char.X And Item(X%).Y = Char.Y Then Call DrawASquare(Item(X%).X, Item(X%).Y, 1, Item(X%).icon)
        Next X%
        ' now draw a Monster if it was in that square
        For X% = 1 To Universe.TotMonsters
            If Monster(X%).X = Char.X And Monster(X%).Y = Char.Y And Monster(X%).StrMax > 0 Then Call DrawASquare(Monster(X%).X, Monster(X%).Y, 2, Monster(X%).icon)
        Next X%
        
        ' step 5 - update the heros location
        Char.X = Char.X + DX%
        Char.Y = Char.Y + DY%
        Call DisplayMessage(DirText$)    ' display action in text window

        ' step 6 - check to see if hero went off the screen
        NeedToRedraw% = False 'set flag
        If Char.X - DisplayXOffset% < 1 Then NeedToRedraw% = True
        If Char.Y - DisplayYOffset% < 1 Then NeedToRedraw% = True
        If Char.X - DisplayXOffset% >= NoOfXSqrCanSee% - 1 Then NeedToRedraw% = True
        If Char.Y - DisplayYOffset% >= NoOfYSqrCanSee% - 1 Then NeedToRedraw% = True
        
        ' step 7 - draw either just hero or whole screen
        If NeedToRedraw% = True Then
            Call DrawMap    'draw whole map
        Else
          Call DrawASquare(Char.X, Char.Y, 3, 0)    ' just draw hero
          Form1.Refresh
        End If
        
        Call HeroWalkedOnSquare     ' check to see if something happened when walked on square
    End If
End Sub
You would need to make the ClickedMapY/X code associated with WASD or the Directional buttons on the keyboard. Now of course it's not as simple as it sounds (or is it?) I have no idea, seeing as all the code we've done in and out of class deals with the user Clicking with the mouse. All i know is that to really get the Directional pad working, you'd need to edit Chapter 10 a bit.

Doing the HUD will not be too hard, and since this project has already got a working Monster Overworld Battle "System/Module" working, it'd be only a few hours of work to edit it into a basic Zelda Sword battle.

Anyway, I'm learning more everyday. Getting away from those silly Dragon Fight applications for once sure feels great :lol:



EDIT: I got a Zelda style game working right now. All i really need now is to make the HUD and add Variables and code for HP and eventually Magic tracking. Well, off I go. Guides still will help me. You can never learn too much :wink:
Sparkfist
Forum Administrator
Posts: 6754
Joined: Tue Apr 20, 2004 7:12 am
Location: Michigan

Post by Sparkfist »

This doesn't sound right, but I loath VB. First in order for me to even use it in the context it's meant I had to throw all my programming terminology out the window. That's not to say I can't, or better yet I'm not learning how to use it better, but it's just... it's makes Access look not that bad, and I htink Access is the worst DB program.

If you want a book to help you learn, I'm using "Programming in Visual Basic .NET", though don't buy it from a college campus, my copy cost $100.
vskid wrote:Nerd = likes school, does all their homework, dies if they don't get 100% on every assignment
Geek = likes technology, dies if the power goes out and his UPS dies too

I am a geek.
Nucklez
Posts: 118
Joined: Tue Sep 26, 2006 2:50 pm
Location: US
Contact:

Post by Nucklez »

Wow, that is cool. I've never even thought of attempting to write a game in VB. It really isn't robust enough in my opinion. It works great in a corporate environment where reports, and tons of gui apps have to be made very fast on the fly. Good luck with that game, and I bet you'll like C++ much better for writing games if they teach that in your class later on.
Image
Harshboy
Portablizer
Posts: 3610
Joined: Tue Oct 11, 2005 3:44 pm

Post by Harshboy »

We dont have any C or C++ courses at our school. I need to take:

Computer Programming (Which is all VB 6) <----Taking now as a Freshmen
Java Programming (Taking next year, its my #1 Elective)
AP Computer Programming (No idea, guessing its Java or VB)


Anyway, I have really only been looking for Zelda tiles. Its real hard to find them. If you guys would like to help, Please look for Legend of Zelda: A link to the Past Tilesets for RM2K(3) or basicly any tiles that are either 16x16 or 32x32 squares (32x32 are nicer since i wont need to resize) If anyone out there feels like helping that'd be cool. So if anyone else out there needs to make a game in Vb for a class, I'd be glad to help/get help :P

And yes, VB isnt the greatest language to program in. My Teacher admits the truth and said how Java was great for Games (Within Reason) Anyway, Peace.

EDIT: Here is the basic look so far:

Image

A Cookie who can find something or someone who shouldn't be there :wink:
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

Ive never had training in C++, but java is just C with objects... I think its the same thing pretty well.
Image

"Linux is only free if your time is worthless"
vskid
Senior Member
Posts: 6314
Joined: Fri Mar 25, 2005 8:25 am
Steam ID: vskid3

Post by vskid »

Harshboy wrote:EDIT: Here is the basic look so far:

Image

A Cookie who can find something or someone who shouldn't be there :wink:
Monkey, top right.
Image
EnterTheHatrix
Portablizer
Posts: 482
Joined: Thu Jul 27, 2006 2:15 am
Location: UK
Contact:

Post by EnterTheHatrix »

Mines going to be 4 swords graphics at around 64 x 64 if I can manage it.
gamemasterAS wrote:Solder is also bad for you, says on the spindal that its known to cause cancer in the state of California.
vskid wrote:I'm safe, I live in Utah. :P
Harshboy
Portablizer
Posts: 3610
Joined: Tue Oct 11, 2005 3:44 pm

Post by Harshboy »

Unless your making the tiles, they will look very blurry and distorted. Seeing as you will need to take most tiles and x4 them. Some will only need x2
EnterTheHatrix
Portablizer
Posts: 482
Joined: Thu Jul 27, 2006 2:15 am
Location: UK
Contact:

Post by EnterTheHatrix »

Actually I'm forcing a resolution of 800 x 600 or even 640 x 480 to play it.

That way I wont need to.
gamemasterAS wrote:Solder is also bad for you, says on the spindal that its known to cause cancer in the state of California.
vskid wrote:I'm safe, I live in Utah. :P
Post Reply