Synthetic Reality Forums Post New Topic  New Poll  Post A Reply
my profile | directory login | register | search | faq | forum home

  next oldest topic   next newest topic
» Synthetic Reality Forums » Other Games » Arcadia » TurnAbout Dev/Release Notes (Page 3)

  This topic comprises 3 pages: 1  2  3   
Author Topic: TurnAbout Dev/Release Notes
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
Turnabout .0019 Release Notes
-----------------------------

I am in a bit of dental pain, so my thinking is muddled, but this release includes support for 'edit boxes' (API documentation to come) and a new mni-game "Wind Chasers" (style name windRacer since I changed names in mid stream)

API updated for EditBox functions

http://www.synthetic-reality.com/turnAboutAPI.htm

You can have lots of these, so each has a handle (returned to you by TA_EditBoxCreate()) and you must include that handle in all subsequent calls.

Be sure to destroy the box when you are completely done with it.

code:
handle = TA_EditBoxCreate( ... args )
TA_EditBoxDestroy( handle )
TA_EditBoxShow( handle, showIt )
TA_EditBoxSetRect( handle, rect )
TA_EditBoxSetText( handle, text )
text = TS_EditBoxGetText( handle )

Edit boxes provide a little window on your main screen where users can edit text.

---
Note: I just found a small bug in the menu support, which I will fix in the next release. Also in the next release the 'dimmed' argument is actually the sum of two flag bits:

1 - dimmed (as before)
2 - put a separator AFTER this command IF more commands follow

Actually that functionality requires a new push of arcadia itself, so you might not see the benefit until later. (separators, I mean)

[ 09-03-2006, 01:24 PM: Message edited by: samsyn ]

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
TurnAbout 0020 Release Notes
----------------------------

Fixes a few potential crashes in the API if your script passes nil arguments (like str3 in TA_SendPacket)

Second Release of "Wind Chasers" with lots of new functionality and a bit of polish. (Admire the new title screen)

Speaking of title screens... I mean, they're fine and all, and every game should have one, but I didn't actually intend to have one. The Setup screen was to be my title screen.

The problem is that you HAVE to press START GAME (important stuff behind the scenes there) and you can never go back to pre-start game without unloading the script first... and I needed to be able to go back to my setup screen. Hence the title screen which is seen only before pushing start game for the first time.

IN fact, the script could push start game for you automatically (via TA_SetState) but my title screen is SO PRETTY I am just leaving it up.

Dealing with a dead moderator is something Arcadia itself needs to address.

---

Note that some buttons must be held down a couple seconds. Hopefully you will like my feedback mechanism for that.

Personally, I like Wind Chasers. It needs persistent 'high scores' and more spectator involvement (and sync'd race start), but I think it is still 'clean' in implementation, which always pleases me.

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
TurnAbout 0021 Release Notes
----------------------------

* fixes a couple API bugs I don't remember the details of

* Third Release of "Wind Chasers" which is now functionally complete, if not actually polished.

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
TurnAbout .0022 Release Notes
-----------------------------

* fixes a few more blemishes in the API, including one in font support which required a new Arcadia push

* New version of WindChasers where you can pick your own boat color (from one of the 8 canned colors, I mean)

I *almost* have a plan for easier publishing of TurnAbout mini-games, so they can be released separately from the toys themselves. If I do it RIGHT (doubtful), it could also be used for things like empyrion maps/empires, synJet missions, etc.

[ 09-11-2006, 02:28 PM: Message edited by: samsyn ]

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
GuppyMan
Compulsive Member
Member # 44

Member Rated:
4
Icon 1 posted      Profile for GuppyMan   Email GuppyMan   Send New Private Message       Edit/Delete Post 
I haven't read through all of this topic yet, but I have a question.

You have some methods dealing with a colorIndex and some dealing with raw RGB values (in hex.) Where is the function/method where I can get the RGB value of a colorIndex and the colorIndex for an RGB value? It is probably asking too much for the latter to return the closest index to the RGB (since 256 < 256^3)

[ 09-30-2006, 11:36 PM: Message edited by: GuppyMan ]

Posts: 2675 | From: Washington | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
in fact, when you provide an rgb value, it does a best match to a color index.

I'm not sure where you would actually find conversion functions useful. At design time, you can just look in the WoS palette to see what colors are truly available, and then at run time just use their rgb values. Sort of live in a world where you think you have 24 bit color available to you. A fantasy world.

You can use TA_GetPixel to read the upper left pixel of an image to get the transparency color (if you want to do it that way) for the copy bits function.

Or just 'know' that it is 6 :-)

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
GuppyMan
Compulsive Member
Member # 44

Member Rated:
4
Icon 1 posted      Profile for GuppyMan   Email GuppyMan   Send New Private Message       Edit/Delete Post 
You have absolutely, no intention on EVER changing the palette from underneath us, right?

Normally I'd be upset to hardcode such things. If you were to bump the standard (6?) color index over by one, things might start to break is all...

Hardcode = bad!

Theoretical Example: (In other words, I don't have an intention on doing this, at the moment)

What if I wanted to take an image, find a pixel at x,y and then use the color of that to draw a line, a rect, or an ellispe? Say I wanted to make the person's face appear to have an auora(sp), but not match the edges of their face, as that would not be visible then. (Yes I realize that such a function would be costly.)
Those functions takes rgb...not a color index. The only way I have around this is to have a color table of my own....but you apparently already have that. You just aren't giving me easy access to it. :-P

Like you said, I do not have a current plan to use it. I just thought it was odd that you did not provide conversion functions. Since you probably already have one residing in memory somewhere, it would be nice not to duplicate that effort, if it becomes necessary.

[ 10-01-2006, 08:13 AM: Message edited by: GuppyMan ]

Posts: 2675 | From: Washington | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
OK, hypothetically, the next release of TurnAbout will include:


color, red, green, blue = TA_GetRGB( handle, index )

Where handle is a valid image (it will always be the same palette. But hey. it's good to be clear), and index is a color index value 0-255

four return values for maximum convenience

color = "RRGGBB" in normal form, where RR is hex 00-FF

red = decimal value 0-255

Personally, my lua skillz do not include easy conversions from hex to decimal and back. Anyway so "color" is directly usable in other functions, and "red, green, blue" are 'informative'

And no, the palette will never change. And I am glad to have you on record demanding that :-) Next time someone says "make WoS 64 bit color!"

---

Oh, and I THINK Lua is cool with you only providing color, as in

color = TA_GetRGB( handle, index )

if you don't need the individual red, green, blue, I mean.

---

And it appears to work. for index 6, it returns:

"008080", 0, 128, 128

which is, in fact, the 'standard WoS transparency color - aqua'

---

This also requires a new release of Arcadia, but as it happens I was already working on a new release of arcadia, which includes...

* this

* a 10 minute ModeratorAFK timeout, after which anyone who waited patiently for those 10 minutes has access to "Make me moderator" (if you leave and come back, your ten minutes starts again, so the person who has been waiting the longest gets first crack at moderatorhood)

* An effort to make it easier/more automatic for a newbie to fetch the initial toy set. Plus generally more self-help

* Some connectivity changes (which will also be in WoS A92), such as better use of port numbers as discussed in separate topic. (it is more likely to continue using ports in sequence with the starting port you provide)

* The ability for a toy to postpone user afk (for example, if all you do in synJam is use your MIDI keyboard, that will now keep you alive, instead of assuming you're idle just because there was no mouse or ascii keyboard activity)

* Fix to silly rule bug which allowed rules from previous server you were on to affect you in subsequent SOLO play

* Fixes for some toy menu/player list state leakage issues. (Actually, I guess I already pushed those)

* Windows optimized for 800x600 since no one hitting my web site uses 640x480 any more (you can still shrink the window, but the default column sizes assume 800x600)

* Actually, quite a bit of other stuff which I have already forgotten. This is actually a meaningful Arcadia release

* I include a bunch of Camanator's Faces (suddenly hit me how stupid it was only having the yellow happy face)

* I made a copy of Cam's excellent park, added ducks and tweaked it a little and included it as LakeSide Park 2 (which I might make the default, since it is so much superior to Arcadia Park :-)

I have been thinking a little about a ray-tracing maze painter (textured vertical walls) a la DOOM. (maybe Wolfenstein 3D is a closer image). With the idea of either adding it to the Park spec and/or Providing some TurnAbout primitives.. so the actual rasterizing is not in Lua, but everything else is.

I have also been thinking about adding a new sport to the park.. 'racing' which would let you define waypoints on the map and have a synched start... Sort of an ugly version of mariokart.

What I am really trying to think about is how I can package the park for use by TurnAbout. And then make the Park more powerful.

Don't hold your breath, of course. I really need to spend my 3D energy in Rocket Club.

[ 10-01-2006, 01:19 PM: Message edited by: samsyn ]

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
Hesacon
Obsessive Member
Member # 3724

Member Rated:
4
Icon 1 posted      Profile for Hesacon   Author's Homepage   Email Hesacon   Send New Private Message       Edit/Delete Post 
Seems like the only thing left is to make Warpath an Arcadia toy, or fix the deal-order bug in synspades, or something [Smile]

--------------------
SoV: Exalted Devout Oracle | World Developer | The Black Guard
Outside is just a prank older kids tell younger kids at Internet Camp

Posts: 9479 | From: NY | Registered: Apr 2003  |  IP: Logged
GuppyMan
Compulsive Member
Member # 44

Member Rated:
4
Icon 1 posted      Profile for GuppyMan   Email GuppyMan   Send New Private Message       Edit/Delete Post 
I wish to write some classes and place them in a different file.

The lua function "require" allows me to do this. However the base directory appears to be the assets directory, which is fine...I suppose.

My main questions are, if I were to write some general classes that I wished to reuse in other lua programs, may I place them in assets/styles/<sernum id>/util or something of the kind? Or do I need to duplicate the classes for each 'toy' that I write?

I guess this is mostly dependent on the in game transfer of the scripts/images/etc, I was wondering if you wouldn't mind making a 'util' (or the like) directory a standard that would also get transported?

Posts: 2675 | From: Washington | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
frankly, I don't know what to do:

* lua 'require' is a bit goofy, causing multiple executions of scripts while it gets itself setup.

* hooking in to change the base directory is unpleasant, but without that things would quickly get messy

* when I get around to auto-distributing code, having more than one file being shipped will be unpleasant

* when I get around to making a message digest for the scripts so people can be sure they all have the same copy, it will be unpleasant.

----

I am pretty much committed now to turnabout mini-game distribution via download from webserver (as opposed to peer to peer like everything else), so that might solve one of the problems, but not the others.

I know it's silly (and hard to read) to have you have to put it all in a single file.

I should probably do somerhing like this:

1.) you add some new directive that lua doesn't understand, like:

#include <whatever>

2.) I have my own pre-processor which starting with styleName.script, recurses through the #includes and assembles one big file out of it.

3.) I message digest *that* file and hand it to lua (who never sees the #include)

I could probably do that, given enough motivation. i.e. what I do with WoS world quest files. I wonder if I would take out comments or not... probably not. I assume lua is smart enough to discard them. Though one nice thing about WoS is you can edit comments without invalidating your world.

IN the mean time, you could do the same thing by manually assembling your big file just before 'publishing'

But yeah, I think that's the way I will handle it. Honestly, I am surprised 'require' works for you at all (does it?) Sounds like a security hole.

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
GuppyMan
Compulsive Member
Member # 44

Member Rated:
4
Icon 1 posted      Profile for GuppyMan   Email GuppyMan   Send New Private Message       Edit/Delete Post 
Yes, require works, but it starts in the toy10 directory, not the assets directory as I previously stated. It does support ../ though, so yes, I guess you MIGHT consider it a security hole. Since I don't wish to make one GIANT file, I'd appreciate it if you'd leave it in(if you can even disable it...) until after you implement your fancy include method of doing the same...

Also if you stick with the webserver only method of distribution, will it be a la WoS? Meaning there is a list of 'published' toys?

[ 10-17-2006, 07:41 PM: Message edited by: GuppyMan ]

Posts: 2675 | From: Washington | Registered: Dec 1998  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
yeah, very much like WoS with my hosting a file with links to the hosting sites for the turnabout things, each as a single zip file auto-downloaded and installed to the appropriate folder.

I can't really allow require to get outside the toy folder, I'm sure that could be abused.

---

OK, so I found where to control this. in the next release I enforce the sandbox for the require, loadfile, and dofile commands as follows:

require( "something" )

uses .../arcadia/toys/toy10/something

require( "./something" )

uses .../arcadia/toys/toy10/styles/sernum/styleName/something

i.e. like the assets more or less.

--

I haven't done the #include pre-processor yet though.

[ 10-17-2006, 11:41 PM: Message edited by: samsyn ]

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
Had you considered making all the TurnAbout functions part of a package/class? (Lua is a prototyped language from the looks of it, so I assume the two are virtually the same thing anyway)

It'd then look very much like a natural extension of the Lua API that way, which is good IMO.

Then instead of functions like TA_Log() and TA_Polygon() etc they'd be a much more natural TA.log() or TA.polygon().

If you wanted you could even subclass them so you might get things like TA.log(), TA.graphics.polygon(), TA.sound.playMidi(), TA.cards.shuffle() etc. Which would greatly simplify naming for any other 'native' features you add as function names can be intuitive to their package.

Also, the API documentation for TA could be organised nicely with packages. I guess you could do nifty docs like that anyway though. [Razz]

[ 10-27-2006, 02:19 AM: Message edited by: F'Nok ]

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
Please don't ever remove require, just lock it down to the directories, it'll be so useful for third-party classes and code organisation. They can compile together if that's your thing, but slapping all the files end to end and then compiling would break the advantages of it being in a seperate file (like packaging/classing, files-based scoping etc) - well, except for the organisational aspects.

I'm not sure the control you have over how the paths are interpreted but the paths would be much more useful (and probably more natural for most programmers) if they worked like this.

require( "./something" )
Loads the file in .../arcadia/toys/toy10/styles/sernum/styleName/something
Works as desired.

require("something")
Loads the file in .../arcadia/toys/toy10/styles/sernum/styleName/something and if that fails loads the file in .../arcadia/toys/toy10/something
This particular one doesn't matter much, as people can just get used to being explicit, and I'm not sure if you CAN do this.
It would be backwards compatible for the people already using it, and would give it the 'usual' feeling in most OS'es. (check local, then check system path!)
It's not really important, though this behaviour might make things a bit simpler for intermediate dev's.

require( "/something" )
Loads the file in .../arcadia/toys/toy10/something
Go to root, do not pass go, do not collect $200.
If I want to include files from someone else, this is how.

require( "~/something" )
Loads the file in .../arcadia/toys/toy10/styles/sernum/something
This is like a 'include MY file' thing. So all those classes I make that I use in 5 different games I make I can put in my root sernum folder and it still is mine but not of a particular style.

Also, I am curious... Why are cards, images and styles in all different directories?
I'd have thought that it'd be more intuitive to have the assets directory have all the sernum directories and the then have a cards, images and styles sub directory in each of those. That way you can use the sernum directory as a univeral home directory for ALL your assets in a deck you create.

I mean, if you use assets from someone else you need to use their SID in the path anyway, but if I want to include general scripts of mine I need to use an SID currently which seems odd. That would be solved with the ~/ path syntax, but if the directory structure was as suggested you could use such a shortcut for ALL your resources - like data files, images, etc.

[ 10-27-2006, 03:08 AM: Message edited by: F'Nok ]

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
the 'images' folder is an idea that never jelled and probably never will.

the 'cards' folder is where your actual card hierarchy is defined. your high level master source copy. its contents do not get distributed and are not available to other players.

Your deck is digested at the start of the game and that gets distributed to the other players. But it is a 'compiled' version of just the bits of your card definitions that are needed.

Don't depend on other players having access to your cards folder (and vice versa)

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
Ohhh, cards isn't distributed, now it makes sense to me!

In that case, assuming your images idea isn't relevant for now, the directories are just as I'd have expected but it starts from assets/styles instead of just assets.

It was the use of sernum directories in the cards directory that befuddled me. Apart from the cards you provide with TurnAbout, for what purpose does that serve?

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
well, aside from there being quite a bit of re-design over turnabout's lifecycle, that's mainly so you could change your sernum (get a GS for example) and not lose all your work. Though I'm not completely sure I deliver on that promise.

Also, while the cards directory is not distributed *normally* you could presumably have a developer friend with whom you did share.

And the images folder was from back when I thought the cards might be able to standalone (no separate script file)

In any case, I like some of your require path ideas and will probably do something like that. And who knows, maybe someday there will be some other distribution mechanism which allows other folders to be useful.

For example, my original thought was that you would host one zip file per mini-game (which doesn't give you a way to support a separate folder for your re-usable modules), but one zip file per publisher, would.. but that would lead toward monolithic zip files and redundant download for the player. Plus you couldn't re-use some other developer's moduel

then again, if you have nine games from 3 publishers all depending on the same common element, you will inevitable run into the situation where 4 of them need version 15 of that component, and the other 5 need version 16.

So while it's nice for you to make reusable components, it might be for the best if you actually drag a copy into each individual style folder and publish individual game ZIPs which have'everything that game needs'

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
Flamelord
Compulsive Member
Member # 4491

Member Rated:
4
Icon 1 posted      Profile for Flamelord   Author's Homepage   Email Flamelord   Send New Private Message       Edit/Delete Post 
Re-usable modules really sound like a good idea to me. That's the kind of thing I'd like to do in TA to get started. [Smile]

--------------------
Constantinople! We shall never forget your zany barge poles!

Posts: 4232 | From: Gresham, OR | Registered: Nov 2003  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
then again, if you have nine games from 3 publishers all depending on the same common element, you will inevitable run into the situation where 4 of them need version 15 of that component, and the other 5 need version 16.

So while it's nice for you to make reusable components, it might be for the best if you actually drag a copy into each individual style folder and publish individual game ZIPs which have'everything that game needs'

I was actually intending to avoid versioning problems by using functionality probing.

That is, Lua is a prototyped language so I can do things such as...

code:
if not package.commonFunction then
-- The dependancy I was relying on is missing!
end

And alternatively to that is the whole backwards compatibility argument with directives for interface changes.

Say I completely change the interface for my 'Deck' class in version 2, I can do something like this.

In Deck.lua
code:
local P = {}
Deck = P
local requestedVersion = versionRequest.Deck
setfenv(1, P)
if requestedVerion <2 then
function Deck.someFunction()
-- This function is only exported when the requestedVersion is less than 2
end
elseif requestedVersion >= 2 then
function Deck.someFunction(someNewParameter)
-- This function is only exported whn the requestedVersion is 2 or greater
end
end

Amusingly enough, this alows me to make one class to manage dependancies. I could easily share my 'dependancies' class with others if they wanted too.

Another approach is to re-export dependancies with the required interface. Which could again be controlled by one dependancies class. It does however depend on the person that made the class to be dependancy minded.

[ 10-27-2006, 11:40 PM: Message edited by: F'Nok ]

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
That's fine for newer code being able to use older common packages, but not for old code to continue working after the package it depends upon has moved on... especially likely if the package is 3rd party (from your perspective)

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
Flamelord
Compulsive Member
Member # 4491

Member Rated:
4
Icon 1 posted      Profile for Flamelord   Author's Homepage   Email Flamelord   Send New Private Message       Edit/Delete Post 
Hence the common packages storage area. You could keep a copy there yourself, and wheen someone else got the toylet, it would whine at them until they got a copy of the dependency.

That works until the dependee package really does move on and the website to download it goes down. At that point, I dunno -- players start sharing amongst themselves?

I really would love to be able to write up a package for this sort of use. It's the kind of thing I've been working towards in WoS, but still haven't gotten that one QUEST command. [Wink]

--------------------
Constantinople! We shall never forget your zany barge poles!

Posts: 4232 | From: Gresham, OR | Registered: Nov 2003  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
That's fine for newer code being able to use older common packages, but not for old code to continue working after the package it depends upon has moved on... especially likely if the package is 3rd party (from your perspective)
Actually the second solution is specifically geared at allowing an includable package to remain backwards compatible!

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
but only if you wrap every single call, and then what do you do when a mission-critical function is not available?

I think It's much friendlier to the consumer for you to include a copy of the components you need (assuming they are small, as lua things are.) The advantage is in the reusability of code, not in the reusability of disk space.

I would be more worried about massive art libraries you might like to share between mini-games.

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
but only if you wrap every single call, and then what do you do when a mission-critical function is not available?
Nah, you're confusing the procedure structure with that of non-prototyped languages.

That is one of the advantages of the file-scoping in Lua. As it first includes the file it has its own local scope (it's actually a closure), so when I declare a variable as 'local xx = xx' it takes xx from the global scope (which is common to the calling script) and assigns it to a local variable.

Then the setfenv command is actually creating a new global scope that only applies to this file. Thus all the variables from outside the file are now inaccessible (unless I linked them to a local variable *first*).

Then, I test the version requirements and export the methods required. No matter how many different versions I have in there, only the versions required are exported, and only the exported functions are called externally - through the use of the Deck class that I defined in the calling global scope at the start.

So those tests are ONLY done when the 'class' is initialised - Not even when instances are created as they use a recursive parent calling method to gain access to the class.

It'll be executed once and only once for an entire application. Thus you set the required version of this class before you 'require' it. [Wink]

In this way, you can fail at application load if the version required is not available - or more specifically, if it can't honour the interface of the requested version - which would only happen if your library is too old, assuming you keep your old interfaces available. [Smile]

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
Yes, and the scenario I speak of is this one:

Joe Blow gets your minigame in 2005 and at that time you manage to convince him to also fetch your 'standard library set' as a separate download (not included in the minigame)

In that library is a shuffleDeck() method which takes 2 arguments. The 2005 copy of "CardCrimes" is happy.

Now, you upgrade that method to take 47 arguments and release a 2006 version of CardCrimes which uses them.

While I agree you can make CardCrimes 2006 smart enough to not crash, you can't make it smart enough to actually play a game, if that shuffle function is actually important to you. And if you make CardCrimes 2006 sense every aspect of the library fnction, then (I claim) you have lost the benefit of the library function since I don't know aboutyou, but I would rather write code that plays a game, than code that looks for missing interfaces and tries to maintain backwards compatibility between all possible combinations of antique libraries (ultimately by replicating code which is in your newer library)

And heaven help the guy who gets library 2006 to go with BattleBots 2007 and accidentally runs CardCrimes 2005 with it.

I concur you can guarantee non-crashiness, but I don't think you can guarantee fun-playiness (or even fun programming-ness) without replicating the library in the body of the new application.

Now, you could argue, what this really is, is a challenge for the publication metaphor. CardCrimes 2007 should be able to just specify the library versions it needs and the publishing system should be able to auto-fetch them as needed... and you as the publisher should upgrade all your apps to work with your latest libraries.

That is, at least, until you grow dependent on Johnny Lazy Programmers cool physics system which suddenly changes catastrophically with no concern whatsoever for compatibility with your stuff. Or Johnny Petulant who demands his library be removed..

I hereby declare that's not legal. :-) Once you publish a turnabout blah, no taking it back.

---

At the end of the day, it is, except for the publishing metaphor, your choice. I will very likely include matching copies of libraries with each app. Much as a matching copy of MIX is included with each SR app. In the beginning I had a single MIX, but I couldn't guarantee to upgrade all my apps at the same time when Major architectural changes were needed to MIX. And I am not willing to create a profiling metaphor which at the end of the day just gives Warpath the ability to say "You can't actually play me online any more, but I didn't crash!"

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
Ahh, my vantage wasn't for using a old library with a new application (that application should provide the newer version) but more that backwards compatibility is simple to maintain with that method.

Thus, when I download BattleBots 2007 and it upgrades the core library, then I run CardCrimes 2005, CardCrimes 2005 will be looking for the version 2 library thus the version 5 library that came with BattleBots 2007 would export the version 2 compatible interface.

So long as the interface is maintained, the version 5 library may even perform the methods significantly more efficiently due to optimisations that weren't in the version 2 library. [Smile]

--------

But if you're looking at it from a forwards compatibility issue (namely, that a new application does not imply that it provides the new libraries) then I would argue that it's then the fault of the distribution mechanism. Either the publisher didn't zip the new library into the distribution, or the architecture didn't support dependancies.

Given that you've already stated your preference for complete packages I'd say the developer is responsible for including the file in their distribution. [Wink]

[Added: If you ever change your mind on the dependancies issues though, I'll be the first one to cheer you on to implementing it! But with the current distribution I do agree with you that each application should include all of its libraries. [Big Grin] ]

[ 10-29-2006, 09:41 PM: Message edited by: F'Nok ]

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
samsyn
Administrator
Member # 162

Member Rated:
4
Icon 1 posted      Profile for samsyn   Author's Homepage   Email samsyn   Send New Private Message       Edit/Delete Post 
So when do we do Battle Bots 2006? THat one sounds promising.

Everyone gets 1024 bytes to code a lua program to control their bot using certain primitives.

code:
function OnThink( numEnemies )
local target = math.random( numEnemies )
local enemy = NthEnemy( target )
SteerTowards( enemy.pos, RandomOffset( 10 ) )
AimTowards( enemy.pos, ProjectedMotion( enemy.vel, 1.2) )
SetSpeed( 4.5 )
end

And it counts the total characters of your code and imposes that much time delay between invocations of OnThink (so a longer program is executed less frequently than a shorter one.)

visualization is of a bunch of tanks. with it taking some time to slew turrets to new positions. 3D wireframe visualization (BAttleTanks) with spectator camera controls and 'smart camera' action following.

(that way the same game engine can be human-operated tank game, which would probably get more play time, but then the BattleBots AI code could be AI opponents in the game. It's all good.)

[ 10-30-2006, 12:09 PM: Message edited by: samsyn ]

--------------------
He knows when you are sleeping.

Posts: 10585 | From: California | Registered: Dec 1998  |  IP: Logged
F'Nok
Obsessive Member
Member # 201

Member Rated:
4
Icon 1 posted      Profile for F'Nok   Author's Homepage     Send New Private Message       Edit/Delete Post 
BattleBots does sound like a fun idea actually.

The question is how to make a small piece of code have a significant enough impact on an AI, then it could turn out challenging.

--------------------
Kai-Goddess of SoV.
Swords of Villanousity : Website : Guild Hall : Forums

Posts: 5323 | From: Melbourne, Australia | Registered: Jan 2000  |  IP: Logged
GuppyMan
Compulsive Member
Member # 44

Member Rated:
4
Icon 1 posted      Profile for GuppyMan   Email GuppyMan   Send New Private Message       Edit/Delete Post 
API Requests:

You have this player slot architecture going, but no way for the mod, or anyone else really, to say 'remove player X from the game.' (for instance on a setup screen...)


TA_RemovePlayer -- does the above removal from the players list.
TA_JoinInSlot -- Allows the user (via script) to select which slot to join, enforced by the moderator, to avoid dual usage.
TA_MovePlayer -- Allow the moderator to organize the slot list. Rather than each gave developer having to maintain a redundant player's list, like I assume you did in Wind Racer, haven't checked yet.

TA_GetModerator -- gets the sernum of the moderator. Rather than cycling through the list of current players. Since the moderator may not even be playing, I fail to see how you could detect the mod in such a condition.

The TA_Log states:
quote:
It is added to the 'funpack' log window, and also to the main chat window.
Since I'm not a big fan of flooding the chat window. Is there anyway you could make it only send to the funpack window? Also could you enable the funpack window for the general user. Though I know the switch to enable it, the average user/developer does not. Perhaps add a new flag in the toy's options, "Debug Mode" which would enable such a thing? Also then we could put a test in our code "if in debug mode, output these useful bits." Rather than modifying the code to do it. Especially since in the future you will hopefully be doing some CRC/etc on the toy's code so that players have to use the same version... then the developer could switch on debug mode without upsetting that.
TA_IsDebugMode()
-or-
TA_GetDebugLevel() -- returning things like OFF, LOW, MEDIUM, HIGH, etc.


Also a TA_SetMod or TA_GiveMod may be useful in some circumstances. Say when someone that is not playing gets ahold of mod, perhaps the script could attempt to enforce that only people currently playing may have mod? Not too sure about that one.

Also, I don't suppose you can give us something that would allow for better usage of text? Something like...if I write this string, how much space will I need? I have a work around, but it's expensive and not pretty, using the evil TA_GetPixel function. Java has something that can get such Font-Metrics, does MSC++ have such a thing?

I know I've asked for this before, but your flip-flopping between colorIndex and RGB is a pain in my....side. Can't you standardize on one rather than flip flop? Or will you PLEASE give some conversion functions. Also it is not always clear in your documentation which is called for....

[heh [Smile] Good suggestions and I plan to do them all -s]

[ 02-01-2008, 12:25 PM: Message edited by: samsyn ]

Posts: 2675 | From: Washington | Registered: Dec 1998  |  IP: Logged
Beoghztt
Compulsive Member
Member # 2888

Member Rated:
4
Icon 1 posted      Profile for Beoghztt   Author's Homepage   Email Beoghztt   Send New Private Message       Edit/Delete Post 
Debug mode sounds like a good idea. Funpack should be more easily accessible than as is.

So is the CRC checking. So far I haven't seen any TA modders (the bad modders), but it would be useful when checking between your code and someone else's copy after coding a few hundred lines.

--------------------
This signature contains a lot of foul languages.
                                                                                   Also racism.

Posts: 2227 | From: Yokohama, Japan | Registered: Oct 2002  |  IP: Logged
sharpie
Member
Member # 8127

Rate Member
Icon 1 posted      Profile for sharpie   Email sharpie   Send New Private Message       Edit/Delete Post 
ok... a meek.. Hi?

After looking at the first page it made my head spin. You don't expect me to read ALL that and the first link, do you?

Anyway, I'm just wondering if someone could give me some advice.
I'm trying to start, a simple game, but let me just say something; I have tried reading the whole section page under the turnabout section about how to create decks (styles), cards, etc., and to tell you the truth, there is a LOT and and the wording seems to be a bit over-complicated.

So how hsould I best start out trying to make a simple game (which has a mafia theme) where one person just rolls a dice, lands on a card, and the card does an action.

Let's say the card reads
"You succesfully robbed McDonald's for $300",
or
"you stole a Lexes, move ahead 1 space".
If the move ahead spaces thing is too complicated, maybe it could be like
"you lost 10 health but gained $50,000"

so I'm guessing it's kind of like monopoly but everything is totally random. Not too hard right?

or wrong...?

--------------------
the world is round!

Posts: 1 | Registered: Jun 2008  |  IP: Logged
Beoghztt
Compulsive Member
Member # 2888

Member Rated:
4
Icon 1 posted      Profile for Beoghztt   Author's Homepage   Email Beoghztt   Send New Private Message       Edit/Delete Post 
It doesn't have to be monopoly unless you want your game to play like monopoly.

--------------------
This signature contains a lot of foul languages.
                                                                                   Also racism.

Posts: 2227 | From: Yokohama, Japan | Registered: Oct 2002  |  IP: Logged
Luke 3024
Member
Member # 7451

Member Rated:
4
Icon 1 posted      Profile for Luke 3024     Send New Private Message       Edit/Delete Post 
I actually have the same problem, every time i think of making a game i can't figure out how to make the right cards and decks to get me a file i can code. I think just giving you a folder and a script file which will show up in turnabout would be easier without the cards.

But shrapnel if you want to learn the card system it would probably make your Monopoly mafia game easier. Whats your MSN anyway?

Posts: 98 | From: america | Registered: Feb 2007  |  IP: Logged
GuppyMan
Compulsive Member
Member # 44

Member Rated:
4
Icon 1 posted      Profile for GuppyMan   Email GuppyMan   Send New Private Message       Edit/Delete Post 
More API requests:

TA_SetCursor - Sets the cursor to either a set of cursor provided by you, or allow the dev to set a specific image....

If you do not implement TA_SetCursor how about;
TA_DisableCursor - turns off the arrow, so that the developer may float an image about. SetCursor would probably lead to more efficient implementations, and thus is more desirable.

<more to follow>

Posts: 2675 | From: Washington | Registered: Dec 1998  |  IP: Logged
Luke 3024
Member
Member # 7451

Member Rated:
4
Icon 1 posted      Profile for Luke 3024     Send New Private Message       Edit/Delete Post 
What is the use of #define?

In Wind Racers specifically;
code:
--[[
#define DT_TOP 0x00000000
#define DT_LEFT 0x00000000
#define DT_CENTER 0x00000001 1
#define DT_RIGHT 0x00000002 2
#define DT_VCENTER 0x00000004 4
#define DT_BOTTOM 0x00000008 8
#define DT_WORDBREAK 0x00000010 16
#define DT_SINGLELINE 0x00000020 32
#define DT_EXPANDTABS 0x00000040 64
#define DT_TABSTOP 0x00000080 128
#define DT_NOCLIP 0x00000100 256
#define DT_EXTERNALLEADING 0x00000200 512
#define DT_CALCRECT 0x00000400 1024
#define DT_NOPREFIX 0x00000800 2048
#define DT_INTERNAL 0x00001000 4096

#if(WINVER >= 0x0400)
#define DT_EDITCONTROL 0x00002000 8192
#define DT_PATH_ELLIPSIS 0x00004000 16384
#define DT_END_ELLIPSIS 0x00008000 32768
#define DT_MODIFYSTRING 0x00010000 65536
#define DT_RTLREADING 0x00020000
#define DT_WORD_ELLIPSIS 0x00040000
--]]

I was guessing these would be constants to be referred to later but they don't appear in the script again?

Also I didn't see anything about this in the API

---

Another question, when specifying font in TA_DrawText does Arcadia try to find the font you specify on the users computer, or are they sort of built in? Like say I used a font that is not standard on windows 98, what happens to windows 98 users when i try to draw that text? I found a list of fonts that are included in all windows versions but there aren't a whole lot.

[ 11-29-2010, 11:27 PM: Message edited by: Luke 3024 ]

Posts: 98 | From: america | Registered: Feb 2007  |  IP: Logged
  This topic comprises 3 pages: 1  2  3   

Quick Reply
Message:

HTML is not enabled.
UBB Code™ is enabled.

Instant Graemlins
   


Post New Topic  New Poll  Post A Reply Close Topic   Unfeature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Synthetic Reality

Copyright 2003 (c) Synthetic Reality Co.

Powered by UBB.classic™ 6.7.3