51

Re: NeverTable for Levelset

Of course, html5+css3 for all the design. I don't know well css3, great if you do ht-never.
Javascript, not exactly "ajax" I agree, to manage events and send asynchronous API requests to fill the DOM. There probably won't be xml at all as JSON is the classic candidate for that kind of tasks.
jQuery can be useful to manipulate the DOM easily, I don't know it we really will have to use it or not but it can be easier afaik.

52

Re: NeverTable for Levelset

Of course, html5+css3 for all the design.

Of course.

~DEV

53

Re: NeverTable for Levelset

Small UI idea

Post's attachments

small-ui.zip 301.47 kb, 82 downloads since 2012-09-12 

~DEV

54

Re: NeverTable for Levelset

shino wrote:

  - Get some girls registered on the site.

Cheeseness wrote:

What makes you think we don't already have some wink

uh oh, my cover's blown!

Currently Playing:
Celeste and Electronic Super Joy

55 (edited by ht-never 2012-09-12 08:17:03)

Re: NeverTable for Levelset

D:

~DEV

56

Re: NeverTable for Levelset

Shino: gettext doesn't work for me.

Fatal error: Call to undefined function bindtextdomain() in C:\Program Files (x86)\EasyPHP-12.1\www\nblev\ressources\ConfigManager.php on line 71
~DEV

57

Re: NeverTable for Levelset

ht-never wrote:

Shino: gettext doesn't work for me.

Fatal error: Call to undefined function bindtextdomain() in C:\Program Files (x86)\EasyPHP-12.1\www\nblev\ressources\ConfigManager.php on line 71

That's strange, bindtextdomain() is a standard function in PHP4 and PHP5...
Are you sure you get gettext extension loaded, did you take a look at phpinfo() ?

58

Re: NeverTable for Levelset

Some questions :

  - PunBB authentication is working. I don't know if it's better to redirect the user to the forum login page when you want to login, or should we have a small form inside the site to log in ? The latter is a bit risky I think as we don't rely on punBB mechanisms the same way as if we use its form to login. In all case, if a visitor is already logged on the forum he will be authenticated automatically, if he doesn't he will have a "login" link / form somewhere.

  - Does a set absolutely has to get 25 levels ? Or can we imagine a set having 3, or 4 levels only ? Does Neverball manage sets with less or more  than 25 levels ? Is the ordering of levels important to match bonus levels in 5th, 10th, 15th position or can it be arbitrary ? Sorry I don't know well Neverball internals and I'm lazy to look at the source now ^^'

59 (edited by ht-never 2012-09-13 19:22:42)

Re: NeverTable for Levelset

- I vote for a small login form.

- Bonus level's position is arbitrary, but by convention we make them match with 5,10,15,20,25

- A set can have less than 25 levels. Can't have more than 25

P.S. I have gettext installed on EasyPHP 12.1, but it's still not working

~DEV

60 (edited by Cheeseness 2012-09-14 03:56:34)

Re: NeverTable for Levelset

ht-never wrote:

- Bonus level's position is arbitrary, but by convention we make them match with 5,10,15,20,25

This isn't quite true actually. Bonus level positions are hard coded within the game (an arbitrary design decision perhaps, but it's a standard that set creators must adhere to and isn't changeable without disrupting existing sets).

Edit: It seems I was under the wrong impression ^_^

shino wrote:

- PunBB authentication is working. I don't know if it's better to redirect the user to the forum login page when you want to login, or should we have a small form inside the site to log in ? The latter is a bit risky I think as we don't rely on punBB mechanisms the same way as if we use its form to login. In all case, if a visitor is already logged on the forum he will be authenticated automatically, if he doesn't he will have a "login" link / form somewhere.

It'd be nice if we could dress up the PunBB login page as a Nevercorner wide login. I haven't looked at how PunBB's authentication mechanisms work though. Is there a way we could provide a page to redirect to after logging in, or is that all pretty tied into redirecting to specific forum pages? Maybe we could look at embedding the PunBB login page?

- Does a set absolutely has to get 25 levels ? Or can we imagine a set having 3, or 4 levels only ? Does Neverball manage sets with less or more  than 25 levels ? Is the ordering of levels important to match bonus levels in 5th, 10th, 15th position or can it be arbitrary ? Sorry I don't know well Neverball internals and I'm lazy to look at the source now ^^'

We have sets in the game with less than 25 levels, so I think we should allow that (it'd also be nice for people still building a set to give others the flexibility to try out a smaller/n-progress set). Currently levels are numbered 1 through to 20 and bonus levels are I through to V in the level selection menu, so it would be nice if the set/play list assembly interface in the level repository allowed bonus levels to be selected/shuffled independently of the main levels (could be nice to do something that shows a grid layout similar to the in-game level select screen that supports drag and drop reordering - that'd let us use some more of jQuery's functionality :b )

In the set-name.txt file though, they're just listed as a sequence of .sol names (without anything indicating bonus levels - should this be changed at some stage? Should we allow sets without bonus levels?).

Cheese
==========
cheesetalks.net

61

Re: NeverTable for Levelset

Actually, what ht-never said is absolutely correct, bonus level position is arbitrary. They are specified by setting the "bonus" field in the map itself. (So yes, you can have XXV bonus levels in a set.) Also, bonus levels are completely optional. Nevermania, for example, does not have any bonus levels.

62

Re: NeverTable for Levelset

parasti wrote:

Actually, what ht-never said is absolutely correct, bonus level position is arbitrary. They are specified by setting the "bonus" field in the map itself. (So yes, you can have XXV bonus levels in a set.) Also, bonus levels are completely optional. Nevermania, for example, does not have any bonus levels.

Oh, I sit corrected!
For some reason I thought they were hard coded >_<

Cheese
==========
cheesetalks.net

63 (edited by ht-never 2012-09-14 11:48:44)

Re: NeverTable for Levelset

parasti wrote:

Actually, what ht-never said is absolutely correct.

Occasionally, what I say make sense tongue

~DEV

64

Re: NeverTable for Levelset

Sol files don't seem to be very easy to parse, at least in PHP.
What do you think we should do about uploads to the repository : should I ask for two files : .sol and .map, so I can parse the .map which will be a lot easier, or do you think it worses writing a php sol parser to extract main informations such as basic info (orignial author, time, goal, bonus) and son on ?

65 (edited by ht-never 2012-09-17 19:19:17)

Re: NeverTable for Levelset

The uploader mustn't upload a sol file wich is the compiled MAP, on the contrary the *.map file is needed. Look at my repository on the NeverTrack for an example.

~DEV

66

Re: NeverTable for Levelset

I think we should have both actually, the .sol file to be able to provide complete zip file for a immediately playable set without compilation, and the .map file for developers who would like to edit / compile it ? Or map file is enough ?

67

Re: NeverTable for Levelset

shino wrote:

Or map file is enough ?

Is this a serious question? I guess map files are enough if you want to compile the SOLs on the server and automatically package a new ZIP that includes the SOLs. Otherwise, they are absolutely not enough. You have the right idea, the repo will be useless if people can't simply download a ZIP and install by copying it to a folder.

68

Re: NeverTable for Levelset

Sorry, I misspelled and getting confused.
I wonder if sol file is enough, not map file.
  - If we consider storing map file as well as sol file, I may parse the map file as it would probably be easier, but we need to ensure both files are updated by the user in case a level is changed to keep consistency.
  - If we consider storing sol files only, which is sufficient to provide level / set download, then we need a simple sol parser in php, which could be a bit more difficult but maybe not as difficult as it seems at first glance. I need to look further to tell as I don't know sol format at all.

69 (edited by Cheeseness 2012-09-17 21:45:57)

Re: NeverTable for Levelset

shino wrote:

I wonder if sol file is enough, not map file.

I expect that we'll be able to get all of the information out of .sol files without too much hassle.

I'd be keen to see .map files as an optional extra that authors who wanted to encourage derivative works could upload as well (this could be something needed for inclusion in a release?).

Edit: Map files, not sol files >_<
I'm getting myself confused too.

Cheese
==========
cheesetalks.net

70 (edited by parasti 2012-09-17 21:37:48)

Re: NeverTable for Levelset

Okay, I like that clarification. Thanks. wink

It seems that if you want that info, you really should read the SOL. The format isn't particularly complicated, but I am more concerned about code synchronization. Your PHP-based SOL reader will break every time the SOL format changes, and I do expect that the format will keep evolving. Using something that shares code with Neverball would be preferable... Like a command line parameter or a simple program, or maybe even a static library.

On to the SOL format. You can see an overview of the format in share/solid_base.c:sol_stor_file(). BTW, I'm speaking of the newest version in the repo. 1.5.4 is a little different, and the file names are probably different.

What you need is the text counter (ac), dictionary counter (dc), the text array (av) and the dictionary array (dv). Luckily, the dictionary array is right after the text array, so you only need to skip a bunch of 4-byte integers.

A "dictionary" is two 4-byte integers that are offsets in the text array.

To read the level info, you iterate over the dictionary array, e.g.,

for (i = 0; i < dc; i++)
{
  struct b_dict *dp = dv + i;

  char *key = av + dp->ai;
  char *value = av + dp->aj;

  /* Etc. */
}

71 (edited by Cheeseness 2012-09-17 21:49:27)

Re: NeverTable for Levelset

Good post, parasti.

Can't believe I got map and sol mixed up as well >_<

Cheese
==========
cheesetalks.net

72 (edited by parasti 2012-09-18 03:12:05)

Re: NeverTable for Levelset

BTW, I object quite strongly to the idea of map sources being considered an "optional extra". That goes hardcore against the basic principles of our little project here (being open source and sharing knowledge and all that).

Instead I propose to display a giant red "F.U." error to anyone who tries to upload a level set without map sources.

73

Re: NeverTable for Levelset

I agree with parasti. The source file must be included.

~DEV

74

Re: NeverTable for Levelset

parasti wrote:

Instead I propose to display a giant red "F.U." error to anyone who tries to upload a level set without map sources.

That stands for Format Unacceptable, right? ;-)

75

Re: NeverTable for Levelset

OK. So I'll ask for a pair of file; .sol and .map and try to make minimum checks to verify both are consistent.
I'll try to write a PHP parser with minimum functionalities to read dictionaries entries I need, excepting this part won't evolve too much, and if it's a nightmare I may roll back on a C parser to generate something more php-firendly such as xml or json based on neverball source code as you recommend.

Thanks guys :-)