网页 综合 更新时间 2025-01-18 19:52:01

Javascript great again! - The Voice of Void - DEV Community

自动蜘蛛 dev.to 正文约 6000 字
Javascript great again! - The Voice of Void - DEV Community
Posted on Jan 18, 2025 • Edited on Jan 21, 2025 • Originally published at community.aws
A thrilling game development, including a π / 42 theory. original post on community.aws
github repo: https://github.com/Pengeszikra/flogon-galaxy
Maybe a too much information are zipped into this small program. This will be happen if we ride on a creative flow. Sure this is just a POC level code, and I will continue on so many direction.
Try it: F L O G O N - G A L A X Y this is run on any device. Tested on mobile phone, tabblet, browser, even my TV basic browser.
Here is my desk where this program are created, and run on many different devices:
This project is built with a minimal dependency philosophy, stripping away unnecessary frameworks while keeping efficiency in focus.
My turning point was: On my work I am facing the fact that 8GB memory isn't enough for a legacy React application to build. The DevOps team solved the problem by setting 16GB RAM on a virtual build server. At that precious moment, I instantly lost all my trust in modern JavaScript frameworks and any compiling.
But this state are so strict, plus this hackhaton requriment is using some great AWS cloud API to extending my game possibilities near to unlimited. For the publishing is also need a minimal build setup. Even for the local testing your code which not need to compile is also great choice the pnpm / vite duo because of hot reload, which is so important on development time.
At the end I can keep the dependency on minimal level, which is give amazing loading time also. Details of minimal dependency details can you readed bellow or skip it.
Vite are nicely fragmented the whole project into a minimal size of chunks. Because this project is build on lazy coupled HTML pages.
A Progressive Web App (PWA) setup ensures that Flogon Galaxy runs efficiently on mobile, desktop, and even embedded browsers. TailwindCSS handles the design flexibly. But the main pain point is the setup of PWA. At first moment I asked Amazon Q to help me, but that solution cause broke my whole program look and feel, because generated a wrong service workes, which is stuck on browser, so when I tryed to fix it the problem that error are be stay even after a complet roll back, - thx to Amazon Q /dev functionality which is great! the modification can be easy review and roll back - , also try ChatGPTo1 help also failed to help. A problem is need to be reset the service worker on chrome. After this incident I figure out the solution by give a right question to AI: Why not a vite generate a PWA stuff under the build process ? Give to this job to a vite-plugin-pwa and configured perfectly are solved.
This program greatest help is my markdown editor: marker which is also great tool for testing a different aspect-ratio, which is a base question on the responsivity.
A great pillar of uncompiled / minimal dependency JS development was the really underrated JSDoc. JSDoc evangelism. To sort: as this project are proof JSDoc equal to TS without that dependecy ( just devDep ). So at the end: JavaScript remains readable and maintainable with strict documentation standards. Using JSDoc ensures clarity and provides editor hints even without TypeScript.
Using CSS transformations, we achieve a pseudo-3D effect while keeping performance high and dependencies low. The card game based on this css setup (Tailwind don't handle these attributes)
All cards are attached to #desk and that why see our cards in 3D.
My development don't realized under this sort time without AI workes help. Here is my AI crew list:
2024.06.27 -> alien-solitare : react based cardgame for dev.to challange 2024.07.06 -> pure-web-ccg : started my pure web work 2024.12.14 -> flogon-board : meanwhile I found reddit hackhaton also, a first game of Flogon series + sprite editor 2024.12.29 -> flogon-galaxy : I started focusing on this project
On this exact project I have just two weeks. Very underestimated. But thx of these helps the Flogon Galaxy are reach the state of technical demo.
For me the Amazon Q is a great help on a think phase - around november - when I created around 15+ mini game using by Amazon Q. This is a great help to quick try and test my different ideas. On later the implement phase the /dev command is the greatest help to solve a different task including a DynamoDB implementation, which case I not really familiar, but solwe that stuff under no time.
Which I don't like in Amazon Q is the too much extra question like a: Do you have another question? That is completly unneccecary in point of my view. Instead just show the next chat input line, and if I write to there something that means I continue the work, don't need a extra button click.
On early stage of this project: november, I created a markdown-view WebComponent, plus attach a simple textarea to it. My initial goal with that program just a very basci markdown-viewer, but after I implemented the minor syntax highlighting for a codeblock, and a iframe capability a whole new world open to me.
You can test this program on link: M A R K E R
Try to paste any markdown to it.
It cannot understund a different program languages, just a mix of HTML/JS/JSDoc setup on it, sure to need a extension, but it is working as POC, with a good speed.
Table, list, bold, are don't work, but the real power is the embedding url with a
But that is just work on locally a good reason, because I used it to instant save and load a markdown file. Just press the ESC and on input line write: e:rpg.md which is try to load a rpg.md from DynamoDB. But to do that, need to setup your DynamoDB credential to your .env which is looks like this:
of course for do that need to make your AWS account, and create a dynamoDB, it is worth it!
I have another development tools in this program:
You can found my code on this repo
As I sed at first I try to live without any framework, but I need a state managment, which is really important part of a complex application like a card game, where so ma
访问原文 返回搜索 https://dev.to/pengeszikra/javascript-great-again-the-voice-of-void-5fp6
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。