Little help on a Windows

21 views
Skip to first unread message

Kage Katon

unread,
Mar 17, 2013, 9:20:15 PM3/17/13
to jacl-d...@googlegroups.com
So I have been interested in trying to do one of those text based games i see everywhere, i found this and decided to try it out right? Well i can't figure out how to even get started. I see instructions on compiling and everything else for Unix operating systems....yea...HI i'm on windows and have no idea what i'm doing >.< little help over here?

Stuart Allen

unread,
Mar 17, 2013, 9:27:58 PM3/17/13
to jacl-d...@googlegroups.com
Hi Kage

The 2.8.4 .zip distribution has precompiled binaries for Windows (https://code.google.com/p/jacl/downloads/detail?name=jacl-2.8.4.zip#makechanges)

It isn't quite as up-to-date as the Subversion repository as I haven't owned a Windows computer for quite some time but it is still perfectly usable. If you unzip that and open 'winjacl.exe' from the 'bin' directory you should then be able to open any of the games from the 'projects' directory (hmmm, which maybe actually be the 'games' directory back in 2.8.4), can't remember! 

Once you have winjacl.exe running, you can start writing your games in notepad or any other simple text editor following the instructions in the Tutorial Game chapter of the manual. JACL games are interpreted so you just open the text file in winjacl to play them. 

Hope that helps, let me know how you get on. I'll download the zip file here soon and remind myself how that version was laid out.

Stuart 

Kage Katon

unread,
Mar 17, 2013, 9:33:20 PM3/17/13
to jacl-d...@googlegroups.com
See now that made much more sense to me than just explaining how to do everything in Unix, thanks a ton!!!

Kage Katon

unread,
Mar 17, 2013, 10:33:22 PM3/17/13
to jacl-d...@googlegroups.com
Came across something i just can't seem to hunt down and fix now, "constant" keyword with insufficient parameters. Not entirely sure what i'm looking for (and i don't think the in line 34 is going to help me much, line 34 puts me in the description of a bathroom...any ideas as to what i would have mistyped at all?

Stuart Allen

unread,
Mar 17, 2013, 10:46:17 PM3/17/13
to jacl-d...@googlegroups.com
A constant keyword should have two parameters, a name and an integer. ie "constant game_release 2" with whitespace separating the three parts. Post the code if you have trouble with it and I'll take a look.

Stuart


On 18 March 2013 13:33, Kage Katon <thekag...@gmail.com> wrote:
Came across something i just can't seem to hunt down and fix now, "constant" keyword with insufficient parameters. Not entirely sure what i'm looking for (and i don't think the in line 34 is going to help me much, line 34 puts me in the description of a bathroom...any ideas as to what i would have mistyped at all?

--
You received this message because you are subscribed to the Google Groups "jacl-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacl-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
http://dangarstu.com

Kage Katon

unread,
Mar 18, 2013, 3:03:37 AM3/18/13
to jacl-d...@googlegroups.com
I went back and basically just pulled the entire section out and redid it, seems to work just fine now, though i've been flipping through a bunch of the different tutorials and the such and through the discussions and can't find an answer to another question i have...

I'm wanting to post my work up on a forum that i browse through, though i don't want to force anyone to download everything to play it, is it possible to have it play in browser in a post on a forum?

Stuart Allen

unread,
Mar 18, 2013, 6:29:58 PM3/18/13
to jacl-d...@googlegroups.com


On Monday, March 18, 2013 6:03:37 PM UTC+11, Kage Katon wrote:
I went back and basically just pulled the entire section out and redid it, seems to work just fine now, though i've been flipping through a bunch of the different tutorials and the such and through the discussions and can't find an answer to another question i have...

I'm wanting to post my work up on a forum that i browse through, though i don't want to force anyone to download everything to play it, is it possible to have it play in browser in a post on a forum?

To be played in a browser you need to host the game on a Unix server somewhere, you can then post the link on a forum. I'm happy to put your code on my server if you attach it to your reply.

Stuart

Kage Katon

unread,
Mar 30, 2013, 6:07:03 PM3/30/13
to jacl-d...@googlegroups.com
That would be awesome :D sorry about taking so long to reply to that, got REALLY sick recently and it laid me out for a while


On Sunday, March 17, 2013 8:20:15 PM UTC-5, Kage Katon wrote:

Stuart Allen

unread,
Apr 1, 2013, 7:53:56 PM4/1/13
to jacl-d...@googlegroups.com
Hi Kage

Sorry you haven't been feeling well, just email me the code when you are ready.

Regards,
Stuart

Kage Katon

unread,
Jun 9, 2013, 5:27:06 PM6/9/13
to jacl-d...@googlegroups.com
I have really slowed down compared to what i was doing, i ran into a few road blocks, first i lost internet so i haven't been able to come back and ask about it, but is there any way to really keep the player from equipping more than one of the same item? When i say that i mean, i have two shirts, a red one and a blue one, i put on the the red one...then the blue one...but i only want the player to be able to equip one or the other. The same goes with held things, i am holding a flashlight, a book and a stick...but i only have two hands...


On Sunday, March 17, 2013 8:20:15 PM UTC-5, Kage Katon wrote:

Rob

unread,
Jun 9, 2013, 6:08:24 PM6/9/13
to jacl-d...@googlegroups.com
Hi,

> ...is there any way to really keep the player from equipping more than
> one of the same item?
I am assuming you'd like to have equipment slots. You can define
variables or attributes for the different slots, then in the wear code
of the equipment you can check if that variable or attribute is set on
the player. If it is, you return saying that you can't wear that
particular item.

> The same goes with held things, i am holding a flashlight, a book and
> a stick...but i only have two hands...
You can also define two variables for the left and right hands,
respectively. Then, in the wear/wield/hold function, you can check if
those variables are set or not. Based on that, you can do some pretty
fancy stuff like printing 'You hold the torch in your right hand', as
many LPC muds still do.

Hth,
Rob

Stuart Allen

unread,
Jun 10, 2013, 10:21:42 PM6/10/13
to jacl-discuss
Hi Kage (and good to hear from you Rob!)

There are many ways you could achieve what you are trying to do so here are a few ways I would consider doing it.

The amount that the player can carry is dictated by the player's capacity property. The default for this is 99 I think, but you can specify it to be just 2 if you would like. For example:

object kryten: myself self me
   has          ANIMATE
   short        name "yourself"
   quantity     98
   parent       tavern
   capacity     2
   player

You would then need to set the "mass" property for ever takable object to 1 and then the player would only be able to carry two things at a time. The advantage to this technique is that it doesn't really involve any extra code, just a few definitions.

For the issue with wearing things, there is a hook so that you can do some extra processing when the verb gets to the "override" statement in any the library code. For example, here is the code in "verbs.library" to handle wearing an object:

{+wear
if +not_held<noun1 = true
   return
endif
if noun1 hasnt WEARABLE
   write "You can't wear " noun1{the} .^
   set time = false
   return true
endif
if noun1 has WORN
   write "You are already wearing " noun1{the} .^
   set time = false
   return true
endif
override
set player(quantity) + noun1(mass)
ensure noun1 has WORN
write "You put " noun1{the} " on.^"
}

You will see that the override statement comes at the point in the verb where everything is determined to have succeeded . You can find detailed information on this facility in 16.4 "Responding to the Player's Moves". The "override" feature is also described in the tutorial game. The basic idea is that you define a function that gets called at that point and it could do something like:

{wear_redshirt_override
if blueshirt has WORN
   write "You are already wearing the blue shirt!^"
   return
endif
return false
}

This will print a message if the player tries to wear the red shirt while already wearing the blue shirt or just continue as normal otherwise.

You could also do a more generic function that gets called no matter what object the player tries to wear like this:

{+default_wear
select WORN 
   write "But you are already wearing the " noun3{the} "^"
   return
endselect
return false
}

The above (untested) code should only let one thing be worn at a time, but this of course might be a problem if you can wear a hat, glove, shirt and pants, just not two of any one thing. That could be done, but would take extra testing based on the class of the piece of clothing being worn.

Hope that helps!

Stuart



--
You received this message because you are subscribed to the Google Groups "jacl-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacl-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages