It is currently 23 Nov 2017, 07:45
   
Text Size

[VB]Mordor Clone - my journey

by Salbei

Moderators: Salbei, CCGHQ Admins

Re: [VB]Mordor Clone - my journey

Postby Salbei » 20 Apr 2011, 12:28

The Buff/Debuff "basics" are done, the only debuff right now is "Resurrection Illness" (after getting revived).
It lasts 600 seconds but doesn´t do anything specific right now.
I have already brainstormed a bit what i want to accomplish with that debuff, but i didn´t came up with a solution i am happy with.
I´ll take my time for this.

Today i am trying to create the base frame for "simple" damage spells (magic).
I don´t want to hardcode anything, so the spells can be modified at will, so this is going to be harder than it needs to be.

My idea is to write the "basic" informations into a ini file, then read out that ini file at the start of the game (while it is loading) then "save" the data inside a table (labels).
Whenever a spell is used the game is supposed to read out those labels and calculate anything relevant from there.
This is a similar solution as "saving" them inside classes, but got the advantage that i will be able to "see" exactly what each individual spell is doing/is handled, just by looking at that window (so i just have to add a single line).

The other advantage is that all spells are very easy to modify (typos,values etc).Balancing Spells is going to be so much easier and could be done by anyone.

---
Ideas for different "schools of magic":

Elemental:(Fire,Earth,Wind,Water,Electrical)
Straight forward direct damage spells.
Number of affected Targets will change.
A "Chain Lightning" for example will hit multiple targets, but deal less damage than a "Fireball".

Dark Arts: (Darkness, Decay)
Debuffs(Decreasing Max HP or damageoutput)
Damage+Debuff (low damage with a small debuff)
"Drain Life" (damage dealt will heal the caster)
Poison(Damage over time)
Poison Cloud (Damage over time against multiple targets)
Summon Undead Minions(Maybe even Multiple)
"Dark Ritual" Trade Hp for Mp

Blood:
Trade Mp for Hp
Trade Hp for Buffs
Create a Golem (Minion that fights for you)

Nature / Divine:
Healing
increased Regeneration of Mp / Hp
Stat Buffs, Max HP/MP buff

Martial Arts: (Physical)
"Stun"(stun 1 or more monsters, stunned Monsters can´t attack you during their turn)
"Bleeding" (wound,debuff, dealing damage over time)
Ignore Pain (remove debuff)

Mind:(Illusions)
"Walls" that prevent Monsters from attacking
"Clone" a copy of yourself (a minion)
"Fear" monsters try to disengage combat (chance to not attack?)

---
I implemented the first working spell (actually 3).
I still have to fine tune some aspects though.
Randomly the spells won´t appear within the "spellbook".
Not quite sure why.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 21 Apr 2011, 23:00

I implemented the first 20 spells. They are all either straight forward Direct Damage or Multi-Targeted Damage Spells.

Single Target Spells are working fine, multi-target spells need to be fixed.

I also figured out how to use the "Try" command (filtering out errors within a loop with it).

The weather outside is great and friends are over almost daily, so my time for the project is very limited right now.

I will record some sounds soon and start replacing the messageboxes with those. Or simply implement more spells.
It would also make sense to implement a few "Int" skills, now that the first few spells are in.
I still need to work out a system to acquire those spells.Got a few ideas already.

Unfortunately i did not get the permission to use the artwork of the few artists i emailed (most didn´t even bother to answer).
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 22 Apr 2011, 17:36

Today i am implementing "Respawn" timers for individual Monsters.

At the moment Monsters instantly respawn - i am about to change that and let a timer count down after the monster has died that prevents the Monster from spawning again until the timer ran out.

Initially i wanted to use the System Clock for this, but i have decided against it and use one internal "Timer" instead.

---
Done , works like a charm. After a battle in which all Monsters have been killed there is now a 90 second timer ticking down after battle. During this time nothing happens when you enter the field again - when the timer hit 0 there will be new monsters.

Did a lot of bugfixing. There is one bug left that randomly lets you equip two items (then you can´t sell both, and can´t unequip any of them ... thats quite nasty). Don´t really know why this is happening, so it is quite tough to find the line that is responsible for this (could be anywhere from equipping, reading out a "wrong" line inside of an ini file or even the randomloot ...)
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 23 Apr 2011, 16:08

Implemented the 2 first "Int" skills.

One that reduces the manacost of spells, the other lets you regenerate mp during combat (0,12% of your maximum mp / skilllevel). Feels about right.

I´ve also recorded the first "Sounds" and implemented what i got. So far only the 20 Spells i implemented yesterday got their unique sounds.
Was fun to just make "noise" into my microphone, then listen to it and see if and where i can use that.

Also tweaked the spells a bit, and heavily increased the amount of gold you gain after combat.

Was a really productive day so far.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 24 Apr 2011, 18:27

Cleaned up a huge parts of "clumsy" code.

Example :
before
Code: Select all
'For i = 1 To 12
        '    Try
        '        If grouplabelINITIATIVE(i - 1).Visible = True Then
        '            If grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative1.Text & " (Monster1)" Then
        '                If LabelMonsterminhp1.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative2.Text & " (Monster2)" Then
        '                If LabelMonsterminhp2.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative3.Text & " (Monster3)" Then
        '                If LabelMonsterminhp3.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative4.Text & " (Monster4)" Then
        '                If LabelMonsterminhp4.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative2.Text & " (Monster5)" Then
        '                If LabelMonsterminhp5.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative6.Text & " (Monster6)" Then
        '                If LabelMonsterminhp6.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative7.Text & " (Monster7)" Then
        '                If LabelMonsterminhp7.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative8.Text & " (Monster8)" Then
        '                If LabelMonsterminhp8.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative9.Text & " (Monster9)" Then
        '                If LabelMonsterminhp9.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            ElseIf grouplabelINITIATIVE(i - 1).Text = LabelMonsterInitiative10.Text & " (Monster10)" Then
        '                If LabelMonsterminhp10.Text < "1" Then
        '                    grouplabelINITIATIVE(i - 1).Visible = False
        '                    groupcheckINITIATIVE(i - 1).Checked = True
        '                    groupcheckINITIATIVE(i - 1).Visible = False
        '                End If
        '            End If
        '        End If
        '    Catch ex As Exception
        '    End Try
        'Next i
after
Code: Select all
For i = 0 To 10
            Try
                If grouplabelINITIATIVE(i).Visible = True Then
                    If grouplabelINITIATIVE(i).Text = LabelPlayerInitiative.Text & " (Player)" Then
                    Else

                        If groupradiotarget(i).Visible = False Then
                            grouplabelINITIATIVE(i).Visible = False
                            groupcheckINITIATIVE(i).Checked = True
                            groupcheckINITIATIVE(i).Visible = False
                        End If
                    End If
                End If
            Catch ex As Exception
            End Try
        Next i
I am aware that i´m still miles away from coding things the "right" way, but i am learning quite fast. Keep in mind that i don´t have a "teacher" or a book and am pretty much learning by doing.

---

Spells should now work, but there is still no way to learn or even improve them yet (the spells already scale with a spell level though, some even hit more targets at a higher spell level).
I really need to be sure what "system" i want to use before i blindly implement something - been thinking about that for a couple days now and still haven´t come up with a system that i am truly happy with.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Huggybaby » 25 Apr 2011, 18:14

The most important part of code is the mental construct that precedes it, that's how you avoid blind corners.
User avatar
Huggybaby
Administrator
 
Posts: 3056
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 562 times
Been thanked: 569 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 26 Apr 2011, 21:30

After a long coding session i just wanted to fix a minor bug, couldn´t focus and messed things up even more.

Won´t be able to do much unless i can get things to work again.
Didn´t want to use a backup (about 20 hours of work would be lost).

Gonna take a while.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 27 Apr 2011, 22:35

I decided to rewrite huge parts of the combat section (once again ...)
Lots of "sloppy" code will be replaced and improved.

I really have to "structure" everything this time and use more comments.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 04 May 2011, 05:32

Been a bit quiet lately ... well i was working on a "file management" tool (autoextracting files, browsing,renaming and moving files to folders etc).

The tool checks the Foldername for parameters (-p would be the password for example and -md would tell the folderlocation where the file should be stored.). Learned a lot about the usage of "for/each arrays" and the "split" function.
The tool also lets you create a playlist of selected items which was quite easy to implement after checking a m3u files "layout". I might share the tool at a later stage.

Only a few minor things might come in handy for THIS project (mostly visual things, "fading" in a window , "dropping down" a table - images for buttons etc), but after all i am happy to have learned the proper usage of "new" things.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Enchanteur » 08 May 2011, 16:14

Hello,

I've made a random map generator with VB6.
I didnt use it since 2 years, so I will schearch where is the save, and post it.

It's a big algorithm with parameters.
It create rooms, doors, corridors. Height and width of these places are ramdom (not enterely ramdom, it depends of parameters).

I've made it in order to put "special rooms" (pre constructed rooms) but never implement this function.

It use a Access database.
Map generator create map, and save it in the database.
Database also save parameters.

I ve made also functions about move and light, and linesight, with a version of Bresenham algorithm.
You can "visit" the map with a virtual caracter.
There is a scrolling function.

It's a graphical version of donjon crawling, like angbandTK. And it use some elementary graphics (with "image" controls).

I was thinking about made a donjon crawler, but I never end it, because it's a too big lot of work.

And VB6 is great but have a big inconvenient : arrays can not be transmited by class modules. It's not easy to make good class (.cls) code.
The project don't use directX sdk, but it should be better with. But I never took time to learn about how to use this SDK.
Enchanteur
 
Posts: 136
Joined: 26 Feb 2010, 10:20
Has thanked: 0 time
Been thanked: 0 time

Re: [VB]Mordor Clone - my journey

Postby Enchanteur » 08 May 2011, 17:53

Ok, see attachment.

VB6 project.
Check "References" first.
Example : "ActiveX data object 2.8" can be missing. You can use another version (2.6, 2.7, or others).

After all references valids, click on "RUN" (execute).
Principal windows construct the labyrinth, you can move a "homer simpsons" icon with the mouse, in the labyrinth.
You can see the fieldsight function activated.

The constructors can make others things (put doors for example), change scale, trace linesights, etc
I didnt activate doors construct, because, I didnt made a function about "open doors" (homer simpson can't open doors for now).
There is a version for looking labyrinth without caracter (just scrolling).

But there is no interface, and I dont have time to tell you where to change options this evening, or quickly code a windows interface for this.
Attachments
ARCHE_VB.zip
(196.99 KiB) Downloaded 352 times
Enchanteur
 
Posts: 136
Joined: 26 Feb 2010, 10:20
Has thanked: 0 time
Been thanked: 0 time

Re: [VB]Mordor Clone - my journey

Postby Enchanteur » 09 May 2011, 07:01

In class module C_variables.cls
Use :
Pas = 32
Instead of
Pas = 16

You will see x2 scale, it look better.
Enchanteur
 
Posts: 136
Joined: 26 Feb 2010, 10:20
Has thanked: 0 time
Been thanked: 0 time

Re: [VB]Mordor Clone - my journey

Postby Salbei » 12 May 2011, 18:37

After 18 years of smoking (20-30cigs/day) i am willing to quit the bad habit now - usually been smoking a lot while working on the pc, so i won´t be doing much for a while (again :/ )

It is my first attempt to "quit",but i´m doing surprisingly well.
Been a Week now since my last cigarette and deep down in my mind there is still something "telling" me that i "need" to smoke. This is ridiculous.
Knew it is going to be rough, but expected it to be easier for me.

Hope i´ll stay strong.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby Salbei » 24 May 2011, 02:40

Things look fine. Got a lot of work to do recently but i think i´ll be able to return to this project soon.
ImageImage
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: [VB]Mordor Clone - my journey

Postby gaddlord » 28 Jan 2013, 23:08

Damn! It was my very first programming attempt more than a decade ago to have a Demise clone written in Delphi with Paradox db.

Here are some teasers from my Stone Cold - this is how I called my clone of Demise.

I have spend thousands of hours around the dungeon. This is the only game (apart from Magic) that I truly loved.

But then I hooked to Magic and started MTG Studio (http://www.mtgstudio.com) - a deck buildr and collection editing software which had been "eating" my time since then.

Image

Image

Image

Image

and a level editor

Image

---
"I hail you as I die"
http://www.mtgstudio.com
The Magic Deck and Collection Editor
User avatar
gaddlord
DEVELOPER
 
Posts: 13
Joined: 20 Jul 2008, 21:54
Location: Eastern Europe
Has thanked: 0 time
Been thanked: 3 times

Previous

Return to [VB]Mordor Clone

Who is online

Users browsing this forum: No registered users and 0 guests


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 0 guests

Login Form