|
Hashes Displaying 1-20 of 20 total.
1
locke
|
Would you dev-types ever consider including hashes or associative arrays? I have used them to great effect with other languages, and they can be invaluable for dealing with lots of like data that you don't want to use a look-up table for. For example, a list of weapons. Very useful for building look-up tables for data stored in arrays, too.
Also, any chance we might be able to get mixed-type arrays? This is clearly attractive to those of us trying to build a database-like data repository (like that weapons list mentioned above).
-lok
Posted on 2004-03-11 22:45:58
|
grenideer
|
Hash tables and such are probably pretty hardcore for the average verge user. Umm, I don't think verge has pointer access. I could be mistaken, though.
Posted on 2004-03-12 02:59:32
|
mcgrue
|
Locke, you seem to be confusing vc and php. ;)
All those things would be cool indeed, however they are beyond the scope of the language's capabilities as I understand it.
PHP would be a neat basis for a game scripting language... not PHP itself, but a derivative... since a lot of PHP is geared specifically towards the concerns of Preprocessing Html, oddly enough. It's very simple, very versitile, etc... But it's most likely not in vc's future.
Posted on 2004-03-12 03:48:53
|
locke
|
Heh.
You have to go a little further back than PHP, my young friend. Associative Arrays ("hashes") are from the PERL era, which is likely why they show up in PHP also.
Actually, most of my experience with hashes are from LPC, the c-like language for lpmud development.
Perhaps there is some misunderstanding of what I'm talking about. I'm simply talking about an "array" that you address with strings rather than ints. It's really quite common, and not terribly complex.
Here... this might help: http://www.perldoc.com/perl5.8.0/pod/perlintro.html#Perl-variable-types
PHP is wonderful for front-end work, but it sucks at everything else. You must think I'm a moron if you think I'd suggest using PHP anywhere but on a lightweight website.
Just for the record, I started programming "publicly" (on the MUDs and more) in the late 80s. I've been doing server-side scripting for over 10 years, and "on-the-side" game development for about the same. I have a degree in computer science, "programming concentration", and I know a thing or two about large-scale professional software development, having worked in the industry for the past 8 years.
Though I sometimes ask moronic questions, that's mostly because VC is anything but strict C. It's almost C-like, but with things like the string type (a good thing), no pointers (a good thing) and quirky little "side-effects" like how you can't initialize an array in a function (err... no comment), it's not really even that close. It has a c-like syntax, and that's nice, but so does PERL, and even your PHP... but it's hard to call those "c-like". I love the idea of VERGE and VC, and I think it's moving along great! But don't think that because I ask simplistic questions that I don't know anything about development.
Besides... why would it be so hard to implement hashes? Are you guys, like, writing the language?
-lok
EDIT: forgive me. I'm doing my taxes.
Posted on 2004-03-12 17:28:57 (last edited on 2004-03-12 17:29:44)
|
locke
|
I have to respond to my own post with a hardy:
HA HA HA HA. Loser!
Sorry to the community. I really am doing my taxes, and if you swap out the programming references with references to paying taxes and being a good citizen, you'd see where my mind is right now.
I don't give a damn about hashes. I really like VERGE and VC. Everything is fine. Just move along. :)
Special sorry to mcg, vecna, et al. No offense is intended. I'd erase the whole post, but I figure a little public humiliation is good for one's ego every once in a while. And I hope it will bring some attention to the stresses of tax season! See what can happen when you don't do your quarterly filings???
I think I'll write a game about taxes...
-locke
(friend to all VERGErs)
Posted on 2004-03-12 18:28:02
|
mcgrue
|
Umm, I don't think verge has pointer access.
V2 and V3 both have DMA abilities... but you need to be pretty hardcore to use them.
Posted on 2004-03-12 20:23:29
|
vecna
|
Hehe.
Locke, I fully understand about taxes. The only two things in this world capable of putting me into a blind rage are traffic and taxes. :D
Hashes ARE useful... well.. Im sort of guessing that they are cause I never really use them. But your point is well taken.
There is no intrinsic reason why VC can't have hashes, and I've said before that the new VC compiler is a lot more extensible than the old V2 compiler. AFTER the initial release of V3, I fully intend to take a serious look at the VC compiler and see what additional features I can add. Floats will definitely be going in, and I will see if I can remove some of the restrictions on, for instance, local variables and function arguements. So hashes would be something that I would strongly look into, because for an "actual RPG", data management is a significant task.
But, since I could tweak the thing forever, I've basically "feature froze" the VC language for the time being until all of the official release, all the core systems are fully in, and all the major bugs are fixed.
Incremental improvements is the name of our game. Is v3 vc better than v2 vc? Hells yeah. So its good enough.
Posted on 2004-03-12 22:55:34
|
locke
|
Warning! I'm still working on my taxes... haha!
The wisdom of incremental improvements is very sound and well established. v3 is already miles beyond v2, and I am extremely happy with it, and what you have described as the future. Good plan, mate.
I have another one (which we discussed briefly before) that I'd like to add to the list of potential future additions:
{} access to arrays. Earlier today I was filling out a multi-dim array data for a skill system, and I ended up with over 1000 lines in about an hour. Granted, I could have crammed 2 or 3 elements per line, but it would have been nice to assign all 10 values in one line. Keeps things nice and easy to read.
Just a thought.
Beware the Tax Man, and keep it up, v. v3 is a whole lot better than "good enough." ;)
-locke
Posted on 2004-03-13 00:43:42
|
mcgrue
|
I've been doing that sort of array population via simple datafiles and simple parsers in sully.
TokenCount and GetToken are nice additions to vc.
Posted on 2004-03-13 02:03:25
|
locke
|
You know, I thought about doing something like that, but it seemed like it would end up being just about the same amount of work. And there's just something elegant about:
skill_data[0] = { 1,4,4,4,1,2,7,8,9,4,5,7,10; }
skill_data[2] = { 2,5,5,5,2,3,8,9,10,5,3,3,9; }
... etc.
But in the interem, I think I will try to do it with a file. What the heck? Maybe I can write an app to help build out the actual data, and dump it to data files. Hmm... now there's a thought. A content creation tool to use with a game made with a construction kit. I love it.
-lok
Posted on 2004-03-13 03:06:16
|
mcgrue
|
A content creation tool to use with a game made with a construction kit. I love it.
That has been brought up many times over the years, but nobody ever really made a little visual basic app to generate datafiles to be used by a verge game to my knowledge to date.
Actually, that's a helluva good idea for a later feature for people who want to alter datafiles slightly with the Sully Backend, but are scared of plaintext. But the question begs: if someone's unwilling to open a textfile, should we pander to them, or should we just send them to RPGMaker2k?
Posted on 2004-03-13 12:10:34
|
locke
|
An interesting question.
I suppose that speaks to how high the bar is for VERGE. Perhaps more specifically, how high the bar is for your intended usership...?
I believe that tools that assist in content creation are valuable. People shouldn't have to touch raw-data. On the other hand, if we are expecting someone to write a function to read in the data, then they must be able to understand the format of the data itself.
Perhaps a data entry/editing tool in this case is really only valuable as a time-saver, and not so much as a means of lowering the barrier of entry...? That is, unless someone wrote a VC library to manipulate the data, and included the tool that formats the data for the functions in the library. But again, it seems to me that if you are using data files in your game, you should probably know something about the data and how it's formatted.
I can, however, envision a time when there are a series of content creation tools that linger as "add-ons" to the main MAPED, that edit things like: conversation data, item data, monster data, etc.. and then VERGE becomes RPGMaker.
Which isn't such a terrible thing... no? There's nothing wrong with lowering the bar to allow more people in. I might even suggest that this lowering of the bar should be one of the primary goals of this project... and I already know it is, so I think we're on solid ground here.
Would it be possible to include an "add-on" API for MAPED? The only reason being convenience (not having to use a seperate app for your data manipulation).
Ohh dear.. then we should start talking about standardized datafile formats, and possibly binary data storage. AH!
-lok
Posted on 2004-03-13 21:13:13
|
mcgrue
|
If VERGE was as easily accessible/usable as RPGMaker, yet still let people play with the wires... that would be a glorious day.
Posted on 2004-03-13 21:29:57
|
grenideer
|
A long time ago for v2 (when I was coding the Diver Down engine) FireWarrior made a text editor app for monsters. The program would open a standard Windows window, and you could click 'new monster' and fill in the fields for its stats and such. This app would then generate a text file that his v2 proggy would read in.
It's a great idea for the long run of making an actual rpg, and I almost did it myself (since I used text files for items, monsters, party members, skills, special attacks, etc.). I decided to can the release of the PURGE kit as a v2 rpgmaker, and never made these.
Posted on 2004-03-13 22:45:52
|
Tatzen
|
Data editors are on my todo list, and I even have a couple finished from the gameboy advance project zeromus and I worked on for several months.
For example:
That was built with multi-lingual string pools in mind, which is useful... However, it needs alterations to just be more useful with v3. Also I have a utility that converts Excel CSV files to fast-access data files. It's horribly efficient (was designed for gba) and quite powerful. However, I will most likely create a much cleaner data editor + vclib some time after v3 1.0.
.. So, stuff is in the works. Expect to see some fairly awesome data management tools geared towards RPGs in specific.
Posted on 2004-03-14 08:14:31
|
Tatzen
|
Oh, also, 'hashes' dont necessarily mean string-based lookup. It simply means that you have a hash for every 'key' and thats whats used for sorting, etc. The key itself could be anything, really. It just has to be something that will give you a hash. Trivial, but I thought I'd point that out. ;p
Posted on 2004-03-14 08:17:12
|
grenideer
|
Yup, and the same key needs to always lead back to the same data. I was under the impression that this thread was about the capability of v3 to allow the programmer to write his own hash tables. But I guess it was about whether or not there would be some form of one built in.
Posted on 2004-03-14 21:33:43
|
mcgrue
|
You could write a hash table in v2/v3, but the syntax and functionality would make babies and nuns weep openly.
Posted on 2004-03-14 21:44:55
|
Raiden
|
We NEED tabular data with columns, and rows! Like a flatfile sorta thing. And then write it so it uses hexadecimal data files. Possible? I know we can't cheat and use something like microsoft jet, or mysql though. ("restricting" is all I can think of referring to database API's)
btw: VergeC scares me =D
Posted on 2004-03-16 23:56:12
|
locke
|
For the record, I just now finished my taxes.
All the input is great, and actually that last message from Raiden makes me think... would be great to have some basic database hooks. But, actually, some generic networking support would be fine. I'm thinking: downloadable updates, downloadable content, an online "ladder" for games that find that useful, etc. Could have some fun with that.
I still think associative arrays are a good thing (tm).
I haven't worked on a vc file in a few days... I'm starting to feel the pangs of designer withdrawl. I think I'll go have a whiskey.
-lok
Posted on 2004-03-17 04:45:51
|
Displaying 1-20 of 20 total.
1
|
|