Page 1 of 1

DriftWurld Traders

Posted: Fri Oct 18, 2013 9:11 am
by Callan S.
Working on this once again, writing the code from scratch, thanks to Hall's giving me somewhere to host it, which encourages me to continue. Talked about the general idea over here.

Thought I'd give updates here, on what new things in its design I'm chewing over.

Right now I'm thinking that the very basic of basic trade commodities is the food your character needs to survive - I'm thinking only sometimes does a village have someone who wants something sent to the next village. Maybe even sometimes they want it sent to the village you just left, which doesn't help your overall progression! Anyway, since it's only sometimes, you may very well starve while traveling in between villages, looking for/hoping for labour work in the next village.

The game is a bit like an infinite runner game (but its a text based browser where you refresh the page) so you want to go as far as possible. And you can starve to death - thus ending your trade run.

So that's what I'm chewing over at the moment.

Re: DriftWurld Traders

Posted: Wed Oct 23, 2013 3:04 am
by Jackolantern
Sounds interesting, and glad to see you are re-invigorated on it. Keep us posted! :cool:

Re: DriftWurld Traders

Posted: Thu Oct 24, 2013 12:21 am
by Callan S.
Thanks, Jack!

I'm currently musing both on how to do goods - whether to revive the method I used last time (which I've largely forgotten and would have to research from my old code) or invent a new simple and elegant version.

Also about inventing a whole new aspect to the setting that just isn't in the books the game draws some small amount of inspiration from. In the setting monsters do hundreds of points of damage while you start out with 25 or so, while body armour is freakishly expensive. I'm thinking of adding mystic charms that block some of the monsters melee attacks. But it's not really part of the setting. But it would, however, work out quite neatly.

Re: DriftWurld Traders

Posted: Wed Nov 06, 2013 6:46 am
by Callan S.
Working on how damage bleeds through right now.

The setting is unusual - even a basic monster does 1D4*100 damage! (fortunately at this stage this is the worst you can run into!)

You start off with around 24 hp!! Yes!

But there are wardcharms you can get by working at villages - up to 300 points worth. Though you take 1 damage for every 20 points of wards destroyed.

Then you can get armour, which both has it's own HP and can be reinforced with up to 100 hp. Again, if the reinforced part takes 20 points, you take 1 point. High rolls get past the armours HP and go straight to the reinforced hp.

So right now I'm coding the bleed through effect, from armour, to charms, to reinforced stats, with bleedthrough, to HP.

Re: DriftWurld Traders

Posted: Wed Nov 06, 2013 4:13 pm
by Jackolantern
Callan S. wrote:Working on how damage bleeds through right now.

The setting is unusual - even a basic monster does 1D4*100 damage! (fortunately at this stage this is the worst you can run into!)

You start off with around 24 hp!! Yes!

But there are wardcharms you can get by working at villages - up to 300 points worth. Though you take 1 damage for every 20 points of wards destroyed.

Then you can get armour, which both has it's own HP and can be reinforced with up to 100 hp. Again, if the reinforced part takes 20 points, you take 1 point. High rolls get past the armours HP and go straight to the reinforced hp.

So right now I'm coding the bleed through effect, from armour, to charms, to reinforced stats, with bleedthrough, to HP.
Just be careful because unless you lead players by the nose to these wards, they are going to just "create character --> run fight something" and get annihilated haha

Re: DriftWurld Traders

Posted: Wed Nov 06, 2013 8:06 pm
by Callan S.
Yah, but I'd probably aim for a darksouls level of guidance!

Re: DriftWurld Traders

Posted: Mon Nov 18, 2013 12:58 am
by Callan S.
Hey, I'm not very familiar with functions.

I want to add up encumberance at various points in the code.

But it seems like functions only work with values you pass to them - passing all the weights to be added up would be almost as long in code as just repeating some adding up code.

I was going to use an include statement and keep the encumberance calculation on a seperate page. Does function suit me, or should I just go with include?

Re: DriftWurld Traders

Posted: Mon Nov 18, 2013 8:41 am
by MikuzA
Callan S. wrote:Hey, I'm not very familiar with functions.

I want to add up encumberance at various points in the code.

But it seems like functions only work with values you pass to them - passing all the weights to be added up would be almost as long in code as just repeating some adding up code.

I was going to use an include statement and keep the encumberance calculation on a seperate page. Does function suit me, or should I just go with include?
Can you give an example on how you were going to repeat this? Since Functions should be used if you want to handle the data passed to it in several ways and perhaps output it back.

And by using functions you protect your future development by doing minor changes that affects the whole game, instead of doing massive find-replace changes for the same.

Re: DriftWurld Traders

Posted: Tue Nov 19, 2013 12:07 am
by Callan S.
True, but by using include, I can just modify the seperate php file to make multiple changes.

I need to use it on each page refresh and then again after any purchases or sales, since that lightens or increases encumberance.

Basically it adds up ten inventory values and a few other values and works out encumberance. Include is handy, since I can use any value I use in it in another part of the program (granted this can have drawbacks, but here it's advantagious)

Re: DriftWurld Traders

Posted: Tue Nov 19, 2013 8:35 pm
by hallsofvallhalla
are these not coming from a query? You only need to pass the main array as in

Code: Select all

public function DoSomething($playerinfo3)
{
var Strength = $playerinfo3['Strength'];
}
Notice how I used C#, Javascript, and PHP in that snippet. Muhahahahaha