Working on a basic RPG--TAKE A LOOK

Teric
11-08-2001, 12:59 PM
Whoooo, boy! I am so excited about this one. I have spent a great deal of my time over the last week or so putting this together.

Ok, what does it do? First of all, it will generate a random maze in the background. The maze generation was difficult enough! Secondly, it puts the player somewhere in that maze, and lets him explore.

Use the following keys:

Up Arrow: Move North
Down Arrow: Move South
Left Arrow: Move West
Right Arrow: Move East
ESC Key: Exit the program

One of the things I am MOST excited about in this game is the line-of-sight calculations. If you ever played the old Ultima series (Ultima I-V), you will remember that when you walked around places, obstacles would obstruct your view of things behind them. In order to see things, you had to move around the obstacle.

In much the same way, this game implements a line-of-sight functionality, which will darken any areas of the map that cannot directly be seen by the player.

This is the beginning of my RPG that I'm putting together. Please take a look at the program, and let me know what you think!

KKong
11-08-2001, 03:27 PM
Hi Teric,

that is really good, how long did it take you to code all of that??

Kong.

Teric
11-08-2001, 03:36 PM
I've been working on that for about a week now. The maze generation took about half of the time, and the line-of-sight functionality took the other half.

Teric
11-09-2001, 03:31 PM
Ok, I've updated it a bit. Now you can actually see your character walking around in the maze. I've started implementing the graphics for the character, weapons, and armor. I've set up this version to randomly choose a weapon and shield, and show them wielded by the character as you walk around the maze.

I'm having a lot of fun with this! I welcome any suggestions/comments/complaints.

wild wolf
11-09-2001, 10:00 PM
i saw ur game, its good, do u mind i give a suggestion? when the user presses keys, instead of moving the screen, move the guy and when he reaches like say some pixels away from the end of the screen, then only the screen should move, what do u say?

Teric
11-10-2001, 08:19 AM
I understand what you're getting at, wolf. However, that would defeat some of the basic premise of the game--I want the player to be able to "see" a certain distance around his character. If the screen did not move until the character was, say, one or two tiles away from the edge, then visibility would be severely limited in the direction that the character was moving.

On the other hand, maybe I could move the screen just until the character came to the edge of the maze. Once the character got within 3 or 4 tiles of the edge of the maze, I could have the character move instead of the screen. Then, once the character moved away from the edge of the maze, I could set it to move the screen again.

Not a bad idea, wolf. Thanks!

wild wolf
11-10-2001, 11:09 AM
i think that will be a great idea, anyway do u have Macromedia Director 8 installed? if u have check this out, iam attaching a source file, its something like what u r doing, its made using Lingo programming, iam attaching it for u ref, maybe u could get some help from there

BillSoo
11-10-2001, 10:17 PM
Slight bug....

If I press and hold down an arrow key, the character does not move. But when I release the key, he moves instantaneously a large number of tiles.

wild wolf
11-11-2001, 03:38 AM
yeah i noticed that too and also the user has to keep on pressing and realeasing the key to move, i think it will be a good idea to move the character continously while the key is pressed

Teric
11-11-2001, 02:12 PM
Yes, BillSoo, I noticed that myself. The reason that happens is because the re-compute/re-draw process takes slightly longer than the pace at which a held-down key repeats. Thus, before the re-draw process is complete, the keydown event is already triggered again, leading to another re-computer/re-draw process before the first one is complete. That's why it doesn't show up until you release the key and allow the program to catch up with all of the re-drawing that's going on.

I plan to fix that by using an input loop and regulating just how fast the key input can take place. Thanks for bringing that up!

Teric
11-11-2001, 02:13 PM
Wolf, I'm sorry, I don't have Macromedia Director 8 installed. I can't look at your attachment.

Teric
11-14-2001, 07:50 AM
Here's a new update for my RPG. Now, there are random monsters that wander around in the maze. You can't attack them, and they can't attack you, but you can see them moving around.

Moreover, I have drawn a lot of the armor and weapons graphics. You will be able to see what your character is wearing/wielding. When you start this version of the program, it randomly chooses a weapon, helmet, breastplate, arm gear, and shield for your character. Hit the space bar if you want to randomly select different equipment. This way you can cycle through what I have created and see what the possibilities are.

OH--By the way, I fixed the bug where if you hold down an arrow key the character doesn't seem to move until you release the key. Now, if you hold down an arrow key, the character will continue to move in that direction until you release the key.

Enjoy!

ChiefRedBull
11-14-2001, 11:55 AM
I'm deeply impressed Teric. Some nice code.....

Suggestion though: Have you ever played Diablo? Well basically, you start off with a black screen - then once you pass through an area it lights up. Anything thats not in the line of sight is dim, but just about viewable.
I found that after eploring one of your mazes I got lost pretty quickly. A better mapping system is needed.

Keep it up !! images/icons/wink.gif

Chief

Teric
11-29-2001, 02:21 PM
Another update, folks. Here are the changes I have made:

1. Stairs down are now usable. You can go down to the next floor of the maze, down to level 40.

2. Mapping has been improved. Now the mini-map in the upper right corner will show all tiles you have seen, not just the ones you have stepped on. Also, stairs up and stairs down now show up as yellow/blue dots on the mini-map.

3. Basic item/inventory interface complete. On the bottom right, I have placed a scrollable inventory list. This list shows all of the items currently in the character's possession. Above that, there are equipment slots where you can place items to equip them on your character. Simply drag an item from the inventory list to the equipment slot, and your character will equip the item.

4. Some items have been created. Basic weapons and shields are now available.

Enjoy!

dcl3500
11-30-2001, 02:17 PM
Looking pretty cool Teric! I look forward to your continuing updates. images/icons/smile.gif

edit/ Oh I guess I should mention I ran it on a P4 1.7Ghz w/256Mb of Ram and with this setup I didn't experience the slowdowns JDYoder did. Gonna hate it when I have to take this computer to the office to be used for boring business apps images/icons/wink.gif /edit

JDYoder
12-01-2001, 11:23 AM
Good stuff! Here's some feedback since you asked. :)

I would think changing all your ScaleModes from Twips to Pixels would make it MUCH easier for you to code and maintain down the road, and make the program faster. (Maybe someone else can comment if I'm correct or all wet).

Another thing, on my P-400, the drawing of the mini-mapping is making the game SUPER slow. If you want to draw it the way you are currently, I'd think using PSet with Pixels will improvement performance greater, since Twips are forcing you to draw a "line block."

Also, rather than continually updating the mini-map, maybe only update when the char moves? Or just the area around him? Or both? Of course, if you're planning on making the map somehow dynamic (meaning it can change while the char is doing nothing) my ideas won't work. But something needs to change there since it's killing game performance.

Again, great stuff! Keep it up!

ChiefRedBull
12-02-2001, 10:26 AM
Try using the <font color=red>SetPixel</font color=red> API instead of Object.PSet()

JDYoder
12-02-2001, 12:57 PM
Whoops! That's what I meant to say. My bad -- thx Chief.

wild wolf
12-02-2001, 09:44 PM
yeah ur right JDYoder on the pixels and twip, i was using twip at first in my game and there seemed to be some jerk in the game, but then i changed everything to pixels and it was very smooth

wild wolf
12-02-2001, 09:58 PM
hey looks really cool, id love to help u finish such a wonderful game. here is my feedback.

i realised one more thing, i really like the idea and design of ur weapon selection, but if u notice, when i use a weapon (spacebar), the weapon disappears, both from the hand of the character as well as the details on the side.

Yeah the second thing, the map is too small to be noticed, at first i was looking for it, din know it was in the corner.

problem: i tried converting everything to pixels, but once i change them, the game does not load normal, is it a problem with my pc or something else?

wild wolf
12-02-2001, 10:02 PM
oh yeah i got the reason why once i change the pixels the game does not load normal, i forgot to change some stuff where u define

'Set up the Twips per pixel globals
TPPX = Screen.TwipsPerPixelX
TPPY = Screen.TwipsPerPixelY

Teric
12-03-2001, 08:24 AM
Tell me, wolf--when you switched everything over to pixels, did that make a difference in performance?

Teric
12-03-2001, 09:33 AM
Wolf--I just went through and converted everything to pixels. While it doesn't result in a significant performance boost, it does eliminate the need to deal with twips vs. pixels. Thanks for the suggestion.

JDYoder--I took your suggestion and converted the DrawMiniMap function to use SetPixel instead of drawing lines and boxes. Boy, did that make a difference!! My program runs much faster now. Thanks!

Teric
12-10-2001, 10:55 AM
Another small update. I have put in some more graphics for inventory. Now you should be able to see/use all helmets, breastplates, shields, and weapons. I have also increased the size of the inventory window so that it's easier to use.

ChiefRedBull
12-10-2001, 01:18 PM
Sweet - I've notioced it runs a bit faster too. Done some optimisation?

One suggestion: the viewing area needs to be even bigger, its a bit too small at the moment.... perhaps three or four tiles larger?

Teric
12-10-2001, 03:57 PM
Yes, per JDYoder's suggestion, I changed the mini-map function to use SetPixel instead of the native line box function. That really sped things up.

Bigger viewing area? Can do, Chief. I can add a tile or two no problem. Actually, it's just one of the global variables I have in my General module--I think it's called ViewRadius. Currently, it's set to 4, which means you can see 4 tiles in any direction. You can increase that to 5 or 6, and it will increase the viewable area on the map.

Squirm
12-10-2001, 05:12 PM
Hey there Teric, its coming along real great. Can I suggest something? The only thing that bugged me about this as I walked around is the way that non-visible tiles get covered with this grey square thing again. I really cool idea, I think it was mentioned above, would be to have the tiles that have never been visited yet kept grey/black but those that have been seen merely go darker/lighter in colour, not turn completely invisible. Of course, you would not be able to see enemies or objects on these hidden squares. Just an idea, other than that, way cool keep up the good work.

images/icons/smile.gif

Teric
12-11-2001, 08:06 AM
Interesting idea, Squirm. I'll look into it...

Teric
12-11-2001, 08:50 AM
Ok, Squirm-

I put in what you suggested. I'm not sure I like it.. :( However, I wanted to get everybody's opinion on it.

ALL--Please download this version and look at the new shading feature. This will darken tiles that have already been seen, but are now not in line-of sight. It will leave un-visited tiles as grey boxes. Please let me know what you think about doing it this way.

Thanks!

Squirm
12-11-2001, 09:04 AM
What can I say Teric, its great images/icons/smile.gif

orufet
12-11-2001, 09:09 AM
Yeah, it's beautiful! The speed is noticably faster since the last time I tried it! Great!

Banjo
12-11-2001, 09:09 AM
I like the shading. One thing though; the code that detemines which tiles are visible gets it a little wrong when the character is right next to wall (the diagonal line of sight doesn't work).

Teric
12-11-2001, 09:25 AM
Yes, I've seen that myself, Banjo. I worked long &amp; hard on the line-of-sight calculations, and I still don't have it perfect (sigh). However, I feel it would take a ton of time and headache to figure out how to do it perfectly. I'm content to let it sit as is for now, unless enough people complain about it.

Banjo
12-11-2001, 09:28 AM
If you don't mind, I might have a look at it myself. I fancy a bit of a challenge.

Teric
12-11-2001, 09:43 AM
Please, go right ahead, Banjo. If you can figure it out, I'll include you in the credits for the game. Thanks!

ChiefRedBull
12-11-2001, 04:49 PM
Shading looks very nice, and i changed the viewing area to 7. Sweet. images/icons/smile.gif

It runs just as fast on a 7 viewing radius - wow. Im impressed. Some serious speed going on there. Well done.

Now all it needs is a story line..... hee hee images/icons/tongue.gif

Teric
12-12-2001, 06:16 AM
It was JDYoder's suggestion that sped it up, Chief. Thank him. Heck, I've had up to 2000 monsters running around the maze without a significant performance hit.

Teric
12-12-2001, 03:05 PM
UPDATE:

1. Item modifiers. This allows items to have magical properties. If an item has a modifier, then an icon and a number will show up in the upper left corner of the item icon. This will indicate the type of modifier and how strong the modifier is. (For example, a sword can do +3 Acid damage, or a shield can be +2 vs. Fire) Modifiers can be positive or negative.

In order to see an explanation of the modifiers on an item, simply right-click the item and an explanation will accompany the item description.

For testing purposes, I have set up the program to assign some random modifiers to some items in your inventory.

2. Yesterday, I made a change which darkens already-seen tiles that are out of line-of-sight. I have made the tint even darker, and it looks a lot better to me now.

3. The mini-map now shows walls in white, instead of simply not drawing the walls and allowing the form background color to show through.

Enjoy!

ChiefRedBull
12-12-2001, 03:42 PM
Looking even better.
Three suggestions now:

1) Shading looks great, although it would be even better with two levels of tone, so that it fades darker. Yknow what i mean? So the edges of the dark bits are a midtone between normal viewing and shaded.

2) I have trouble selecting the items so im using them. I drag and drop, and nothing happens. I checked the code and it looks like the detection could be a little more forgiving.

3) Health, and damage from baddies?

Wicked game.

dcl3500
12-13-2001, 06:55 PM
Man this looks great! One suggestion, give us the ability to slow it down or speed it up in options. It runs really fast, so fast that it is difficult at times to hit the down stairs in the first couple tries. Like I say a really amazing bit of coding.

Squirm
12-14-2001, 03:23 AM
I thought of another idea, not sure if you will like it. You could make it so that when the player clicks with the mouse on a tile, the character walks to that position. This will probably involve some kind of pathfinding, to get around walls, but it would still be cool. Just a thought.....

Teric
12-27-2001, 02:03 PM
Another update!

1. Modified the drag item function to make it a bit easier to drag and drop items into their slots.

2. Armor and weapons graphics are complete.

3. You can now pick up and drop items in the maze. To pick up an item, simply move over it in the maze and it will be put into your inventory. To drop an item, drag it from inventory to the maze viewing area. NOTE: If you drop an item that is equipped, your character will automatically un-equip it before dropping it.

Enjoy!

Teric
01-02-2002, 01:06 PM
Geez, with the database crash, it looks like all of my attachments were blown away. :( Here is the latest version of my game.

By the way--I posted last week, requesting help for an error that I couldn't figure out. It turns out that the error had to do with setting references to objects instead of copying object data into a new object. I've got it fixed now.

Enjoy!

Teric
01-04-2002, 01:14 PM
Another update, folks. Here's the scoop:

1. Monsters now follow you around, instead of wandering aimlessly through the maze. I've also set it up so that no two creatures can occupy the same space at the same time.

2. Mini-maze is now smaller--feedback please. Good? Bad?

3. Speed is now a factor. Your character and each monster will have a speed factor. Eventually, each monster will have a specific speed, but for now, I have randomly assigned speeds to monsters. Your character should be able to out-run most monsters. But don't expect to be able to out-run something like a centaur or a dragon...

4. You can now decide what items you want to pick up or leave behind. When you move onto an item, it will appear in a 'pickup' list box below the main playing area. To pick up an item, click the entry in the list box, and it will appear in your inventory.

Enjoy!

JDYoder
01-04-2002, 02:00 PM
Hey Teric! For some reason, I just got two email notifications that someone had replied to this thread, but ever since my post back on the first page, I've never received a notification for this thread. Strange.

But now that I have and downloaded your latest code, I say good stuff, and I'm glad the mini-map suggestion worked! This is very similiar to what I was working on before... well, we know what... ;)... but I just wanted to say, "Great Job!" :)

Squirm
01-04-2002, 02:08 PM
Excellent work yet again, Teric. You continue to release neat, precise, and WORKING code! If things carry on the way they are who knows where this project might lead.
;)

Are you planning on putting any animations in? For the character walking? Or maybe monsters larger than 1 tile?

Whatever you do, Im sure it'll be great! :cool: :cool:

Teric
01-04-2002, 02:18 PM
JDYoder--Thanks for the feedback!

Squirm--*blush* Well, I try hard. :) :eek: ANIMATIONS?!?! :eek: After I finally completed drawing all of the character graphics, you want me to re-draw each one for 3-4 frames of animation?!?!

*Runs away screaming and pulling his hair out*

Actually, Squirm, I think animation would be great, but it would literally quadruple the graphics work I have done (I made all of these graphics myself). Realistically, I'd like to get the game to a working status (i.e. monsters actually attack, take damage, drop loot, etc.) before I put things like animation in.

Multi-tile monsters, hm..? Now THERE'S an idea to think about. I'll put that one on the back burner.

Teric
01-08-2002, 01:58 PM
Another quick update here.

1. If you are over-burdened, you will slow down. The more over-burdened you are, the slower you will move.

2. A message window lives at the lower left of the screen. This message window will eventually show all game messages. For now, it tells you when you pick up things, when you hit monsters, how much damage you do to monsters, and when you kill monsters. (Which naturally leads to....)

3. I have started implementing the fighting in the game. For now, you can hit and kill monsters, but they can't do any damage to you. (Ooooh, that's unfair! >:) ) Damage done is computed based on your weapon's base damage plus any modifiers. In the current version, I've put a BUNCH of monsters in the maze so that you can fight all you want. (Sorry, no experience yet...)

4. When a hit occurs, the monster/player will flash. I did this by inverting all of the colors in a specific cell. Many thanks to Volte-face for his tutorial on how to extract the specific RGB values from the results of a GetPixel function.

5. I'm experimenting with monster/player speed. I've slowed things down a bit so that play is a bit more manageable.

Enjoy!

Squirm
01-08-2002, 02:21 PM
You could start off the animation, without having to draw anything new, by just making the character and monsters *slide* between squares instead of an instantaneous jump. Then, later on, you could add inbetween frames to give the impression of walking. Just a thought.
;)

Iceplug
01-08-2002, 02:23 PM
Have I mentioned how much I like this game?

So um... will there be magic?
Perhaps magic-using monsters?
:)

Teric
01-08-2002, 04:17 PM
Squirm--Ah, now that would be a lot more doable. Still, I will probably keep the monsters and player jumping from cell to cell for now, while I put in the 'meat' of the game.

IcePlug--Glad you like it! :) Yes, there will be magic, magic using monsters, magic wands, magic scrolls, potions, rings, spells....

Iceplug
01-09-2002, 06:07 PM
Oooh.
Will there also be music? Perhaps MIDI? Need MIDI? I have some! Don't need MIDI? OK. No biggie.

I found an error in the listbox. While on an item, I missed clicking the item name on the listbox and clicked the space under it and I got an error. I'm not too strong with listboxes, so I figured that I'd throw this out there and that you could handle it.

Squirm
01-09-2002, 06:15 PM
I would love to see some doors and keys, that would be cool, to open a room full of treasure, or a load of nasties! mwahaha :D

AverageCoder
01-09-2002, 07:53 PM
First of all this is a great game, if you keep at it who know where it will go. I also have some suggestions:


Suggestions
1. Have monsters track you inside a corridor but when you exit that specific corridor they stay behind or before you know it all the monsters in the level are tracking you, maybe some could have free range.

2. Maybe some of the more intelligent monsters track you while the others less intelligent move around randomly.


AC

T-Bag
01-10-2002, 12:11 AM
It would be alot better if...

i knew where to get it! :)
please tell me i love RPG's

Flyguy
01-10-2002, 01:31 AM
uh...

There is an attachment on one of Teric's posts

Teric
01-10-2002, 03:33 PM
Iceplug, thanks for the heads-up on the listbox bug. I fixed it, and it will appear in the next release.

Iceplug
01-11-2002, 12:57 PM
You're welcome.

I guess that was easy compared to some of the other stuff. We have to fix all tiny problems in our programs before they become successful.:rolleyes:

wild wolf
01-16-2002, 01:05 AM
hey teric, the last time i saw this game, it was just a plain map with a guy moving around but now u have changed and made alot of progress, i applaud u on ur progress
well i noticed there was a bug, i dun know if others noticed, try this out and see if its a problem, when the game is in progress and if i click on any of the options on my right, say example i click on hands or chest (hope u get what i mean), it gave me a run time error, i thought might be a problem somewhere so i recompiled it and it gave me the same error, but then on my third try i clicked on it after playing for a long time and it din give me any error, sounds wierd to me, try it out and see if it gives u the runtime error
ill be waiting for the updated version, hope it comes out soon :) and guess what, this game is a single player game, iam trying to make it be able to play on the network, i.e. multiplayer

wild wolf
01-16-2002, 01:17 AM
i think i know why it gave the runtime error

line 715

If ButtonDown = True Then
'No action if there's no item
If ClickedItem.Name = "" And ClickedItem.ItemType = "" Then Exit Sub

'Right clicked?
If Button = 2 Then ClickedItem.ShowStats

'Left clicked?
If Button = 1 Then
Set GrabbedItem = ClickedItem
GrabbedItemIndex = ""
DraggingItem = True
DragX = X
DragY = Y

since there was no item and i clicked on it (left click) it set DragginItem as true and in the seond condition as follows on line 745

ElseIf DraggingItem = True And GrabbedItem.ItemType <> "" Then
'The user dragged an item to this slot.
Select Case ClickedItemIndex
Case 0:
If GrabbedItem.ItemType = "H" Then CharacterObj.CharHelm = GrabbedItem.sKey
Case 1:
If GrabbedItem.ItemType = "B" Then CharacterObj.CharBP = GrabbedItem.sKey
Case 2:
If GrabbedItem.ItemType = "A" Then CharacterObj.CharArm = GrabbedItem.sKey
Case 3:
If GrabbedItem.ItemType = "W" Then CharacterObj.CharWeapon = GrabbedItem.sKey
Case 4:
If GrabbedItem.ItemType = "N" Then CharacterObj.CharHand = GrabbedItem.sKey
Case 5:
If GrabbedItem.ItemType = "S" Then CharacterObj.CharShield = GrabbedItem.sKey
Case 6:
If GrabbedItem.ItemType = "G" Then CharacterObj.CharLeftFinger = GrabbedItem.sKey
Case 7:
If GrabbedItem.ItemType = "T" Then CharacterObj.CharBelt = GrabbedItem.sKey
Case 8:
If GrabbedItem.ItemType = "G" Then CharacterObj.CharRightFinger = GrabbedItem.sKey
Case 9:
If GrabbedItem.ItemType = "L" Then CharacterObj.CharLegs = GrabbedItem.sKey
Case 10:
If GrabbedItem.ItemType = "F" Then CharacterObj.CharFeet = GrabbedItem.sKey
End Select
End If


but there was no item, and thus it gave a runtime error as it did not find any object to drag


accroding to me i think there is a problem on this part, if there is than i think i have understood how the whole game works and it will be easier for me to create the network part of it, i.e if u allow me to do so

wild wolf
01-16-2002, 01:27 AM
i tried puttin in this check and din find any error after this but i found that the game became relatively slow, maybe was a proble with my computer

line 718

If ClickedItem.Name = "" And ClickedItem.ItemType = "" Then
MsgBox "no item to move"
Exit Sub
End If

it wont give the runtime error anymore, i think at first the program was not goin into this check, try this out

Teric
01-16-2002, 09:51 AM
Wild Wolf-

You were correct--it was generating an error when I clicked on an empty equipment slot. I tried it by running the game and simply clicking on the 'LEGS' slot to see what would happen, and I got a run-time error. The error was caused by the following line:ElseIf DraggingItem = True And GrabbedItem.ItemType <> "" Then
The error occurred because even though DraggingItem was false, it still tried to evaluate GrabbedItem.ItemType. Since GrabbedItem had not been set up as an object yet, the evaluation caused an error.

To fix the problem, I modified the line as follows:ElseIf DraggingItem = True And IsObject(GrabbedItem) Then
Thanks for pointing that out, Wolf!

As for making the game multiplayer--wow, that would be cool. But I must let you know that I am still working on the single player game, adding in the fight/damage/death functionality. There's going to be a bunch more functionality before I'm done with the single player game.

I say this because it might be a good idea to hold off on making the game multiplayer until after all of the functions are built. Otherwise, you would probably have to do a lot of re-work when I released a version with newer functions than the version you are working on.

On the other hand, if you want to implement multiplayer functionality just to see if you can do it, then go right ahead. I'd love to see what you come up with.

wild wolf
01-17-2002, 12:48 AM
well that solves the problem of run time error,
tell me one think, what is the purpose of the blue boxes on the lower right side? and also the space next to the message box where u see all the activities example, you hit monster for 1 point, what is the prupose of that space?

suggestion,
it would be a good idea to pop up a msg stating for example that " there is no weapon to drag" when a user just clicks on empty spaces expecting some action to take place

as for the network, ill wait for u to complete the final thing (hope its soon :) )

need any help just give a shout and will be ready to help :)

Teric
01-17-2002, 07:41 AM
Wolf-

The blue boxes on the lower right are your backpack inventory spaces. Any item you pick up from the ground will appear in those blue boxes. You can drag items from your inventory to your equipment slots in order to wear/wield them.

Teric
01-18-2002, 03:14 PM
New update before I leave on vacation, folks.

1. Fixed the errors identified by IcePlug and Wild Wolf above.

2. Fixed another error with the item pick up listbox: when multiple items were sitting on the same spot, and the player picked one up, the listbox sometimes was not updating correctly and showing 'ghost' items on the ground. Fixed.

3. Character attributes implementation started. Strength, Dexterity, Agility, Constitution, Intelligence, Wisdom. Each of these will have an effect in the final version of the game. For now, each time the game starts, you will have a basic character with 11 in each attribute. You can tweak the attribute values up & down by trading points between attributes. (Go ahead and experiment with these and see how it subtly affects the game)

4. Monster attributes also implemented.

5. Monsters can now hit and damage you (i.e. you can be killed by a monster). Sorry, you can't gain levels yet.

6. You can now gain experience by killing a monster.

7. Weapon delays and damage have been implemented. Bigger, heavier weapons swing more slowly (and thus attack less often), but do more damage. Right click on a weapon icon to see its statistics.

Please let me know what you think, and thanks for all the feedback!

Enjoy!

AverageCoder
01-21-2002, 01:56 AM
Suggestions to help user:

1. When character walks over an item, and it is put in the list box the user should be able to hit enter to add the item to his inventory:


'form_keydown in case statement

Case vbKeyReturn
Dim myItem As Item
Dim ItemIndex As String

'Pick up the item, and remove it from the pickup list.
ItemIndex = CStr(lstPickUp.ItemData(lstPickUp.ListIndex))
Set myItem = ItemList.Item(ItemIndex)
Inventory.Add myItem
ItemList.Remove ItemIndex
lstPickUp.RemoveItem (lstPickUp.ListIndex)
'lstPickUp.Refresh
MsgList.Add ("Picked up " & myItem.Name)

'Free memory
Set myItem = Nothing
End Select



2. The user should also be able to double click on an item in their inventory to automatily add to the right area. Also if they already have a ring it will add it to the other open slot, or if both are full then replace first slot. When an item double clicked it automaticly replaces what is in its slot.

3. Edit monster stats so it is easier to kill them when the character is weaker/level 1.

4. Add potions to InitLevelItems, and maybe start player with some potions, or other items.

Hope these suggestions help
AC

Teric
01-21-2002, 08:43 AM
Thanks for the suggestions, AC. I'm on vacation in Utah right now, so I'll see what I can do when I get back.

Squirm
01-21-2002, 08:57 AM
To put lines of code in your posts use the [/b]][/code] tags, or click on the [#] button when you write your post. :)

[code]And your text looks like code...... magic!

:D

Teric
02-04-2002, 12:43 PM
Sorry so long without an update, folks. Things have picked up recently at work, and I haven't had much time to work on the game. Just wanted to let you know I haven't disappeared.

JamesTheGreat
02-06-2002, 11:29 PM
When trying to run your game I get the following error: "Invalid procedure call or argument". It breaks on the following function:


Public Property Get Item(vntIndexKey As Variant) As Item
'used when referencing an element in the collection
'vntIndexKey contains either the Index or Key to the collection,
'this is why it is declared as a Variant
'Syntax: Set foo = x.Item(xyz) or Set foo = x.Item(5)

On Error GoTo GetError

Set Item = mCol(vntIndexKey)
...


Too bad, with all this hype about this game I really wanted to check it out! :)

Cheers,
James

wild wolf
02-07-2002, 04:18 AM
i just downloaded and it worked just fine, no prob, no errors

anyway teric there is something u need to change, once the user uses an item, it still appears in the list section (the blue boxes), i think once an item is used it should not in the inventory anymore unless it is brought back, thats what i think, maybe u have another idea

Teric
02-07-2002, 10:00 AM
Yeah, I think that is a good idea, Wolf. I'll look into putting that one in.

JamesTheGreat
02-07-2002, 10:03 AM
it works for you eh wild wolf? hrm.. my computer must be buggy.. either that or it's win2k being itself again.

Teric
02-07-2002, 10:08 AM
Actually, James, you may both be right. Mostly, the game runs fine on my machine (Win NT 4.0), but every now and then I get a bug on that particular procedure. It is caused by a bad index key (i.e. an incorrect index is passed into the procedure, and the collection cannot find the particular item that the program was looking for, so it returns an error.)

Does the same thing happen every time you run the program? If so, could you describe exactly what happens and when.

I'm still trying to iron out all of those bugs, please bear with me.

wild wolf
02-07-2002, 08:02 PM
yeah i think the OS will make a diff, i tried on win 98, win 2000 pro and win XP, all worked fine except win 2000 pro, thats not all, i have noted that most games cannot be played on 2000, i think it was built mainly for office use, my game was not working on my pc which had 2000 pro but when i tried on my laptop that has xp it worked just fine

Teric
02-08-2002, 07:57 AM
Booooo Win2000! Anti-game OS! GRRRR, DIE DIE!

wild wolf
02-08-2002, 09:03 AM
:D dun be sooo mean teric, win2000 may be anti games but its the only version of windows that i have used without getting even a single illegal operation warning, even win xp gives me stupid illegal operation with an interface :D

but wait...... there are some games that can be played on win2000, especially those arcade games which require less memory space, i think there must be acheck which we have to include in the game (i used t put version checks using VB script but in game programming havent heard of it), if those small games can work then why not ours? and yeah, those games are DOS based, i got to reboot in dos mode to play them!!!!:(

JamesTheGreat
02-08-2002, 09:10 AM
I agree, I use win2k on my laptop and it works beautifully.. the only problem being that a lot of the resizing on controls fails which I think is due to a chance in the way the screen width and height is stored which causes VB some stress... and that you can't play games such as this one!

But hey, that's why I still have my win98 box sitting around somewhere!

Cheers,
James

Teric
02-15-2002, 10:03 AM
Small update here, but it addresses what you have asked for.

Changes:
1. Natural Hit Point regeneration, based on Constitution (i.e. hit points gradually regenerate over time, so you can sit, rest, and heal).

2. Hot key to pause the game. Hit the 'P' key to pause/unpause.

3. Hot key to pick up items. If you're standing on an item, hit the space bar to pick it up. You can still pick up items by clicking on items in the pickup list box.

4. Auto-equipping of new equipment. If you pick up an item for which you have an empty equipment slot, that item will automatically be equipped in that slot.

5. Players will now see 'Miss' messages in the message window. When you are in battle, and you miss the monster, a message will tell you so. By watching the miss and hit messages, you can get a general feel for the speed of a weapon.

Enjoy!

JDYoder
02-15-2002, 10:55 AM
Looking better and better! Don't know if you want to keep hearing ideas as you probably have plenty of your own, but in the event you are...


1) The biggest thing I'd add at this point would be FPS (frames per second) logic. I'm guessing the rate of this is altered by the speed of the machine, right? If wondering how to do this, you can look at my Pac-Manager game on PSC which I know you already know about. ;)

2) Bigger playing area.

3) Have at least one (maybe more) slightly different floor tiles (maybe a cracked tile?) which is occassionally assigned to a location so the background changes a little more -- when moving along a corridor, it's sometimes hard to judge my movement unless I watch the minimap.

4) Allow me to go back up a level on a stairs. (Optional idea is to not force me to go up or down a stairs if I step on them, but have a hotkey for that, though others and yourself may disagree and that's fine as it's not a big deal).

5) Have the player and creatures not move block by block, but can be overlapping tiles by moving in smaller increments.

6) The icing on the cake would be to have different frames for the player moving (animation). Not sure how much more you want to put into this game as that would be quite a lot of work and maybe not worth it.


But I like what I'm seeing! This is one of, if not thee, best attempt at a Zelda-like game for VB I've ever seen! :)

Squirm
02-15-2002, 11:22 AM
Looking good Teric, only downside is die too much, ack! ;)

What I would really recommend at this stage are adding things to actually do other than roam around aimlessly. Maybe add a few doors to locked areas and you have to find the key, or have an overall aim for the game. A projectile weapon (bow and arrow?) would be awesome also!.

AcidBoot
02-15-2002, 11:33 PM
Mmm. It is shaping up quite well. It does seem a tad slow to me though.

I really like the random maze generator!

Is there any way to repair your health? If not there really should be. If so it should be more readily available, or the game should start off much easier.:-\

I have not had the time to examine all the code, so forgive me if this is already true, but for the items placed, the first level should contain at least one weapon, 1 piece of armour, and 1 special item (a healing potion comes to mind).

Good luck with further progress.:D

PS: The line of sight algorithim seems a bit over the top. I will see if I can come up with something less cumbersome for you.

Teric
02-18-2002, 07:58 AM
Thanks, Acid--if you can come up with a better, leaner, or more efficient line-of-sight calculation, I would be very grateful.

AverageCoder
02-18-2002, 11:34 PM
I think is still is a little slow, takes a while to uncover all the map.

Need store to buy items/sell items after each level or every 5 levels.

Make quest on a few levels, kind of like what squrim said.

AC

dcl3500
02-19-2002, 12:28 AM
Well I said it ages ago in this thread and I will say it again.
Good game!

Speed is still right up there on this machine (P4 1.7Ghz 256Mb Ram) Haven't tried it on any of my others for awhile. Maybe I will compile this version and give it to my 8 year old to test. :) He has seen me "testing" it before and been bugging me to "test" it too. :D

AcidBoot
02-21-2002, 07:02 AM
Hmmm...

Sorry about the delay with this code, but I've been kept busy with other stuff.

This is a preliminary design, it is totally untested, and I probably have a few (buckets of)bugs in it. I should be able to test this and update it in a few days, but I thought you might like to see it now, to get the gist of it.

It may seem very long, but very little of the code is run for each tile. Most is excluded by If statements. The main thing is that there is very little complicated math.

This is based on a game I am doing, which uses a single dimension of the array to determine the size (for eg: a map of 20x20 tiles would be MAP(0 to 399) )This is to fit with my display method. The important thing here is that both the Position of the player and the Location being checked are passed as a single integer, and then broken apart to provide x and y, both of which are the number of tiles difference.

Eg: x=0 y=3 : the square being checked is 3 tiles directly above the player's Pos.

I am sure you'll be able to nut-out the difference.

Add(sq as int) is a sub that adds the tile of the value passed to an array. The array is then checked against blocking objects in those tiles.

It might seem easier to check in the LOS sub, but in my game different things/powers will allow different sight conditions, eg: flying things will be able to see over some terrain, and be seen over that terrain. Also the same algorithim will also be used for missile weapons.

Anyway, I have attactched the module with no supporting files... just the code.

If you have questions I'll be around, or if you are super-keen you can email me.

Like I said I will post a debugged version in a few days.

AcidBoot
02-27-2002, 07:17 PM
I've only just got around to taking a bash at fixing up and testing the L.O.S. module, and man... I must of been drunk! It is a mine field of errors!

In short it may take a bit longer than originally anticipated to fix. I should be able to get it done on the weekend barring unfortunate events.

Has anyone else had any luck with it, or any questions about it?
Or comments (preferably not booze related) :-\

AcidBoot
03-03-2002, 05:59 AM
Well, I removed all the errors involving vast stupidity, and started debugging it.

Turns out that it's not as good as I'd hoped. It loses accuracy with range, and certain tiles show up when they shouldn't and others are blocked when they shouldn't be. This is not so much coding errors, as the algorithim's simplicity overlooking these tiles.

I started trying to come up with a more effective model, so I looked at a few comercial games, and I got to tell you... they aren't so crash hot either!

As a result I have decided to resume debugging my original version, as otherwise we are then heading into huge code, complicated math, or manymany loops.

I will put it up "when it's done":rolleyes:
Only a few ppl downloaded the original buggy version... does anyone want to see the finished code? Or are we not fussed?

ChiefRedBull
03-03-2002, 09:25 AM
I'd like to see it, just make sure its nicely commented. We had a jokey best algorithm competition a while back.. heh :p

Teric
03-04-2002, 07:35 AM
Do you see why I spent so much time with my original Line-Of-Sight module, and then didn't want to put in the time to make it more accurate? For the scope of the game that I'm doing here, I don't feel that it is worth the necessary time to put in a 100% accurate line-of-sight module. What I have at this point is fairly good, and it doesn't show 'ghost' tiles or things like that.

AcidBoot
03-05-2002, 12:29 AM
Oh yes!

My method, once debugged, won't show up ghost tiles, but some of the angles that you will be able so see around leave a little to be desired.

The biggest glitch is a single tile directly diagonal from the player. The algorithim will only block line of sight to tiles in a straight line behind it. Not a prob when it's a fair distance away, but it's a bit kooky when the player is right next to the blocking tile.

Anyway, it is better than exapmles I have found in many other places. Man alive! You look at some of the old games, and it is amazing what they got away with.

Unless you expand on your game Teric, I don't think that my method would prove problematic. Mind you what you have works just fine too. I just like the simplicity of my method ("Look Ma... no Trig!") Given the speed of today's CPUs, or even yesterday's CPUs, I don't really think that there will be a noticable difference in the speed.

Truth be told, if I were you I would stay with what you've got as the hassle of switching the algorithims would not be worth the satisfaction of avoiding math.

Teric
03-05-2002, 08:04 AM
Ok, thanks for trying, Acid.

NOTE TO ALL:

Work has REALLY picked up lately, and I've had to put the development of this game on hold. :( Please continue to check back, as things may die back down a while later.

KiS
03-05-2002, 11:56 AM
I'm maybe stupid but, Where to download the game?

Squirm
03-05-2002, 12:22 PM
Look on page 4 of this insanely long thread. :D

Thinker
03-05-2002, 12:23 PM
Look at a post made by Teric on 2-15-2002

It's only on page two for me ;)

Computer_Guy
03-05-2002, 03:22 PM
Hey Teric, I downloaded your game, and it's a lot of fun. I can easily see that this took some thinking out / working / coding.

You said that work picked up, and the game has to be put on hold? :( that's too bad, I think that made a few people, who are fans of the game kinda sad. But you have to work. Am I glad I'm only 17, and don't have to work that much. Being on this forum where people are a lot older than me made me realize that I should utilize my childhood.

Whoops, sorry, didn't mean to go on and on, but nice job, Teric.

Ed

PS: Yeah Squirm, this is a long thread, my "Help With RPG's" was even shorter than this (but like 5 replies). lol

Iceplug
03-06-2002, 07:19 AM
Sounds like something a grandpa would say.
"You young whippersnappers have your whole life ahead of ya."
I am going to use that word "whippersnapper". OK. Maybe not :)
Let's make this thread the longest thread of all time!
I can see it now. 137 pages. :cool:

Teric
03-06-2002, 08:15 AM
Iceplug, I don't mind if this becomes the 'longest thread of all time', but two things:

1. I've seen threads with over 2000 posts (not views) on them, so it would take forever to get that high
2. I would like to keep this thread on topic, not fill it up with meaningless posts. If my work dies down a bit and I can start developing this game some more, I will continue to post and solicit feedback. But I don't want people posting on this thread just for the sake of posting.

AcidBoot
03-06-2002, 10:03 PM
OK! I finally got a couple of hours together today and I debugged the LOS algorithim... I think....

Like I said before, it is not the greatest algorithim ever, but I wanted to see what I could achive using simple math. I could improve on it I'm sure, but this is just a first pass, and I don't really want to spend the time just now to come up with a better algorithim.

Basically the Fog function is called from the main game at the begining, and every time the player moves. It then calls LOS for every tile in the viewing area against the position of the player. Then it cycles through the generated array of tiles to check, and blacks out the tile if one or more of the tiles in the array block LineOfSight..

Again, in my game, I am using a single dimension for the terrain, meaning that some additional math has been put in to seperate x and y, and recombime them when adding to the array of tiles to be checked.

I have given the current version a reasonable checkover, and test, and it seems to work the way it should, based on the maths. There are no ghost tiles, but some of the angles at which you can and can't see around things is a bit iffy. Still it is better than the games I looked at for LOS. ie: Ultima4, and XCom Enemy Unknown.

I tried to comment the code well, but I think that it may be a little light for some, particularly with regards to why certain things are done. If anyone has questions, feel free to ask me.

Pookie
03-07-2002, 05:35 AM
I have a question to ask regarding the Let and Get Properties that were used so extensively in that RPG...

As I'm still learning about VB, I still haven't learnt about the necessity of the Let, Set and Get Properties.

Are they important/good to use in programs or can programs be written without them and still be classed as good programming?

Also is it necessary to use them in that rpg so extensively?

Forgive me to for ignorance. ;)

Teric
03-07-2002, 08:32 AM
Pookie-

The Get/Let/Set functions are an essential part of object-oriented classes in VB. Using Get/Let/Set, I can make programming easier in other parts of my game.

For example, I can say something like this:
MyMonster.STR = 15

And it will automatically call the LET STR function in the Monster class to set the mvarSTR member variable. Some would ask: why couldn't I just say MyMonster.mvarSTR = 15? Well, I could (assuming the mvarSTR variable were not private).

However, I want the class to automatically recompute the monster's attack power when I set its strength. Without the LET function, I would have to do this:
MyMonster.mvarSTR = 15
MyMonster.mvarAttack = MyMonster.ComputeAttack
I would have to make those same two calls EVERY TIME I changed the monster's strength.

Instead, I simply call the LET STR function using one line of code, and the attack power is re-computed automatically.

This is one of the beauties of encapsulation (a pillar of Object Oriented Programming).

Pookie
03-07-2002, 08:53 AM
Okay, thanks you for the info, I'll have to look into it more.

Nice game too. ;)

vb_recruit
11-09-2002, 02:36 PM
Nice game : )
I was working on an RPG,
but I turned it into a tutorial so
everyone else could learn!!
(Im writing part 2 now)
But - you can view part one on my website.

Chris

Machaira
11-09-2002, 04:40 PM
Just a suggestion - your tutorial would be a lot better if you would learn how to indent and use white space.

Mithrandel
11-10-2002, 12:44 AM
*winks into existance*

Ah, I remember this one, Teric. Very entertaining, if my memory doesn't fail me...

...but one doesn't expect threads that have been gathering dust for eight months to be resurected. =)

*winks out once more, smiling*

hotrodx
11-10-2002, 03:51 AM
Teric's into Ducks lately. lol

He's made pretty good strides in VB game programming. Although I think it's a shame that this game and Sectors was kinda shelved.

Teric
11-12-2002, 02:46 PM
Fear not, my friends!

Sectors has definitely NOT been shevled! Since I got laid of from ExxonMobil, I can now use DirectX in my games! YEEE-HAW!

Unfortunately, my search for a job has also (temporarily) taken me away from sectors development. However, I have several definite prospects on the table right now; there's an excellent chance that I will be employed before the end of November.

Once I get things back in order, I plan to get right back on to Sectors, making it the game that I've always wanted it to be. Keep your eyes peeled--it'll be back up.

Unfortunately, this RPG has been 'shelved', I'm afraid. I look back on it and see a great deal of potential, but I realize that there are some fundamental flaws in the game engine that would require a significant re-write to fix. I very much enjoyed getting it to the point where it is, and it was a wonderful learning tool. Thanks everyone who supported my efforts!

JimCamel
11-12-2002, 05:32 PM
Best luck on getting your new job Teric, I'm planning on looking for a new job myself soon.

Sagegoku666
12-18-2002, 03:40 PM
im kinda (ok completely) new to this forum, and i dont know where to download your game. i really want to see it, tho.

Waxycat
12-18-2002, 05:49 PM
Teric, why couldn't you use DirectX when you worked at ExxonMobile?

Iceplug
12-18-2002, 06:56 PM
You can download the last version on Page 4 (http://www.visualbasicforum.com/showthread.php?threadid=13573&perpage=20&pagenumber=4).

I think Teric had a computer scanner that checks for unauthorized files (or something similar)... and DirectX downloads are probably detected and then some consequences arise... etc.... AFAIK.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum