Lurker News
With the quarantine being placed in effect in a lot of cities across the world, we all likely have a little bit more time to focus on personal projects or learning something new from the comfort of our homes. What are you guys up to these days?

Comments (1,237) 697 threads

Earlier comments
bartread9 replies#
I've just finished off (within the last hour) my version of Asteroids, which I started with enthusiasm two or three years back, then did very little after getting the basics of the game working:

https://arcade.ly/games/asteroids/
Now I've finally added all the stuff I wanted to (black holes, satellites, power-ups) so it's time to pick up another project I started a long time ago and haven't really done much on: my very own version of Space Invaders:
https://arcade.ly/games/space-invaders/
(WARNING: this one is barely functional - e.g., no levels, no shield damage, no scoring, invader firing pattern is all kinds of wrong, invader movement isn't quite right, etc.)
Enjoy! (And feedback welcome!)

nostromo1 reply#
super fun!
bartread1 reply#
Thanks - glad you enjoyed it!
555551 reply#
I can never get into games but within 2 seconds I was super into this game. I used to play asteroids as a kid, the version that came with Windows, but yours is way more intense.

Continue this thread — 1 reply

tonyedgecombe1 reply#
Nice work.
bartread#
Thanks - very kind of you!
scott-smith_us1 reply#
Very nice!
bartread#
Thank you - appreciate it!
Hashimm1 reply#
nice work!
bartread#
Thank you! Much appreciated!
tombh1 reply#

  All my lonely days are over
bartread#
Haha, I know, right?

I licensed that from PremiumBeat. In the early 2000s a friend introduced me to Cowboy Bebop, which I've been a massive fan of since (along with its excellent soundtrack), so I wanted some music with the slightly whimsical, slightly melancholy feel some of the tracks in the show had for Game Over.

abrookewood1 reply#
They effects are quite eye catching. Can you tell us how you built them?
bartread#
Thanks, and for sure.

It's all Canvas 2D at the moment. There's no WebGL because when I started this project, three or four years back, it simply wasn't ubiquitous enough. Now I might be able to get away with WebGL (using something like Pixi.js) but the last couple of weeks I really just wanted to finish what I started rather than do a relatively substantial rewrite.
Another quirk is that I'm not using (think Phaser.js, or whatever), because the two main motivations for starting this project were that:
1. I wanted to get better at JavaScript, which I'd always been weak at.
2. I guess 2015/16 was a time when the front-end world felt like it was really going nuts with new frameworks coming out all the time, so I wanted to become familiar with and see what I could do using only APIs built directly into the browser.
Getting back to the point, in terms of effects I've implemented services to keep track of and render lists of particles and "clouds" of vapour. The latter are the translucent circles you see used to render rocket exhaust, and some of the explosion effects.
In fact I just use one service for both and swap in a different renderer for particles or vapours in each service instance, since both behave substantially the same.
Since we're throwing around hundreds or thousands of particles/vapours at a time, and, well, a lot of particles throughout the duration of a single game, and we want to avoid much garbage collection to keep the frame rate steady[1], I implemented an object pool so we're not constantly creating loads of garbage.
Particle types are defined declaratively: colour stops (including transparency), duration, expansion rate for vapours. Instances of particles also have properties like position and velocity.
Explosions are also defined declaratively with an arbitrary number of stops/events at timed intervals which define number and type of particles spawned, angular range through which they should be spawned, initial spread, velocity spread, any sound effect(s) to be played at each stop.
There's a service that manages explosions that you tell call with something like:

    explosion.create(explosion.playerExplosion, player.position, player.velocity);
This will create an explosion of type "playerExplosion" at the player's position and apply the player's velocity as a drift to all particles and vapours created.

So once I've defined my explosion types it's easy to use them in a variety of different scenarios throughout the game without cluttering the logic too much. The services take care of rendering and particle management so these days I don't have to worry about it too much.
Hopefully that goes some way to answering your question but if you'd like to know anything else, please shout.
[1] GC screwing the frame rate is a genuine issue I ran into with this, particularly on mobile devices.

gonational1 reply#
The Asteroids game!

The graphics, music, and fluid motion are awesome.
But, I cannot stand the controls. I play games like this laying down in bed at night, which automatically disqualifies this, due to its use of my phone’s orientation. Also, the modal disconnect between throttle and direction controls (one orientation and the other button press) is too much to tie to muscle memory.
If you added an “old fashioned mode” with a dynamic joy stick (appears where ever I put my thumb within one bottom quarter of the screen) for direction and throttle (touch to engage and drag a small amount in any direction to turn and go that way), that’d fix the issue. NOVA 3 for iPhone got this 100% right. Then, a small section on the other bottom corner could house a few small buttons to engage hyperspace, etc. Just let the user pick right or left handed.

bartread1 reply#
Thanks, that's a great suggestion. I had tried pure touch controls before but it was a complete disaster. Never even occurred to me to anchor against a dynamic touchpoint. That'a a really interesting idea. I'll have to check out how it works in NOVA 3.

Tbh, I've never been satisfied by the tilt controls: they work OK if you're stood or sat still, but if you need to move at all whilst playing it can end up going sideways. I probably haven't yet put in enough effort to get them to feel right whatever the ambient orientation of the phone.
I think you're right though: I need to offer an alternative control scheme that's touch only.

gonational#
Hey, thanks for the reply. Awesome, I’ll be excited to give the new controls a try!
chungus1 reply#
Really like what you did with little red enemy ships starting as 1 whole and then splitting, very cool.
bartread#
Thanks, appreciate it.

I'd love to take credit but sadly not my idea. Very similar ships featured in Asteroids Deluxe back in the day: https://www.youtube.com/watch?v=GGODay8YUio. I thought it was a great idea so decided to add them to my version just because they add a bit of variety.

o-__-o1 reply#
Gonna finish up work on my 3D marble madness clone now. Thanks for the motivation!
bartread#
Yes! Do it! And please send me a link when it's ready to play test.
rococode5 replies#
Meta: This thread is fun to read, it's cool to skim through such a large variety of ideas and projects. I wouldn't mind seeing it as a monthly thing like the "Who is hiring?" posts. There'd probably be some overlap with Show HN, but I personally wouldn't mind if it's just once a month.
kubanczyk#
So... Maybe Ask HN next month, would you?...
ngould#
Seconded
snazz#
lobste.rs does “What are you doing this week[end]?” posts every week or weekend, which are nice for that smaller community. I think once a month would be perfect for a community the size of HN.
mengibar10#
and upvoted
gitgud#
I was going to write a snarky comment like: "This is what, Show HN is for..."

But then I realised this thread is different. This is for projects that are In Development, and people are more likely to post things that aren't finished, so I think that's a great idea!

sthottingal6 replies#
I am developing a modern wikipedia interface - a Vuejs powered modern, single page, progressive, offline capable web application for Wikipedia. I have been working on this for last several months and have working version available at https://wikipedia.thottingal.in

Source code and more details available at https://github.com/santhoshtr/wikivue
It is a fully client side PWA application using wikipedia web apis, installable in desktops and mobiles and use like a native application. It has offline support - With the help of service workers, the application even works when there is no internet, provided, the content is previously viewed. It is a single page application - page does not reload when exploing wiki articles, presenting an immersed reading experience. uIt ses modern UI framwork Vuetify. Adapts to all kind of screen sizes. It presents an optimized reading experience with good typography and optimum page layout. Multilingual by default - All language editions are in single app. Using language selector user can select the language edition.
I wanted to make this as a p2p capable application. Currently it runs on dat protocol as well: dat://25689f3a757853a511474d38f0a6d6be2cd2b0cb161686d75fda5c1619137921(need beaker browser) or wikipedia.hashbase.io

rl3#
The layout reminds me of Everipedia, but cleaner. Well done.
boramalper#
I really liked it, well done!
LockAndLol#
That is awesome. Wikipedia definitely need a better editor too.

Props on using dat too. We need less centralization.

jeremyjh#
Is there a way for it to simply follow the links when I click on them? It looks like I have to click twice to "Read Article" after clicking on a link.
JoshuaRLi#
This looks pretty clean! The enhanced readability reminds me of Wikiwand.

If you're looking for a bit of feedback, the search doesn't seem to handle fast typing well. I tried searching for "Frank Chu" and it seems that if I type it really fast, I get either no results or Franks that aren't Frank Chu. If I type slower, Frank Chu shows up.

jpgvm7 replies#
Log storage and search system for structured logging data in Rust.

i.e a database optimised for logs and log-like data and nothing else.
Existing solutions are too inefficient for the use case of logs (TB+/day), suffer under high field cardinality, are based on costly and unnecessary full-text-search systems that aren't well optimised for logs data or just plain and simply can't handle structured data and degrade to simply storing lines.
Design goals are super efficient/fast, extremely fast distributed regex matching backed by trigram bitmap indices, columnar storage for compression and cardinality reasons.
I have a prototype of the indexer and lowest levels of the query engine and regex syntax to trigram query optimiser. Will be adding the ingress and query frontends hopefully have something to show soon.
I don't know if I am going to go OSS or not but definitely designed to be run on-premise though I could easily run it as a multi-tenant service if people are interested.
I founded my own startup in the past and have been putting off actually doing a real side-project for the last couple of years but could never get away from the itch so this is going to be my swing I think.
If this is something you find interesting hit me up, or if you are just frustrated with ELK for some reason or another let me know what you think sucks and I'll try build something that sucks less at that.

jpgvm2 replies#
Linear search approaches fall down when you have a lot of data and you only want to select a very small portion of it.

A linear based approach can get you to about 1GB/s or so per core with Rust.
A medium-ish size startup probably logs around 200GB/day of logs if they aren't very tight on their log volume. If you only want to search the last 24 hours that is maybe ok, you can search that in ~10-20 seconds on a single machine.
However this quickly breaks down when a) your log volume is a multiple of this and/or you want to search more than just a few hours.
In which case you need some sort of index.
There are different approaching to indexing logs. The most common is full text search indexing using an engine like Lucene. Elasticsearch (from the ELK stack) and Solr explicitly use Lucene. Splunk uses their own indexing format but I'm pretty sure it's in a similar vein. Papertrail uses Clickhouse which probably means they are using some sort of data skipping indices and lots of linear searching.
Of these approaches Clickhouse is probably the best way to go. It combines fast linear search with distributed storage and data skipping indices that reduce the amount of data you need to scan. (especially if you filter by PRE WHERE clauses).
So why not go with Clickhouse? Clickhouse requires a schema. You can do various things like flatten your nested structured data into KV (not a problem if you are already using a flat system) and have a single column for all keys and the other column for values. This works but doesn't get great compression, makes filtering ineffective for the most part and you now have to operate a distributed database that requires Zookeeper for coordination.
The reason I am choosing to build my own is that logs require unique indexing characteristics. First and foremost the storage system needs to be fully schemaless. Secondly you need to retain none word characters. The standard Lucene tokenizers in Elastic strip important punctuation that you might want to match on when searching log data. Field dimensionality can be very high so you need a system that won't buckle with metadata overhead when there are crazy numbers of unique fields, same goes for cardinality.
TLDR: For big users you must have indices in order not to search 20TB of logs for a month. Current indices suck for logs. I write custom index that is hella fast for regex.

manish_gill#
My first thought was also Clickhouse and the problems with schema for dynamic log content.

Also, if this is open source, I will definitely be interested in checking it out/contributing etc.

hodgesrm1 reply#
Here's another thought--why not try to fix this in ClickHouse? It sounds like you are rebuilding Elastic.

Continue this thread — 1 reply

notduncansmith1 reply#
I have a similar goal with this project, a multi-tenant log storage and retrieval system: https://github.com/notduncansmith/loghive

The idea is to shard the data by logical domain and by time segment, so that queries only apply to relatively small and efficiently-read data, and to exploit the embarrassingly-parallel nature of the problem.

Continue this thread — 1 reply

Continue this thread — 5 more replies

Load more comments