Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: DFDB Remake (moved)  (Read 3388 times)

JodGap

  • Bay Watcher
    • View Profile
DFDB Remake (moved)
« on: May 27, 2014, 08:31:07 am »

(moved from Creative Projects)

Some time ago i was looking for developers to help me create a parser that could read dwarf fortress raws and generate tables with that data.
No PHP developers were found but i finished the parser and uploaded that data to a database and developed a very crude website to explore it.
That is how http://dfdb.info/old was born.
Then i wanted to design something fancier and ended with http://dfdb.info

I am developing a full revamp of the website. Im using Laravel (PHP Framework), Semantic UI, jQuery and mySQL.

Testing link
http://s503556695.mialojamiento.es/masterwork/items

So far this is how it looks:


It is responsive and looks nice on tablets too:


Even on smartphones:


As you can see in the pics i am getting ready to add a lot of new content, not just parsed items.

Please have in mind that we already have a Dwarf Fortress Wiki. My aim with this website is to be able to show content that you cant find in it or features needed by the community.

If you think that you can contribute somehow to add content to this website i can develop an account and a way for you to do it.

Cool things to be developed:
- Interactive dwarf that can be geared with the parsed items and calculates total defense, layer size capacity...
- Raws uploader that scans your raw files, cleans them, tokenizes the data and stores it in a database. You can export it or view it later on.

Thank you
~Nesis_
« Last Edit: May 28, 2014, 04:59:25 pm by JodGap »
Logged

Sallen

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #1 on: May 27, 2014, 09:09:13 am »

Very interesting and cool project indeed.

PTW and also if you ever need help with a specific task in PHP, MySQL or anything web-related, don't hesitate to PM me. It can't be a regular thing because I'm already spread too thin, but I can help out occasionally if this doesn't gather enough regular developers.

Vherid

  • Bay Watcher
  • [CREATURE:SLARK]
    • View Profile
Re: DFDB Remake (moved)
« Reply #2 on: May 27, 2014, 12:57:49 pm »

Interesting, looks much nicer.

Maklak

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #3 on: May 27, 2014, 04:17:12 pm »

Posting to watch... although I question why you use so many frameworks for something that would work fine with a bunch of linked static html4 pages, which is my idea of doing something similar. 
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Fen

  • Bay Watcher
  • Secretly A Kobold Werebull
    • View Profile
Re: DFDB Remake (moved)
« Reply #4 on: May 27, 2014, 04:58:12 pm »

PTW, looking forward to seeing what comes of this.
Logged
This space for rent

JodGap

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #5 on: May 27, 2014, 06:16:01 pm »

@Maklak The reason of using Laravel is to provide a standardized and tested way of doing things.
- A well-known framework (PHP or CSS) will be familiar to other developers who may want to work on this project.
- The website now follows a Model-View-Controller standard, RESTfull links, OOP and PDO instead of mySQL.
- I dont have to write everything. User's Authentication, Validation rules and other things are already done.

This will be a full dynamic website eventually. Things like the Interactive Dwarf, or the Online Raw Parser are complex and require more than a few static html4 pages.

NEWS:
I just finished importing all what dfdb.info had. Tomorrow i will try update the site to the new one.
Logged

JodGap

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #6 on: May 28, 2014, 05:00:01 pm »

so...
http://dfdb.info VS http://s503556695.mialojamiento.es/masterwork/items

Just look at the interface, dont trust the data
Logged

Melting Sky

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #7 on: May 29, 2014, 04:16:15 am »

Cool project. Posting to Follow.
Logged

Sallen

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #8 on: May 29, 2014, 06:27:47 am »

so...
http://dfdb.info VS http://s503556695.mialojamiento.es/masterwork/items

Just look at the interface, dont trust the data

A bit of constructive criticism: I find that in the current version relevant elements stand out more and the data is thus easier to read. The new interface is a bit too plain or generic.

Maklak

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #9 on: May 29, 2014, 12:14:36 pm »

Comparing this to my somewhat similar, but less user friendly scripts (Which it appears only I and Meph can use.)

http://dfdb.info/
* This is overloaded with graphics and doesn't have enough info (no attacks for example).

http://s503556695.mialojamiento.es/masterwork/items/axes
* 10 items per page as default is insanely low. Fortunately I can set it to a 100, which is still low, but with your division by weapon skill into separate tables it works. Unfortunately it resets to 10 when I navigate the pages.
* I any case, I prefer one big table of weapons, sortable by weapon skill. (Or several tables on one page.)
* Combine Name and Adjective columns - you'll get one free column. In general, I've found that I needed to find ways to conserve horizontal space in my tables.
* Search filter and sorting by columns are nice features. If you can do this, then maybe you could also add a bunch of checkboxes on top to select which columns to display. (I can't really have those features in my scripts due to my lack of skill in Javascript. Well, search works by <Ctrl+F> and I had a sortable table script somewhere, I guess.)

I'm interested how you intend to handle materials. Reading INORGANIC and MATERIAL_TEMPLATE is not a big deal, but there are things like leather, cloth and other materials which I'm unsure how to handle.

In any case, you've motivated me somewhat to keep on working, even though your tool(s) will ultimately win.

BTW, why is this thread in General discussion and not in Modding->Utilities and 3rd party applications?
« Last Edit: May 29, 2014, 02:10:57 pm by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

JodGap

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #10 on: May 29, 2014, 04:53:37 pm »

I really really apreciate your support and your suggestions / constructive criticism.
Sometimes when you are developing something like this you get lost and forget about what you where trying to do.

 @Sallen Would it be better if i bring the icons back?

 @Maklak I got inspired to do this when i first saw the tables made by your scripts in Masterwork's manual.
You have lots of experience doing parsers. You are more than welcome to join the project if you would like to create parsers in PHP that could extract data from the raws to an associative array. I could give you the base script that i use to parse the items.

I will apply your suggestions in the next update.
I havent yet think about how to parse materials. But i will keep you informed when i do.
I am struggling to choose where this thread belongs... It started in the Creative Section, then moved here... hahaha




« Last Edit: May 29, 2014, 04:56:07 pm by JodGap »
Logged

Maklak

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #11 on: May 29, 2014, 06:16:42 pm »

> Sometimes when you are developing something like this you get lost and forget about what you where trying to do.
I know, having another person comment from a different angle is very useful.

> I got inspired to do this when i first saw the tables made by your scripts in Masterwork's manual.
Heh, nice to know. It also shows how much I neglected my project over the past year, if you managed to do all this and I'm less than halfway done.

> You have lots of experience doing parsers.
Not really. I haven't read any books on the subject and don't even know how things like Parse::RecDescent or yacc work. All I did was parse some text with regexps and put the results in nested arrays and associative arrays. Technically this is fairly easy, but it is a lot of butt in the chair work and a lot of code. Magmawiki was pretty helpful with which tokens are the most important, but I'm partly walking in the dark here. For me, actually knowing the RAWs is a more critical skill for my (and this) project than slicing it up with regexps.

> You are more than welcome to join the project if you would like to create parsers in PHP that could extract data from the raws to an associative array.
Nah, IIRC you already got a Perl teacher who is way ahead of me on the team. Besides, I have little time and motivation these days, never even touched PHP and would rather finish my own version.
If you see anything in my scripts that you'd like to copy, feel free to do it.

My idea for a parser has evolved from full frontal spaghetti code into more modular approach:
* One function to get next token. It is a bottleneck and should be fast, preferably even not based on using a regex to fetch stuff inside [] or the thing that unget token put back. It takes care of opening slurping and closing input files, so tokens are seen as a continious stream with some special tokens "__EOF__" in between.
* One function to unget a token, so that get_token returns it next - this is a very useful feature for backtracking.
* One hash (associative array) of "Master Tokens" - things like PLANT CREATURE ITEM_... and so on.
* One master function to read data. It looks for master tokens, then calls a specific function to read a plant, animal, creature or whatever.
* A number of functions to read specific RAW items, like a plant or a trap component. They return (or store in a global array) associative arrays filled with data from RAWs. These functions should be in their respective modules/classes, along with functions for printing, storing in databse or whatever else you need. They can call some other specialized functions, like "read weapon attack" or "read interaction".
* Since there are so many DF tokens and I'm lazy, I don't read them all. Instead, the "Master function" ignores everything that's not a master token. Specialized functions ignore unrecognized tokens, but on an end of file or a master token unget that token and return so that master can sort things out.
* Avoid regexps where a simple string comparison will suffice. Also, part of the token before the first colon can be obtained at the beginning of a switch statement, then compared multiple times.
* I'm not using a database and you might have some trouble with this approach, because some things I print as columns are actually made of arrays, associative arrays, or multiple scalars under different names, which in a DB this is solved by throwing more tables at the problem.
* I considered writing a function to print a table from an associative array, but it proved to be too much work, compared to every item type having it's own function to print a table without translating it to some intermediate representation first. Those functions use a bunch of global configuration variables that tell them how to begin table, separate columns, etc.

> I am struggling to choose where this thread belongs... It started in the Creative Section, then moved here... hahaha
The most intuitive place for me is "Utilities and 3rd party applications", since that's what this is. I only managed to find it, because of the link in your old thread.

I complain a lot, but I like how pretty and user friendly your tables are (and on a web server, which I don't know how to set up), but not the amount of info provided. Tools to give advice on what is good and what can be worn with what would be great.

Another useful feature would be for items to have links to other items, for example an interaction or reaction chain would be easily navigable with just relative links and anchors on IDs. (I insist on listing IDs in my scripts because then are very useful to modders / advanced users).

> I find that in the current version relevant elements stand out more and the data is thus easier to read. The new interface is a bit too plain or generic.
It is Windows 8 ugly, but functional. I assume there will be a graphical overhaul, but I'd rather see more info in general and no row limit than prettier icons.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Reelya

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #12 on: June 02, 2014, 07:53:36 am »

Hmmm this Laravel sounds interesting, I was about to start working on a browser game and looking around for some way to set up a user account framework. Is that open source?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFDB Remake (moved)
« Reply #13 on: June 02, 2014, 09:49:08 am »

Quote
(Which it appears only I and Meph can use.)
Yeah, I am a bit surprised by that, but maybe it comes from the need to install something, and read into the material a bit. No UI means less people using it.

And Jodgap, how is it going? I did update and clean up most of my items, there are only a few in the tool section that I have to remove. Any chance you could update http://dfdb.info/ with the new raws?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

JodGap

  • Bay Watcher
    • View Profile
Re: DFDB Remake (moved)
« Reply #14 on: June 06, 2014, 10:43:27 am »

Hmmm this Laravel sounds interesting, I was about to start working on a browser game and looking around for some way to set up a user account framework. Is that open source?

Laravel is an open source PHP Framework that makes developers love to code in PHP back again.
It has a built-in ready to use Auth system based on routes/controllers and filters.

Also... OctoberCMS, but you must know Laravel first. (October Content Management System makes things really easy)
« Last Edit: June 06, 2014, 11:18:08 am by JodGap »
Logged
Pages: [1] 2