Soul Bound (Open world dungeon crawl)

This is the place to post your own creative works for other to play or give feedback on!
Forum rules
This forum is for posting and collaborating upon third party work. Please do not post request-threads, and avoid posting artwork that is not your own unless it is being used as a reference.

Soul Bound (Open world dungeon crawl)

Postby that man » Mon Apr 14, 2014 2:26 am

This is a game idea I had, and I'm going to use the idea from the Soul Bound rpg (idea here) (won't impact roleplay, if I ever start it.
Spoiler (click to show/hide):

The Story
-Is the same as ours, just one most people never thought possible. True, they had heard of great ancient deities, powerful gods who could shape the Earth, and many knew that people often "prayed" to them, but those who thought more of it were called crazy. Why would a god form a contract with special humans who were capable of sustaining them through sacrifice and "devotion"? What sort of madman would claim that they would gain magical powers from such things? This is a modern day and age, above the superstitions of the past, beyond the existence of daemons and witches, and always pointing out the flaws in those ancient stories.

If only they knew yours.

The Characters
-You can make either a human or a bound soul, then team up with another character who is the opposite of you (human contractor with bound soul and bound soul with human contractor). Unless a bound soul and its contractor are in the same general area, neither can use magic.
Human contractors
-Humans go and live double lives, often right under the noses of their spouse. Generally, they will have another job (even if it's just a student) and life completely removed from this. However, no matter how much power a human may gather, they are still mortal and can die or be driven "insane".
Witch/Warlock
- Treats their bound spirit as equals, and come across as a jack of all trades. They are capable of preforming spells, but can have a hard time defending themselves. Witches/warlocks really don't have any set agenda, and individual members are free to do as they please.
Inquisitor/Exorcist
-These are the people who have become contractors, just so they can force other contractors to renounce theirs. While not very talented magic wise, they are very skilled at normal combat and countering spells.
Cultists/Acolytes
-A bit on the crazed side of things, cultists have incredibly powerful/unstable magic, and worship their bound souls as gods. Their goal is to convince all other contractors that the only thing they can do is submit to their bound soul's and serve them forever.
Bound Souls
-These have to be based off of a real life god/goddess/mythical creature, and their stats and abilities have to reflect this. However, unlike humans, a bound soul can't die or go "insane". If the human they are bound to at the time does do any of these things, then they are free to leave and bind with someone else.
Gods/Goddess
-As should be expected, these are the strongest of the Bound Souls, and are reflected in the major/minor gods/goddess of mythology. While they do offer great magical assistance, they often see themselves as above such petty things as physical combat (and, when they do help with physical combat, their skills have often dulled greatly).
Mythical creatures
-The succubus, dryads, elves, and magical animals of mythology. While not entirely skilled magically, they are able to help in much more "practical" ways.
Cryptids
-those creatures arising from urban legends and campfire tales. Focused more on physical combat, but still able to aid in lower spells.

What to have is what the pictures show:
Having a screen showing images of locations/people.
Text describing the interactions and nuances of a situation.
There being bars showing how alive, horny, experienced, and tired you are.
Having dungeons in things like labs, sewers, abandoned buildings, gated communities, citadels, and the like.
Open world area (...well, as open world as CoC(which may (or may not) have been an influence) or KoL).
Character customization, including the ability to become a Bound Soul slowly overtime, or simply ally themselves with Bound Souls (gives you more abilities, and can slowly change you).
...this is what I have:
Spoiler (click to show/hide):

<html>
<head>
<title>???</title>
</head>
<body>
<P>Slowly, your eyes open, as you find yourself in an incredibly dark room. <br>
You don't actually know where you are, aside from being on some sort of old bed,<br>
but it does seem vaugley familiar. <br>
More importantly, the back of your head kind of hurts, sort of like someone<br>
hit you with a sort of club.<br>
As you try to reach for the back of your head, you realize that one of your<br>
hands has been tied with your other hand behind your back.<br>
As you look down, you can vaugly make out your body...<br>
but it somehow feels...<br>
different.<br></p>
<p>You see:<br>
<a href="nothing.html">
boobs </a>
<br>
<a href="zip.html">
dick </a>
<br>
<a href="nadda.html">
...both? </a>
</p>
</body>
</html>

So, that is alpha build 0.00000000000000000000000000000000000000000000001
I'm going to work on getting it from...what it's at, to something resembling the Incredible and sexy test screens. Any and all feedback, comments, praise, death threats, questions, confusion, help, etc.
Thank you for putting up with all this text, and have a nice day.
Attachments
real screen.jpg
Sexy (functionless) test screen
Screen.jpg
incredible (functionless) test screen
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby Void Director » Mon Apr 14, 2014 3:00 am

that man Wrote:...this is what I have:
Spoiler (click to show/hide):

<html>
<head>
<title>???</title>
</head>
<body>
<P>Slowly, your eyes open, as you find yourself in an incredibly dark room. <br>
You don't actually know where you are, aside from being on some sort of old bed,<br>
but it does seem vaugley familiar. <br>
More importantly, the back of your head kind of hurts, sort of like someone<br>
hit you with a sort of club.<br>
As you try to reach for the back of your head, you realize that one of your<br>
hands has been tied with your other hand behind your back.<br>
As you look down, you can vaugly make out your body...<br>
but it somehow feels...<br>
different.<br></p>
<p>You see:<br>
<a href="nothing.html">
boobs </a>
<br>
<a href="zip.html">
dick </a>
<br>
<a href="nadda.html">
...both? </a>
</p>
</body>
</html>



So are you doing it JavaScript/HTML then? Personally have found AngularJS very useful in my text game projects. It does take some time to learn though. Organizing your code into modules with something like RequireJS is also a good idea (although I found require's documentation very confusing intially, took me awhile to get it).

I would also consider making your project open source and posting it on github (especially if you already know how to use git, if you don't it will be helpful later). This will allow you to easily get help on it.
Void Director
 
Joined: Thu Dec 19, 2013 4:18 am

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Mon Apr 14, 2014 3:58 am

Thanks for the tip. I have no idea how I'll get it to what I want, but it's at least a start. I still don't know what github is, though.
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby Void Director » Mon Apr 14, 2014 5:36 am

that man Wrote:Thanks for the tip. I have no idea how I'll get it to what I want, but it's at least a start. I still don't know what github is, though.

You probably don't need to worry about it for awhile then. Git is a revision control system. Basically it stores versions of your files. For example when working on a essay in Microsoft word you might copy paste the file and change its file name to something like "Essay Draft 1" then make a draft 2 and 3. Revision control systems give you more powerful tools to create versions of many files at once and do things like compare those files to older versions. Github is a place where git repositories are stored. It allows you to freely host open source software so that others can easily view your code.

I would wait until you have a working engine before worrying about any of that though.
Void Director
 
Joined: Thu Dec 19, 2013 4:18 am

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Mon Apr 14, 2014 12:23 pm

Well, I'll do that in the future then. As soon as I figure out how to make the basic engine, I'll try posting an unpdate, ok?
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Thu Apr 24, 2014 10:56 pm

Ok, I managed to make a VERY basic engine in javascript (no dialogue yet, and still working out some bugs), and I was hoping if someone else could run it because, if not, then I'll have to try a different language. If it does run, let me know, and I'll try to work with it from there.
edit:
It would seem that the program doesn't even load (or show it's code) properly...
I'm putting it in a readable form here for anyone who feels like helping me:
Spoiler (click to show/hide):

var players = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var player = new players(25, 500, 25, 100);

var monsters = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var lesser witch = new monsters(25, 250, 25, 100);
var goblin = new monsters(25, 100, 10, 100);
var lilith = new monsters(15, 500, 50, 100);

var names;

var randomnumber = Math.floor(Math.random(10)*10);

var selectedmonster;
if (randomnumber >= 0 && randomnumber < 3){
selectedmonster = lesser witch;
names = "lesser witch";
}
else if (randomnumber > 3 && randomnumber < 6){
selectedmonster = goblin;
names = "goblin";
}
else if (randomnumber > 6){
selectedmonster = lilith;
names = "lilith";
}

var battle = 1;
var monsterdead = 0;
var playerdead = 0;

var playerturn = 1;
var monsterturn = 0;
while (battle == 1){
//Player's Turn
while (playerturn == 1){
//Write Player Attack Script
selectedmonster.health = selectedmonster.health - Math.ceil(Math.random(player.attack)*10);
console.log(names + "'s Health is now " + selectedmonster.health);
selectedmonster.lust = selectedmonster.lust - Math.ceil (Math.random(Player.attraction)*10);
console.log(names + "'s Resitence is at " + selectedmonster.lust);
playerturn = 0;
monsterturn = 1;
}
while (monsterturn == 1){
player.health = player.health - Math.ceil(Math.random(selectedmonster.attack)*10);
console.log("Player's Health is now " + player.health);
player.lust = player.lust - Math.ceil (Math.random(selectedmonster.attraction)*10);
console.log(names + "'s Resitence is at " + player.lust);
playerturn = 1;
monsterturn = 0;
}
if (selectedmonster.health < 0){
monsterdead = 1;
battle = 0;
if (selectedmonster.lust < 0){
monsterhorny = 1;
battle = 0;
}
if (player.health < 0){
playerdead = 1;
battle = 0;
if (player.lust < 0){
monsterhorny = 1;
battle = 0;
}
}
Attachments
test game 000.js
(2.03 KiB) Downloaded 60 times
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby kvier » Thu Apr 24, 2014 11:42 pm

1- You can't put spaces in variable names ("lesser witch")
2- You probably need a little tiny stub html file to tell the browser to run the javascript, rather than simply display it
3- You've got mismatched {}s in the tests of the .health property
4- You've incorrectly referred to the player object as Player once
5- Currently you're doing the entire combat in one long while loop, which will hang the browser until it's done. You should use timers or something.
6- If you minify your javascript before you're completely done debugging it, it'll make it a lot more frustrating to debug it.
kvier
 
Joined: Mon Apr 23, 2012 7:46 pm

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Fri Apr 25, 2014 12:25 am

kvier Wrote:1- You can't put spaces in variable names ("lesser witch")
2- You probably need a little tiny stub html file to tell the browser to run the javascript, rather than simply display it
3- You've got mismatched {}s in the tests of the .health property
4- You've incorrectly referred to the player object as Player once
5- Currently you're doing the entire combat in one long while loop, which will hang the browser until it's done. You should use timers or something.
6- If you minify your javascript before you're completely done debugging it, it'll make it a lot more frustrating to debug it.

...so, pretty much, everything is wrong? Yeah, in all honesty, the number of ideas as to what I'm doing is next to 0, so, I'm at least glad for this wake up call. I've cleaned up most of those mistakes (I'll only post it again this soon if you want to double check), but I still can't find the mismatched .health property, how to launch it online (maybe) or a way to do the timer right.
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby kvier » Fri Apr 25, 2014 12:39 am

The mismatched {}s-
Code: Select All Code
if (selectedmonster.health < 0){
monsterdead = 1;
battle = 0;
*there should be a } here*
if (selectedmonster.lust < 0){
monsterhorny = 1;
battle = 0;
}
and there's another instance right below it.

If you want to distribute the game as a single file (e.g. as an attachment here), rather than an archive of things that will be unpacked and read locally or from a "real" webserver, you'll want to wrap your javascript with <html><head><script>*your existing javascript*</script></head></html>.

Firefox and Chrome both come with fairly powerful debuggers, so spending some time getting familiar with either of them would be useful. However, neither of them can un-minify javascript that's part of an html page, so either split it out (<script src="file_containing_javascript.js"></script>) or ... don't minify it?

For timers, try reading MDN's documentation: https://developer.mozilla.org/en-US/doc ... ipt/Timers
kvier
 
Joined: Mon Apr 23, 2012 7:46 pm

Re: Soul Bound (Open world dungeon crawl)

Postby BlueLight » Fri Apr 25, 2014 4:24 am

So i'm kinda thinking i should release my engine when i get done with it. These problems are stuff i've already doing in unity.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Mon Apr 28, 2014 9:46 pm

Ok, well I've managed to mess around with the code some more, but I still can't get it to work right. This one here is devoid of timers (since I still don't get how to set those), and should be fixable
Spoiler (click to show/hide):

<HTML>
<HEAD>
<SCRIPT>
var players = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var player = new players(25, 500, 25, 100);

var monsters = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var lesser_witch = new monsters(25, 250, 25, 100);
var goblin = new monsters(25, 100, 10, 100);
var lilith = new monsters(15, 500, 50, 100);

var names;

var randomnumber = Math.floor(Math.random(10)*10);

var selectedmonster;
if (randomnumber >= 0 && randomnumber < 3){
selectedmonster = lesser_witch;
names = "Lesser Witch";
}
else if (randomnumber > 3 && randomnumber < 6){
selectedmonster = goblin;
names = "Goblin";
}
else if (randomnumber > 6){
selectedmonster = lilith;
names = "Lilith";
}

var battle = 1;
var monsterdead = 0;
var playerdead = 0;
var monsterhorny = 0;
var playerhorny = 0;

var playerturn = 1;
var monsterturn = 0;
while (battle == 1){

while (playerturn == 1){

selectedmonster.health = selectedmonster.health - Math.ceil(Math.random(player.attack)*10);
console.log(names + "'s Health is now " + selectedmonster.health);
selectedmonster.lust = selectedmonster.lust - Math.ceil (Math.random(Player.attraction)*10);
console.log(names + "'s Resitence is at " + selectedmonster.lust);
playerturn = 0;
monsterturn = 1;
}
while (monsterturn == 1){
player.health = players.health - Math.ceil(Math.random(selectedmonster.attack)*10);
console.log("Player's Health is now " + players.health);
player.lust = players.lust - Math.ceil (Math.random(selectedmonster.attraction)*10);
console.log(names + "'s Resitence is at " + players.lust);
playerturn = 1;
monsterturn = 0;
}
if (selectedmonster.health < 0){
monsterdead = 1;
battle = 0;
}
if (selectedmonster.lust < 0){
monsterhorny = 1;
battle = 0;
}
if (players.health < 0){
playerdead = 1;
battle = 0;
}
if (players.lust < 0){
playerhorny = 1;
battle = 0;
}
}
</SCRIPT>
</HEAD>
</HTML>

Aside from that, should I focus on getting the battle engine running, or something else?
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby BlueLight » Mon Apr 28, 2014 9:57 pm

GAH!!!!! Can't read, not indented. Must waste life fixing problem.



that man Wrote:
Spoiler (click to show/hide):

<HTML>
<HEAD>
<SCRIPT>
var players = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var player = new players(25, 500, 25, 100);

var monsters = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var lesser_witch = new monsters(25, 250, 25, 100);
var goblin = new monsters(25, 100, 10, 100);
var lilith = new monsters(15, 500, 50, 100);

var names;

var randomnumber = Math.floor(Math.random(10)*10);

var selectedmonster;
if (randomnumber >= 0 && randomnumber < 3){
selectedmonster = lesser_witch;
names = "Lesser Witch";
}
else if (randomnumber > 3 && randomnumber < 6){
selectedmonster = goblin;
names = "Goblin";
}
else if (randomnumber > 6){
selectedmonster = lilith;
names = "Lilith";
}

var battle = 1;
var monsterdead = 0;
var playerdead = 0;
var monsterhorny = 0;
var playerhorny = 0;

var playerturn = 1;
var monsterturn = 0;
while (battle == 1){

while (playerturn == 1){

selectedmonster.health = selectedmonster.health - Math.ceil(Math.random(player.attack)*10);
console.log(names + "'s Health is now " + selectedmonster.health);
selectedmonster.lust = selectedmonster.lust - Math.ceil (Math.random(Player.attraction)*10);
console.log(names + "'s Resitence is at " + selectedmonster.lust);
playerturn = 0;
monsterturn = 1;
}
while (monsterturn == 1){
player.health = players.health - Math.ceil(Math.random(selectedmonster.attack)*10);
console.log("Player's Health is now " + players.health);
player.lust = players.lust - Math.ceil (Math.random(selectedmonster.attraction)*10);
console.log(names + "'s Resitence is at " + players.lust);
playerturn = 1;
monsterturn = 0;
}
if (selectedmonster.health < 0){
monsterdead = 1;
battle = 0;
}
if (selectedmonster.lust < 0){
monsterhorny = 1;
battle = 0;
}
if (players.health < 0){
playerdead = 1;
battle = 0;
}
if (players.lust < 0){
playerhorny = 1;
battle = 0;
}
}
</SCRIPT>
</HEAD>
</HTML>



Hell with those HeadTags.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Soul Bound (Open world dungeon crawl)

Postby BlueLight » Mon Apr 28, 2014 10:01 pm

Sorry for the double post but the last post is to long that constant editing was not viable.
i'm being strict about things you likely don't care about right now but i have to be strict if your going to improve.

Spoiler (click to show/hide):

okay so looking at your code i see something strange.
var players = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var player = new players(25, 500, 25, 100);

var monsters = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};



what are you copying code. What is so different that you need 2 methods that do exactly the same thing?
Sorry for being an ass but this in the 21st century and this is important. You should be reducing redundancies in your code. Let me put it this way, a college near me will fail you if any code repeats.

var lesser_witch = new monsters(25, 250, 25, 100);
var goblin = new monsters(25, 100, 10, 100);
var lilith = new monsters(15, 500, 50, 100);


I think this will a problem but if your just copying the values then i don't think so. I'd likely use a array of monsters and add a name variable.

var randomnumber = Math.floor(Math.random(10)*10);


what the hell is a randomnumber? There should be some way for you to clearly label variables and method/functions in your program. The naming convention for Java would be "randomNumber". It follows the idea that variables are all lowercase except in (special cases) and (with the first letter of words except first character). I litterally see ran and then everything after is goop at a glace.


Why are you using a integer to check your while loop?
unless your language doesn't allow it, you should be able to do the following.
Code: Select All Code
boolean inBattle = true;
while(inBattle){}// or while(inBattle == true){}



Finally.... Where are your comments young man!
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Mon Apr 28, 2014 10:43 pm

BlueLight Wrote:Sorry for the double post but the last post is to long that constant editing was not viable.
i'm being strict about things you likely don't care about right now but i have to be strict if your going to improve.

Spoiler (click to show/hide):

okay so looking at your code i see something strange.
var players = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};

var player = new players(25, 500, 25, 100);

var monsters = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};



what are you copying code. What is so different that you need 2 methods that do exactly the same thing?
Sorry for being an ass but this in the 21st century and this is important. You should be reducing redundancies in your code. Let me put it this way, a college near me will fail you if any code repeats.

var lesser_witch = new monsters(25, 250, 25, 100);
var goblin = new monsters(25, 100, 10, 100);
var lilith = new monsters(15, 500, 50, 100);


I think this will a problem but if your just copying the values then i don't think so. I'd likely use a array of monsters and add a name variable.

var randomnumber = Math.floor(Math.random(10)*10);


what the hell is a randomnumber? There should be some way for you to clearly label variables and method/functions in your program. The naming convention for Java would be "randomNumber". It follows the idea that variables are all lowercase except in (special cases) and (with the first letter of words except first character). I litterally see ran and then everything after is goop at a glace.


Why are you using a integer to check your while loop?
unless your language doesn't allow it, you should be able to do the following.
Code: Select All Code
boolean inBattle = true;
while(inBattle){}// or while(inBattle == true){}



Finally.... Where are your comments young man!

...it's because I really have no idea how to program? I mean, I can set up rooms and dialogues just fine, but I was just sort of shooting in the dark here. Heck, most of this code is just from templates and outdated books, and the repetitiveness came more from inexperience.
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby Zeus Kabob » Mon Apr 28, 2014 10:46 pm

BlueLight Wrote:
var randomnumber = Math.floor(Math.random(10)*10);


what the hell is a randomnumber? There should be some way for you to clearly label variables and method/functions in your program. The naming convention for Java would be "randomNumber". It follows the idea that variables are all lowercase except in (special cases) and (with the first letter of words except first character). I litterally see ran and then everything after is goop at a glace.


You shouldn't be telling people that they're wrong for using a different naming convention from you.

that man Wrote:...it's because I really have no idea how to program? I mean, I can set up rooms and dialogues just fine, but I was just sort of shooting in the dark here. Heck, most of this code is just from templates and outdated books, and the repetitiveness came more from inexperience.

That's fine, there's always time to learn. Take it easy, use lots of tutorials, and be willing to experiment. I can't tell you how many times a program was easier because I tried some crazy thing I didn't think would work.

If you're having trouble finding tutorials to teach you the theory behind the data structures, functions, variables, and other things you're dealing with, you can try to find good descriptions of those things on Wikipedia or through tutorials for other similarly implemented programming languages.
User avatar
Zeus Kabob
Moderator
 
Joined: Tue Nov 16, 2010 2:16 am
Location: Between some awesome thunderheads

Re: Soul Bound (Open world dungeon crawl)

Postby kvier » Mon Apr 28, 2014 11:01 pm

The only reason I could find that your most recent post didn't run was that you had Player instead of player on line 56. After I change that, firefox's debugger does give me a long stream of intended messages in the log when I reload.

There are a few other issues (e.g. on line 65 you use the variable names instead of the string "Player's"), but you should be able to find them once you have it running.
kvier
 
Joined: Mon Apr 23, 2012 7:46 pm

Re: Soul Bound (Open world dungeon crawl)

Postby BlueLight » Mon Apr 28, 2014 11:33 pm

that man Wrote:
BlueLight Wrote:Sorry for the double post but the last post is to long that constant editing was not viable.
i'm being strict about things you likely don't care about right now but i have to be strict if your going to improve.

Spoiler (click to show/hide):

okay so looking at your code i see something strange.
var players = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};



var player = new players(25, 500, 25, 100);

var monsters = function(attack, health, attraction, lust){
this.health = health;
this.attack = attack;
this.attraction = attraction;
this.lust = lust;
};



what are you copying code. What is so different that you need 2 methods that do exactly the same thing?
Sorry for being an ass but this in the 21st century and this is important. You should be reducing redundancies in your code. Let me put it this way, a college near me will fail you if any code repeats.

var lesser_witch = new monsters(25, 250, 25, 100);
var goblin = new monsters(25, 100, 10, 100);
var lilith = new monsters(15, 500, 50, 100);


I think this will a problem but if your just copying the values then i don't think so. I'd likely use a array of monsters and add a name variable.

var randomnumber = Math.floor(Math.random(10)*10);


what the hell is a randomnumber? There should be some way for you to clearly label variables and method/functions in your program. The naming convention for Java would be "randomNumber". It follows the idea that variables are all lowercase except in (special cases) and (with the first letter of words except first character). I litterally see ran and then everything after is goop at a glace.


Why are you using a integer to check your while loop?
unless your language doesn't allow it, you should be able to do the following.
Code: Select All Code
boolean inBattle = true;
while(inBattle){}// or while(inBattle == true){}



Finally.... Where are your comments young man!

...it's because I really have no idea how to program? I mean, I can set up rooms and dialogues just fine, but I was just sort of shooting in the dark here. Heck, most of this code is just from templates and outdated books, and the repetitiveness came more from inexperience.


don't worry about. As I said I'm being harsh. Just consider this a wake up call for what your code itself needs.

Edit
Zues I never complained about different naming convention but a lack of one.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Mon Apr 28, 2014 11:58 pm

The problem is, I have an Idea of what I want the code to do, have half an idea what the code has to look like to do it, but no real idea how to implement it. I'll look at tutorials to get a good idea of how to fix these problems, but I have no idea how long that will take. In the mean time, a prototype (in paint, I was going to do some scanned in ones, but my scanner been acting up).

kvier Wrote:The only reason I could find that your most recent post didn't run was that you had Player instead of player on line 56. After I change that, firefox's debugger does give me a long stream of intended messages in the log when I reload.

There are a few other issues (e.g. on line 65 you use the variable names instead of the string "Player's"), but you should be able to find them once you have it running.

Can I see those messages?
Attachments
witch proto 1.png
Possible witch prototype (may be named later on)
witch proto 1.png (6.08 KiB) Viewed 13192 times
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Re: Soul Bound (Open world dungeon crawl)

Postby kvier » Tue Apr 29, 2014 8:32 pm

In firefox-
Tools / Web developer / Web Console
When your code doesn't work, for whatever reason, open the debugger:
Tools / Web developer / Debugger
and then reload the page.

In chrome,
≡ / Tools / Javascript console
kvier
 
Joined: Mon Apr 23, 2012 7:46 pm

Re: Soul Bound (Open world dungeon crawl)

Postby that man » Tue Apr 29, 2014 11:17 pm

kvier Wrote:In firefox-
Tools / Web developer / Web Console
When your code doesn't work, for whatever reason, open the debugger:
Tools / Web developer / Debugger
and then reload the page.

In chrome,
≡ / Tools / Javascript console

...I don't know what I'm doing differently with my code, but it still won't run...
that man
 
Joined: Sat Jul 28, 2012 5:07 pm

Next

Return to Creative Corner



Who is online

Users browsing this forum: No registered users