Henry’s tech talk
Started By
This is a totally optional read, it’s sort of the behind the scenes thread on why I do x instead of y. What I’m working on now, etc


summary
 the immediate goal is to de couple the code from the design. After thats been done I can make the real mode
ization push 

The old alacrity co mingled design, code, with no code/design reusability at all. It also uses a very old version of php which prevents me from upgrading the server or php. The database functions are not wrapped, tables are hardcoded into the pages. so I have to go line by line fixing each.

It is impractical to use a mode
 program design (heavy JavaScript calling back end API) without first untangling and identifying everything first, because the api would end up changing every few days as I discovered something new. And also because the php pages would then have copious amounts of JavaScript added on top of the php /html already .

Modifying the design requires a programmer to implement a design at the moment. This is very inefficient 


I think the biggest question is probably , what’s with the pop ups? 😂 

Pop ups allow me to split the player actions from the page, without having to redraw the page every time a player does something.

These can be quickly cut over to mode
 design after I finish the rewrite.


The background Alacrity 1.0 uses a series of 300 pages, with no backend libraries, no real configuration and a ton of global variables. It uses a very old version of php, which was going out of style when alacrity was going live. The html design code is co mingled with the backend code. The pure backend cron jobs (daily resets, breeding , trials , etc) are similarly written. In game events and player actions are generally in-line within the code. The databases also suffer some design flaws (text key lookups, case sensitive column names, incorrect designs, confusing variable names, etc etc Due to the lack of back end libraries, there is a lot of repeated code. The html design is such that the webpage is co mingled with the software. In short, this is a Web 1.0 project. What makes it extremely impressive, is the size of alacrity. It’s sort of like building a pyramid in ancient Egypt. There is a lot of love that went into its design. It’s probably 500,000 lines of code. This is a large project, even by today’s standards.
Methodology to fix Normally, it is not recommended to fix a project, but rather start from the ground up, leaving whatever is there in place until you are ready to construct a replacement. This wasn’t really possible because of the lack of backend libraries, and the file structure (300+ 50-10k line each pages in 1 directory, with inconsistent methodologies) .Code was in-line, oftentimes repeated with subtle changes each repetition . There are many Easter eggs in alacrity (some of which require manual enabling, and I haven’t even found yet) Things like the dog rendering have “glitches” (software and design errors )since glitches are an important part of alacrity, I had to preserve these errors into features . In short, if I rewrote alacrity, I would sterilize instead of revitalize it! My goal was to keep as much of the look and feel as possible
So renovation it was. Steps (in no particular order) 1/ sketch out the minimum libraries required to manage 2/ identify and isolate player actions from the design flow 3/ modernize database interactions (this is a major problem) so we can move to new server 4/ break code into re usable modules 5/ modernize HTML from old table designs , which are not very flexible, into divs 6/ split all pages into a “code section” vs a “template section” 7/ remove all global variables
The leap to the future 1/ move all “code” to an api 2/ make most pages pure JavaScript/ html as possible, which then call the api for data. 3/ implement a proxy to sit overtop of alacrity api to route to the core api so that the next generation of features can be seamlessly implemented

04-3-2024 at 11:15 PM
Countryoaks101 (#22629)

No need to stress over a boomer comment, I'm Gen X, so I'm not far behind 😂

Yes, all the old styling has been preserved.

There are a few Layout problems with the old site, that I have been resolving

1/ uses tables with fixed height and width, which make it very unfriendly for mobile use.
2/ the website design co mingled with the workflow.
3/ database is a disaster.

Put these together and its what has been preventing the site from regular updates , error prone behavior, and general growth.

My plan after the design has been separated from the 'logic' , is to re engineer the site with new software development and design techniques.

Due to the size of the website (alacrity is actually a very large project, more complicated many modern games), this has taken some time to get done.

That being said, I saved all the style sheets for custom layouts of alacrity, and after I get through splitting the code out, I can start shifting to more modern design principles.

My alternative was to totally redesign the site from the ground up, pray it worked, and if it didnt lose some features or other functionality, plus we wouldnt be able to actually go live until it was fully ready.

anyhow, thats the why

04-3-2024 at 10:20 PM
I cannot imagine how much of a responsibility this all is.

I have been out of the loop and haven't really been on Ala much in the last year so I am sorry if this is a "boomer" styled comment. Is the formatting of the website going to return to what it was before with the new coding? Like the old layout where everything was on one page when looking at a dog instead of having it condensed and on tabs, for example? I understand if it changes slightly, but I find the new layout currently harder to use (of course that might be muscle memory taking over).

One thing I do like is being able to equip items without having to go all the way to inventory and immediately being redirected to the dogs page each time I add an item (kind of like ChickenSmoothie in that regard). Is it going to stay like this from now on or will it return to what it was before?

Last thing, but I miss the old monthly shop (monthly theme and grab bags) and holiday events (halloween zombie event anybody?). Now that I am an adult, I have adult money that I wish I could have had for events and things like that. If we could bring things like that back (idk how hard that would be, plus certain features are more fun with more active players of course), I would be very happy!

of course all these are suggestions and mostly questions since I have been out of the loop for so long. I hope this is okay.

03-9-2024 at 2:26 AM
Hec, some days when I go back to edit code I was working on, I don’t understand what I did 😂

I just rely upon the fact that I usually do a decent job with it so trust the logic worked

02-29-2024 at 9:21 AM
This is probably not quite the response you were looking for, but the only one that kept repeating in my non techy brain as I was reading this.

Wow. Just...Wow.

What a HUGE undertaking, and I'm sure I am not even grasping a tenth of what you have done...


Login

Username:
Password:
Signup
Username: *
Password:
confirm:
Email:
Birthday:
Referrer:
  • = required field
  • two accounts per person
  • email verification necessary
  • the secret question is in case you forget your username or need to reset your email address