Remove this ad

Lead

Dec 4 09 10:59 AM

Tags : :

EDITTED (4/16/10)

PROJECT STATUS: On Hold, need more team members to continue, flirting with converting this game to a new framework (XNA 3.1, and into C#.Net language)

Current Information:
Platform: .Net Framework 3.5 (Windows XP, Vista, win7)
Language: VB.Net
Current Team Members: Lonely old me

MODULE COTWENGINE Class Objects:
COTW_Engine
COTW_Level
COTW_EventArgs
COTW_Element
COTW_Player
COTW_Item
COTW_ItemContainer
COTW_Container
COTW_ItemType
COTW_ItemGraphic
COTW_TileGraphic
COTW_Tile
COTW_TileEvent
COTW_TileMap
COTW_TileArray
COTW_Room
COTW_Building

COTW_Main_Form Description
Right now, COTW_Main_form.vb starts and passes a reference to itself to a COTW_Engine object. That object adds the appropriate interface, sets it up and adds the handlers for the controls.

I think this process should be broken down into an array of handler references so the software can easily parse the collection and remove them and then rebuild it when controls change.

ctlInventory Description
I am working on the inventory interface, which is also the store interface. I am going to bring it to the front and put it over top of the game interface, disable the engine gdi object while the inventory actions itself may cause events to occur in the game. I have to fully define the functionality before I finish.
Basically, if you put an object away, that takes so many seconds, if you equip something, so many seconds, moving and attacking take so many seconds. Etc.
Of course the attacking system needs finished first

Latest update notes:
No downloadable version available at this time.
Just started adding in game content, XML thread has been added here is download links for the tilemap file:
http://www.firesickle.com/images/items.png

Screenshot of current project:
http://www.firesickle.com/images/ss_cotw.png
image

http://www.firesickle.com/

Quote    Reply   
Remove this ad
Remove this ad
avatar

Theta

Manticore

Posts: 299

#3 [url]

Dec 4 09 5:40 PM

Re: Remake Technical Design Workthread

seancampbell wrote:
Tyhm started the thread. http://cotw.11.forumer.com/viewtopic.php?p=1190#1190


Unfortunately, Tyhm's stuff just went missing about 15 minutes ago due to his account being inactive.

I sure hope he is still around.

Quote    Reply   
avatar

Gil

Manticore

Posts: 317

#5 [url]

Dec 4 09 7:19 PM

I copied one of them, then when I thought, let's copy them all, the thing dissapears .

Time to get my reshacker and get them myself I guess.


That reminds me, I have a surprise!

Quote    Reply   

#6 [url]

Dec 6 09 5:01 PM

Here is some quotes from a calculations thread:


http://cotw.11.forumer.com/viewtopic.php?t=49



his post is probably a bit late but looking at the frequency of posts it probably doesn't matter much. But anyway if anyone still cares here's how it works. There really isn't a formula for solving for what the max hp should be since it's pretty much a random gain each level. Anyway here's what happens on level up.

//For the purpose of this psuedo code rand() returns a random number
//between the two parameters including the parameters in the range
hpGain = rand(4,
manaGain = rand(2,5)
if(con > 56) hpGain += (con - 56) / 4
else if(con < 32) hpGain -= (32 - con) / 4
if(hpGain < 1) hpGain = 1
if(int > 64) manaGain += (int - 64) / 3
else if(int < 32) manaGain -= (32 - int) / 4
if(manaGain < 1) manaGain = 1

The game does not keep track of gains at level up so if you lose a level the losses are also random. Oddly enough the loss ranges aren't quite the same.

hpLoss = rand(4,
manaLoss = rand(1,4)
if(con > 56) hpLoss += (con - 56) / 4
if(int > 64) manaLoss += (int - 64) / 4


So from what it looks like you have a smaller mana loss random range on deleveling than the gain on a level. So if you level and delevel your mana is likely to go up especially with a high int since the gain is divided by 3 for high int and the loss is divided by 4 on high int. Probably an artifact from the author changing the gains but forgetting to update the losses .

And for the stat bonuses. factor is a param that is either 1, or -1 depending on if the game is
str > 60 : todam += (str - 60) / 4
str < 32 : todam -= (32 - str) / 4
dex > 56 : ac += dex - 56
dex < 32 : tohit -= 32-dex
dex > 60 : tohit += dex - 60
dex < 32 : ac -= 32-dex

base weight max = 25000
str < 32 : weightMax -= (32 - str) * 500;
str > 48 : weightMax += (str - 4 * 1000;

weight < weightMax/2 : movespeed = 50;
weight >= weightMax/2 : movespeed = 50 + (weight - weight



Tyhm
-------------------------------
Brain hurts...
CotW2: New Character, it comes across as 50 points default for all 4 stats and 50 points to spend...which means that if it was 45s across the board it'd be 70 points default to spend...still 100 points max...
Also disturbingly, 75% doesn't reach the 3/4 bar...Razz


WARNING: this will explode your head if you try and make it work.

the bottom bar is 20%. It is 5 5-point clicks from the middle bar, which is 45%. The top bar is 72%; it is 6 5-point clicks from the middle bar, but it shaves off the last 3% on the last click. If you click DOWN 6 times from the top bar you wind up Below the 45% bar.

Arrrg! No wonder it wasn't clicking right! And here I was trying to find a formula for a linear function such that 20% of the bar size would be at 23, 45% at 55, and 75% at 90...

Also you can have stats of 60/60/55/55 (tested as distance above bottom bar of 40/40/35/35), meaning if you had 45s across the board you'd start with 50 points of Available...and the graph seems to support this theory....maybe I just have a weird-ass version of CotW, it SAYS 1.1A...

http://www.firesickle.com/

Quote    Reply   

#7 [url]

Dec 7 09 10:35 AM

http://strategywiki.org/wiki/Castle_of_the_Winds

Located this wiki today, haven't had time to dive in and digest all of the information that is there, but Wiki's like this will be a great aid in getting all of the required content in the scope before development starts.

http://www.firesickle.com/

Quote    Reply   

#8 [url]

Dec 8 09 12:51 AM

I wrote my own tool to rip the resource data from the exes and got the text, bitmaps, icons, and cursors. Had it convert all the image data to pngs and for the icons and cursors applied their masks to the alpha layer of their pngs. I haven't applied the masks for the bitmaps because there was no algorithmic way for me to know the associations. I didn't have names for the resources so everything is just numbered. If anyone wants to do some clean up work feel free!

http://www.byond.com/members/Theodis/files/CotW/CotWResources.zip

Quote    Reply   

#9 [url]

Dec 8 09 9:03 AM

Theodis, I am officially in love with you.

Haha, this is awesome!!!! I just got done diving through all of the Icons folders. I verified that all of the images have 2 versions (the Odd number starting at 0 is a Black and white version, and the Even number has color). What is the purpose of the Black and White ones? Is that the mask you were talking about?

http://www.firesickle.com/

Quote    Reply   

#10 [url]

Dec 8 09 12:24 PM

Nah the game just included black and white icons for achromatic displays. The mask is a separate bitmap which says which areas of an image are see through and which aren't and used in an old school technique for drawing images with see through sections quickly(http://www.winprog.org/tutorial/transparency.html). I simply took each icons mask and used them to build an alpha layer for the icons so it's automatically included in the png.

If you look in the bitmaps at the dragon beathes and explosions you'll see two copies of each one in color and another in black and white which shows the "solid" areas. Those are the masks.

Quote    Reply   
Remove this ad

#11 [url]

Dec 9 09 2:25 PM

Ok. I started building the TileMap / Level generation. I created a Tiles.Png file, and load it into a TileMap class object I wrote (it will keep the tiles image loaded in memory and provide a function that will grab any tile off of it and return it by either Tile # or Tile Col,Row)

Here is a screen shot of what it looks like at the moment... The loaded level is 50 by 50, but I don't have the scroll bar part built yet, so you only see what is displayed. Each area in the display Sizes appropriately when you adjust the Form size.

NOTE: THERE ARE NO DESIGN ELEMENTS ON FORM1, the only code that resides on FORM1 is this:


Dim COTWENG As COTW_ENGINE

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
COTWENG = New COTW_ENGINE(Me)
End Sub


Heres a screen shot of what it looks like right now: (remember, this level was loaded with random TileNumbers, It has the capability to load levels from Text Data (comma and LineFeed separated values). The tiles.png file is also in this screenshot
image

I will be working on making this a tad more robust / getting scroll bars functioning / loading the player / allowing the player to move next... Not sure how long it will take for me to post my next update.

Once this work is done, I will be editting the top most post to provide clearer details. I will continue to post updates as replys, and append the major notes in the top most post (incase anyone is watching this thread for notifying)[/img]

http://www.firesickle.com/

Quote    Reply   
avatar

Gil

Manticore

Posts: 317

#12 [url]

Dec 9 09 4:13 PM

What graphics library are you using? I'm playing around with DirectX right now. I'm working on getting the tile map ready too.

Have you thought about the way the scrollbars work in CotW? I'd like to have the scrolling the level through the scrollbars thing, but I'm not sure if it's doable in .net.

Quote    Reply   

#13 [url]

Dec 9 09 4:29 PM

Gil wrote:
Have you thought about the way the scrollbars work in CotW? I'd like to have the scrolling the level through the scrollbars thing, but I'm not sure if it's doable in .net.


Huh? Not sure what the problem would be with doing it in .NET would be. Just use the scroll bar values as the view port offsets when drawing. Even simple enough to have it smooth scrolling and update as you drag the scroll bar positions since computers are more than powerful enough now even using GDI+ for those graphics .

Quote    Reply   

#14 [url]

Dec 9 09 4:35 PM

@Theodis: Agree'd, I have to write the handling code for it myself, but adding Vertical and Horizontal scrollbars and using the values from them is going to be less than 100 lines of code most likely.

Gil wrote:
What graphics library are you using? I'm playing around with DirectX right now. I'm working on getting the tile map ready too.

Have you thought about the way the scrollbars work in CotW? I'd like to have the scrolling the level through the scrollbars thing, but I'm not sure if it's doable in .net.

I am using a PictureBox control, so standard Windows Components (gdi, whatever, i don't worry about terminology myself)...
I am going to be inheritting from the PictureBox to add in the scrollbars / centering / probably will wrap in some display rending features to make it leaner if it seems to be slow.

http://www.firesickle.com/

Quote    Reply   
avatar

Gil

Manticore

Posts: 317

#15 [url]

Dec 9 09 4:36 PM

The problem is not graphics wise, the problem is updating a scrollbar. You can catch the scrollbar events, so you can scroll the level as the scrollbars move.

The other way round is the problem, moving the scrollbar after you scrolled the screen through other means can be a bitch in .net.

Quote    Reply   

#17 [url]

Dec 9 09 4:48 PM


Gil Says:
The problem is not graphics wise, the problem is updating a scrollbar. You can catch the scrollbar events, so you can scroll the level as the scrollbars move.

The other way round is the problem, moving the scrollbar after you scrolled the screen through other means can be a bitch in .net.


This is extremely common though, most things (in my experience) do not function how you want it out of the box. Making the scrollbars update when the display changes should be really simple, a call to a subroutine called Update_Controls will happen when the user does certain things (like openning the inventory, moving, center the display, viewing the map) stuff like that

http://www.firesickle.com/

Quote    Reply   

#18 [url]

Dec 9 09 5:17 PM

Gil wrote:
The other way round is the problem, moving the scrollbar after you scrolled the screen through other means can be a bitch in .net.


Huh? As far as I remember the scroll bar's Value property has both get and set methods. You could quite easily use them exclusively for viewport location data and directly set them according to player movement and it'll raise the proper scrollbar events triggering a redraw if you've set up the scroll bars to trigger a redraw on value change.

Anyway I'm still hanging out in the IRC channel if anyone wants to discuss this there . I just leave it running on all the time so depending on the time of day you join I may be AFK.

Quote    Reply   
avatar

Gil

Manticore

Posts: 317

#19 [url]

Dec 9 09 5:39 PM

Yeah, I was wrong. I've found it now. I used to do it with AutoScroll scrollbars, but I switched to a UserControl with HScrollbar and VScrollbar.

Enough derailing of this thread though...

Quote    Reply   

#20 [url]

Dec 10 09 1:21 AM

Here we go...

I tried to get it working pretty optimally, it is sufficient for now, but I feel that I can cut even more corners soon.

image

http://www.firesickle.com/files/COTW_Project_One.zip

http://www.firesickle.com/

Quote    Reply   
Remove this ad
Add Reply

Quick Reply

bbcode help