Help with my new game

Protodermis
02 Jul 2014, 13:16
Hi guys
Could some of you please help me/tell me how to fix some problems I'm having while creating my game "Wazled"?
For example: In my game, I have 2 trolls in a bedroom. There is a sword on the floor, to kill the trolls. So once the player types "kill troll" or "attack troll", the script I made is "print a message", that says that the troll is dead. I was told in the other topic I posted that if you then "Look at troll", the message appears again, making the trolls alive again. And when the player picks up the sword that's on the floor, they pick it up and there's a message (I made) saying "The sword is in your hand.", but if they examine the room again, and the description comes up again, the message says that the sword in on the floor, but the sword can't be both on the floor AND in your hand. These are just a few issues I'm having.
If you want to play my game and check out the problems yourself: http://textadventures.co.uk/games/view/ ... uva/walzed

If you want to see the problems other people have been having while playing my game in my other topic:
viewtopic.php?f=5&t=4438

Thanks!
Protodermis

P.S. This is my first game: don't criticize me.

HegemonKhan
02 Jul 2014, 14:30
(from another thread), here's an explanation on flags (boolean attributes):

HegemonKhan wrote:each flag~boolean is independant ~ mutually exclusive, one flag has no code impact upon another flag, though you may have a conceptual conflict,

----------

Attribute (save'able, and thus load'able~can be used anywhere, so long as the Object that it's attached to, still exists of course):

Object_name.Attribute_name = Value_or_Expression

Variable (ONLY usable within its own script, can NOT use it anywhere, as it is not attached to an Object):

Variable_name = Value_or_Expression

A Boolean~flag is a String Attribute (but you set it's Attribute Type to: boolean, if using the GUI~Editor or coding in its tag block) with its Value set as: false_or_true

Object_name.Attribute_name = false
Object_name.Attribute_name = true

about flags (Boolean Attributes):

orc.dead = false (switched off) -> conceptually: orc is alive
orc.dead = true (switched on) -> conceptually: orc is dead
orc.alive = true (switched on) -> conceptually: orc is alive
orc.alive = false (switched off) -> conceptually: orc is dead

orc.male = true (switched on) -> conceptually: orc is a male
orc.male = false (switched off) -> conceptually: orc is a female
orc.female = true (switched on) -> conceptually: orc is a female
orc.female = false (switched off) -> conceptually: orc is a male

orc.male = true (switched on) and orc.female = true (switched on) -> conceptually: orc is both male and female
orc.male = true (switched on) and orc.female = false (switched off) -> conceptually: orc is a male
orc.male = false (switched off) and orc.female = true (switched on) -> conceptually: orc is a female
orc.male = false (switched off) and orc.female = false (switched off) -> conceptually: orc is neither male nor female

orc.dead = true (switched on) and orc.alive = true (switched on) -> conceptually: orc is both dead and alive: no quest error, but it is a conceptual conflict obviously
orc.dead = true (switched on) and orc.alive = false (switched off) -> conceptually: orc is dead
orc.dead = false (switched off) and orc.alive = true (switched on) -> conceptually: orc is a alive
orc.dead = false (switched off) and orc.alive = false (switched off) -> conceptually: orc is neither dead nor alive: no quest error, and only possibly a conceptual conflict (if organic~biological, but not if inorganic~machine)

------

usage of booleans~flags (the 'if'' Script + Flags~Boolean Attirbutes):

<object name="orc">
<inherit name="editor_object" />
<attr name="dead" type="boolean">false</attr>
<attr name="fight" type="script">
if (orc.dead = true) {
msg ("The orc is already dead, silly.")
} else if (orc.dead = false) {
orc.dead = true
msg ("You kill the orc.")
}
</attr>
</object>


--------------

explanation of "algebraic substitution string matching" that is used for a lot of coding (including Boolean~flag usage):

orc.dead = false
orc.dead = true

if (orc.dead = true) {
// if (false = false) {
-> // then do this: script 1
} else if (orc.dead = true) {
// } else if (true = true) {
-> // then do this: script 2
}

y = "x + 5"
y = "x^2 - 8"

if (y = "x +5") {
// if ("x + 5" = "x + 5") {
-> // then do this: script 1
} else if (y = "x^2 - 8") {
// } else if ("x^2 - 8" = "x^2 - 8") {
-> // then do this: script 2
}


----------

as to the sword... did you add a script (MoveObject) that moves the sword from the room or object (ie 'floor'), into the player's inventory (onto, well actually, into the player) ???

--------

you can do like 90% of everything that is possible with just these two super scripts:

the "if" Script:

run as script -> add a script -> scripts -> if -> (set it up: see below)

the 'set a variable or attribute' Script:

run as script -> add a script -> variables -> set a variable or attributes -> (set it up: see below)

_____ (Object) -> Attributes (Tab) -> Attributes -> Add -> (set it up, see below)

(Object: _____)
Attribute Name: _______
Attribute Type: _____ (string, integer, double~float~floating point~decimal numbers, boolean~flag, script, object, lists, dictionaries)
Attribute Value: ______ (but, your Value is based upon the type you choose)

Attribute:

Object_name.Attribute_name = Value_or_Expression

examples:

HK.strength_integer = 100
orc.dead_boolean = false
HK.favorite_color_string = "black"
HK.favorite_color_stringlist = split ("black;red", ";")
HK.damage = HK.weapon.damage + HK.weapon.damage * (HK.strength - orc.endurance)

Variable:

Variable_name = Value_or_Expression

examples:

handled = false
result = _______
value = _______
you_go_first = false
count = 0
count = count + 1

------------------------------

so, putting the 'if' and 'set a variable or attribute' Scripts together, an example:

<object name="monster_1">
<inherit name="editor_object" />
<alias>orc</alias>
<attr name="dead" type="boolean">false</attr>
<attr name="life" type="int">100</attr>
<attr name="cash" type="int">500</attr>
<object name="axe">
<inherit name="editor_object" />
<attr name="damage" type="int">50</attr>
</object>
<attr name="fight" type="script"><![CDATA[
if (orc.dead = true) {
msg ("The orc is already dead, silly.")
if (orc.cash > 0) {
player.cash = player.cash + orc.cash
orc.cash = 0
msg ("While the orc is already dead, you discover some gold coins on the orc's dead body.")
} else if (orc.cash <= 0) {
msg ("You already looted the orc of it's gold coins, silly.")
}
if (axe.parent = orc) {
axe.parent = player
msg ("You also take the orc's axe for your own.")
} else if (axe.parent = player) {
msg ("You already took the orc's axe, and, no, there's not another axe that magically appeared on the dead orc's body, silly.")
}
} else if (orc.dead = false) {
orc.life = orc.life - player.damage
if (orc.life <= 0) {
orc.dead = true
msg ("You attack the orc, killing it.")
} else if (orc.life >0) {
msg ("You attack the orc, damaging it.")
}
}
</attr>
</object>

Protodermis
02 Jul 2014, 15:21
Hi
Thanks! I'm kinda confused though. I'm making my game on simple mode.
As to the sword, yes, I added a script (MoveObject) that moves the sword from the room or object (ie 'floor'), into the player's inventory. So the player DOES have the sword, but the message of the room description says otherwise. People get confused.
I kind of what you said, but I don't really get how to put that coding and stuff to "action" in my game.
Thanks again! :)

HegemonKhan
02 Jul 2014, 16:02
no problem, sorry to scare you with the code (but it's quick and easy to use, so that's why I did it ~ will be too much work~time though to explain via using the GUI~Editor... but I'll try to help more if I can, as I'm too busy to for the time needed to explain fully via doing it in the GUI~Editor, sighs).

-------------

as to the room description... did you add a 'msg (message)' Script that says the sword is on the floor? if you did, then just delete that out (or you'll need to add in the conditional script, "if", via setting your 'print a message [MESSAGE]' Script to 'print a message [EXPRESSION]' so you can add in the needed expression coding, but this is probably beyond you, unless you want to start to learn and work with quest's coding, lol. It's actally quite noobie-friendly, it's not too difficult to learn, hehe. I was able to learn it, and I knew absolutely nothing about coding at all!)

otherwise, I'm not sure what the problem is... you may have to provide us your game code, so we can see what the problem is, and fix it for you. If you don't want to mke it publically available, you can pm it to us.

-----------

if you haven't already, I highly recommend~suggest you try to do the tutorial in it's entirety, to better familiarize yourself with quest and better getting the mindset of game making and coding (the 'if' mindset and coding-design: yes even if you're not writing code, you still got to think as a coder, unfortunately for game making, lol):

http://quest5.net/wiki/Tutorial

-----------

*You may not be able to do~see this stuff in 'simple mode', as I don't know what it is like (what features it allows you to work with), lol.

for the GUI~Editor (GUI: Graphical User Interface: what you're using: has all the buttons, drop down menus, checkboxes, and features):

you add in the objects, attributes, and scripts

for example (let's make some new custom~self made-added stuff, instead of using the built-in default stuff, and then you can apply this to what you already got in your game or you can redo your stuff in your game, lol):

'room' (Object) -> Objects (tab) -> add ->

Object name: orc

'orc' (Object) -> Attributes (Tab) -> Attributes -> add ->

Attribute Name: dead
Attribute Type: boolean
Attribute Value: false

'orc' (Object) -> Verbs (Tab) -> add ->

Verb name: fight

'fight' Verb's Scripting:

(indenting correctly is EXTREMELY VITAL, so make sure you click on the correct 'add a script' small circle buttons!!!)

run as script -> add a script -> script -> if -> [EXPRESSION] -> orc.dead = true ->
-> then (add a script) -> output -> print a message -> [MESSAGE: is for text only messages] or [EXPRESSION: is for the dynamic-coded messages] ~ let's just do [MESSAGE] for now -> The orc is already dead, silly.
else if (add a script) -> script -> if -> [EXPRESSION] -> orc.dead = false ->
-> then (add a script) -> variables -> set a variable or attribute -> orc.dead = true ->
-> then (add a script) -> output -> print a message -> [MESSAGE] -> You killed the orc.

---------

if you want to head into more advanced stuff (see below), let me know, otherwise, see what you can do with this for now.

' print a message [EXPRESSION] ' Scripts (or for the room description's 'RUN AS SCRIPT:EXPRESSION' too), but I'm going to show it in code:

// let's pretend that I'm 18, lol

<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<alias>HK</alias>
<attr name="gender_string" type="string">male</attr>
<attr name="age_string" type="string">adult</attr>
<attr name="age_integer" type="int">18</attr>
<attr name="race_string" type="string">human</attr>
<attr name="class_string" type="string">warrior</attr>
<lookat type="script">
msg (player.alias + " is a " + player.age_integer + " year old " + player.age_string + " " + player.gender_string + " " + player.race_string + " " + player.class + ".")
</lookat>
</object>

// return~output: HK is a 18 year old adult male human warrior.

------------

// just pretend with me on the info, as I've no idea about some of this stuff for frodo baggins (Lord of the Ring Trilogy, J.R.R. Tolkien), lol

[code]<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<alias>frodo baggins</alias>
<attr name="gender_string" type="string">male</attr>
<attr name="age_string" type="string">teen</attr>
<attr name="age_integer" type="int">16</attr>
<attr name="race_string" type="string">hobbit</attr>
<attr name="class_string" type="string">thief</attr>
<lookat type="script">
msg (player.alias + " is a " + player.age_integer + " year old " + player.age_string + " " + player.gender_string + " " + player.race_string + " " + player.class + ".")
</lookat>
</object>

// return~output: frodo baggins is a 16 year old teen male hobbit thief.

Protodermis
02 Jul 2014, 16:16
Hey!
Thanks! I'm 99% sure the GUI thing isn't available on Simple Mode...
Yes, I did add that the sword was on the floor in the room description. And yes, the conditional script is beyond me :) Unless you can give me the coding for that.... :?:
Where do I find the game code? If you could fix it for me, that would be so much easier for me :)
I zipped through the tutorial. I'm not much interested in the coding. I mean- it would be cool to know, but for now, I just want to make my game. In a easy way.
Thanks :D :D :D :D :D :D :D :D :D :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

HegemonKhan
02 Jul 2014, 16:39
even the simpliest game... isn't easy to make, lol (everyone learns how ahrd game making is very quickly, argh, and appreciates those who do make games ~ though having a team of 100 helps a lot... big gaming companies... why very few solo game makers, lol)

this is about as simple as you can get of a game using some coding:

viewtopic.php?f=5&t=4094

laughs :D (I wanted to give something back to this wonderful site, users, mods, program~software: Alex' Quest, and all the help they've given me with trying to learn to use quest and to code with it, hehe. This was the only thing that I could actually finish. Especially greatful to Alex for this free software!)

-------------

the tutorial is not a coding tutorial, the tutorial teaches you the very basics of how to make your game with quest using the GUI~Editor. Yes, it's boring to go through, but you really need to do so, as it's hard to figure stuff out on your own. It has A LOT of VERY USEFUL help for people using quest for the first time and for game making and non-coders, hehe :D

--------------

you should be working with the GUI~Editor (it has all the stuff you can click on ~ you should be already on~using this ~ as it's for all those who can't code), unless you're using the online~web browser version of quest, or maybe the 'simple mode' really does have an extremely limited GUI~Editor... lol

------------

there's two ways to see the game code (and then you can just literally highlight it, CTRL+A, copy it, CTRL+C, and paste it, CTRL+V, here in your post*):

*though put it inside of the code:

[.code]your_pasted_game_code[/.code]

but without the dots in the brackets, it'll look like this:

your_pasted_game_code


1. simply (right) click on your game file (*.aslx) and open it with any text editor software (notepad, wordpad, or notepad++).

2. within the GUI~Editor, at the top of the screen is a horizontal bar, click on the notepaper like button (it's between the 'play' and '?-help' buttons), this notepaper button is a toggle to switch back and forth between the gui-editor mode and the Code View mode.

Protodermis
02 Jul 2014, 16:50
Honestly: I really don't want to code. sry. so far, I've done a decent non-finished game. except for this issue of the sword being on the floor and in your hand.
But even if my game isn't perfect, you can still play it.
I will go through the tutorial.
I am using the online-web version of quest.
Is there any chance that if I gave you my game code (which I dont know where to find) you could solve the sword thing for me?
Thanks

HegemonKhan
02 Jul 2014, 16:56
definately... it'll be an easy fix surely.

-----

I'm not familiar with the online~web browser quest, as I use the offline~desktop quest.

there was a pretty recent thread on here on how to download your online quest game file to your computer, so you can then open it up... if you just search for it, you should hopefully be able to find that thread with the post on how to do it, but if not, I'll look for it for you.

-------

you are using at least the TEXT ADVENTURE version, and not the GAMEBOOK version, right? (I don't know anything about the gamebook version, lol)

-----

that's fine, quest is made for non-coders (though you still got to learn quest and how to game make, lol), I was only offering some stuff, in case you were interested in trying to learn to code.

Protodermis
02 Jul 2014, 17:08
Thanks :D
i like the online version though.
Yes, I am using the text adventure, not the gamebook version :D
You need my game code to fix it for me, right? Where do I find it?
Thanks again

HegemonKhan
02 Jul 2014, 17:11
here's the link:

viewtopic.php?f=10&t=4431

if you need help, let me know.

Protodermis
02 Jul 2014, 17:14
I opened the coded version of my game with Wordpad.
What now?

HegemonKhan
02 Jul 2014, 17:18
just hightlight all of it, copy and paste it here (or as a pm to me, if you don't want everyone seeing your game code), and I'll take a look at it, looking for how to get it to work (or how to get it fixed).

---------------

there's two ways to see the game code (and then you can just literally highlight it, CTRL+A, copy it, CTRL+C, and paste it, CTRL+V, here in your post*):

*though put it inside of the code:

[.code]your_pasted_game_code[/.code]

but without the dots in the brackets, it'll look like this:

your_pasted_game_code


1. simply (right) click on your game file (*.aslx) and open it with any text editor software (notepad, wordpad, or notepad++).

2. within the GUI~Editor, at the top of the screen is a horizontal bar, click on the notepaper like button (it's between the 'play' and '?-help' buttons), this notepaper button is a toggle to switch back and forth between the gui-editor mode and the Code View mode.

jaynabonne
02 Jul 2014, 17:49
Just to insert a thought for some point in this discussion, in case it helps - for basic conditional string handling, I'd go with the text processor:

http://quest5.net/wiki/Text_processor

You still need to set flags, but once you do, it's trivial to make part of your text show up only sometimes (no scripting to concatenate strings, etc). For example, if you put the following in your room description:

The bedroom is brightly painted, with numerous posters on the wall of bands from the 1980s. {if not player.hassword:There is a sword on the floor.}


then "There is a sword on the floor" will only show up if "player.hassword" is false.

Omega
02 Jul 2014, 18:00
HegemonKhan wrote:even the simpliest game... isn't easy to make, lol (everyone learns how ahrd game making is very quickly, argh, and appreciates those who do make games ~ though having a team of 100 helps a lot... big gaming companies... why very few solo game makers, lol)

this is about as simple as you can get of a game using some coding:

viewtopic.php?f=5&t=4094

laughs :D (I wanted to give something back to this wonderful site, users, mods, program~software: Alex' Quest, and all the help they've given me with trying to learn to use quest and to code with it, hehe. This was the only thing that I could actually finish. Especially greatful to Alex for this free software!)


We should band together and create our own gaming company. Unity/Blender are free that connect to xbox, ps, pc. We can make billions. xD

PS: Alex and Jay can be our CEO's

HegemonKhan
02 Jul 2014, 18:57
that's why I am so appreciative of alex and his free quest: I am able to learn how to code from it, I can make games for free, and then commercially sell them too... I just have to learn... and learn... and learn... but I'll be making more money than blizzard, ea, squaresoft enix, firaxis, sid meiers, bethesda, and etc big gaming companies, lol.... right... HK get back to continuing to learn just the very basics of coding! you got a long long long long ways to go, along with learning how to actually make~design a game as well... and then there's the graphics~media~music, the writing story-plot telling, and etc... games are massive endeavers... such huge projects...

-------

but ya, I'd love to get a team together, it'd be nice to have others helping me, working together on trying to learn to code and to make games, hehe. (and I think you said you like RPGs too, so we match up in what we want to create as well). so, if you wanna team up, let me know. Unfortunately, real life eats up most of my time now... sighs.

Omega
02 Jul 2014, 19:27
lol. i know what you mean dude. it's just like college. thank god that's over with.
But yea i learned that most knowledge is gained through experimenting on your own several times. That's pretty much what im doing on my quest. Can't have help just that fast if i dont learn it my way.

As for gaming enterprise, hell ya dude! I played around with blender software which is used to make 3d modeling videos/games. Wish I had an actual computer with tower so I can properly do stuff on it. My laptop isn't strong enough to handle such a daunting task and graphics. But yea, I know games take a long time and a lot of people to make something great. I have tons of ideas but no skill in coding. I am a pretty good artist though and have conceptual design. Plus, i know what makes a good game, good. (it's obviously not just graphics; which is why im here :P)

But yea dude if anything, im down with you and anyone else. I'll be mostly design, conceptual artist, blender begin/advance. At the moment, creating a story that can be simply put together as a game. Im trying to get it out on here first before anyone takes the idea. lol.

HegemonKhan
02 Jul 2014, 20:26
dropped out of college (though I may go back, if I can to work on a programming~coding, computer science, degree, laughs), but took a computer school program to learn computers (A+, Network+, and Security+ CompTia certifified, but these were just tests, as I'm not an expert at any of these, lol. I had practically zero knowledge of computers, I've learned quickly, but still need more experience and a much better unerstanding, to get to being an expert at these things... lol. 6-7 months and still no job, either. I haven't done many jobs in the past, so I got no interviewing skills, nor job experience in general, and no actual comp job experience yet, sighs. So, it's been hard for me trying to get a job, obviously not having one yet... (graduated from the comp school in decemeber 2014, and still haven't got a job yet. My 6-7 last months have been 24 hours of: intern at the comp school, job seeking, sleep, and some fun time when I can: gaming, working on learning to code more and making games more, including posting here too, lol. I've been so busy, no rest at all, sighs. And if~when I ever get a job, I'll be even more busy, lol).

oh, and I'm from cali (socal though) too, lived here all my life, laughs

-------------

"what makes a game, good", some links:

1. viewforum.php?f=20
2. viewtopic.php?f=20&t=3877

--------------

just some quick brainstorming~documentation on RPG data, that I had posted up:

viewtopic.php?f=20&t=3876

-------------

excellent, as probably the best I'm at is coding (though that means I don't have any game making skill, as I'm just learning to code, lol). I got a lot of ideas, but have never tried to make a game before.. there's so much to do (with RPGs especially), that it's hard for me to stay on one thing (which you got to do), as it's boring and takes so long to get it complete, lol... I can't write, but I got good ideas (I've read tons of books, watched tons of tv shows and movies, history:major in college due to being undecided back then on what I wanted to do... that I dropped out of: so much writing... I had 3 term papers all due at the end of the symester and there was no way I could get them done, sides I hate researching stuff to write papers - I can 'free-write'-opinionated stuff really well - so I dropped out ~ sides history is really a dead end carreer choice: museum curator, writer, teacher, archeologist, or lawyer, anyways... going off on a tangent... I'm a religion~mythology buff, and playing tons of games, so I got a good mind for story and plot and like stuff, but just can't write well, lol). I can't do media (graphics, music, sound, animation, etc) at all. And I can't do game design very well either, it's just too overwhelming for me, laughs. I really can't do anything well at game making, laughs.

what I've been working on in terms of RPG making:

1. character creation
2. time and date system
3. (need to get much more knowledgeable with equipment, and especially magic-spells, but I do grasp at least their basic coding concepts and designs)
4. some combat system work (physical melee combat only lol), I'm still working on deciding and in crafting the game mechanics and the game's attributes-stats-etc
5. 'explore' and 'travel' system (alternative, or in-addition, to with using or not using Exits)
6. tiny storage system (object 'folder' heirarchy, got spell storage working, but can't understand Sora's Stackable Library, that's still quite a big chunk beyond my coding ability~knowledge~understanding, lol-sighs)

Omega
02 Jul 2014, 21:03
Dang. Yea i know the job market currently sucks. Without a degree it's just really crappy. I have a degree in enviro science but look at me. Im still here. hahaha. I've been around places and such but yea. Didn't want computer science to be a degree because I felt that would kill the interest of doing things such as this. Oh well, some other time I guess. Keep trying though dude im sure you'll get something. I have a friend who graduated last year in computer science and she's working at some game developer place that makes that walking dead xbox 360 series, but she's a tester mostly. Starting somewhere though and it's easy pay. haha.


Yea Im not pro at any computer things except how to navigate areas around the web. Find sources, clues, words, blah blah blah. Im a good movie reviewer and slowly going into the game review process (but only for xbox since I favor their system). As for types of games I go for RPG or FPS. My story atm is an FPS but it's mostly typing out moves instead of joystick haha.

I haven't made anything fascinating here on quest just yet but your list is pretty good. hm...

Maybe, if you want, we should tag team on this quest game I'm currently making. Im writing the story first hand and just somewhat copying it into quest. Wonder if that's been done around here; a tag team quest game? that'd be pretty interesting. But keep in mind, this story will probably have around 20 chapters so..... yea, there's a lot of coding and programming for this.

I tried to do some 3D modeling for my story and forgot to bring my mouse for my comp from home so.... can't really design characters atm. You should check it out. it's called Blender. it's free and following the tutorials is pretty easy. I followed Tim's blender tutorial on Youtube. He's really good except when you get to coloring the character/making eyes. it somewhat gets complicated.