StarMines: The Next Generation [space shooter]

StarMines: The Next Generation [space shooter]

Postby jkarjala » 20 Jan 2020, 18:46

StarMines is a space shooter inspired by old classics like Asteroids and Omega Race.
The SM:TNG is my ancient StarMines for Java rebooted in HTML5 using Scala JS and Phaser CE.

You are the spaceship pilot in search of magical Bonusoids which can only be found in the endless starmine fields full of dangers. The more Bonusoids you catch, the better their magical forces make your ship.

The game is playable on mobile with touch controls and desktop with keyboard or mouse. I have even tested it with an LG OLED TV... On touch devices, there are different options for touch controls which you can choose from the top-right pause menu.

The game is quite playable already, but additional enemy types and ship power-ups could be developed.

The playable game: https://smtng.jpkware.com/

The source code: https://github.com/jkarjala/starmines-tng

All my code and game assets are licensed under GPL3, additional game assets under various attribution licenses.

Demo gif:
Image

Youtube:
https://youtu.be/TViAYO-AjdI
Last edited by jkarjala on 24 Jan 2020, 11:00, edited 1 time in total.
jkarjala
 
Posts: 4
Joined: 20 Jan 2020, 18:18

Re: StarMines: The Next Generation space shooter

Postby Pesciodyphus » 21 Jan 2020, 20:02

Aren't you the same guy, who made "Starmine 2 - Planet of Mines" as shareware for DOS in the early 90s ? It is nice to see, that the classic lives on.I think it was one of the few games, that use the Mode X (320x240 instead of 320x200).

To SM:TNG - it runs quite slow. Maybe my computer is too old, but you could work more on performance. Possibly some options, to run at a fixed resolution, there images don't have to be scaled, instead of using liniear interpolation or to turn of the alpha blending (and use 1bit transparency).
Pesciodyphus
 
Posts: 11
Joined: 18 Jan 2020, 23:57
Location: Germany

Re: StarMines: The Next Generation space shooter

Postby jkarjala » 21 Jan 2020, 20:30

Indeed I am the same guy, StarMines lives on :-) it is almost 30 years from SM2, 20 years from SM for Java and now comes the HTML5 version. One of the inspirations for this version was the fact that I was able to reuse the Povray 3D models I created for the SMJ 20 years ago pretty much as is.

What kind of hardware (CPU, GPU) and software (OS, browser) you have when it runs slowly?

The game's native resolution is full HD, so it may indeed be taxing to older hardware, especially if the GPU is slow (=intel). On windows with edge and chrome, it runs at 60 fps at 1080p on a 3 year old dual core laptop (intel GPU). Firefox seems to have more problems maintaining 60 fps. On a 10 year old i5-750 desktop with 1050ti GPU it easily maintains 60fps on all browsers. In addiiton, pretty much any recent mobile phone can run it at 60 fps...

On a 10 year old dual core laptop under linux it is indeed slow, so for these I suppose pre-scaled small images might make a difference, but I have been too lazy to use multiple resolution assets (not sure how well phaser can handle them). Laptops with a high-DPI screen and intel GPU are also slow, but I am not sure if anything could help those?
jkarjala
 
Posts: 4
Joined: 20 Jan 2020, 18:18

Re: StarMines: The Next Generation space shooter

Postby jkarjala » 21 Jan 2020, 20:46

Actually, I'll take tback my high-DPI comment, I just tested the game on a 2018 model Dell XPS 13 with 3840x2080 screen, and the game runs at 60 fps full screen even in battery saver mode. Only edge slows down, probably respecting batter saver mode unlike firefox and chrome.
jkarjala
 
Posts: 4
Joined: 20 Jan 2020, 18:18

Re: StarMines: The Next Generation space shooter

Postby Pesciodyphus » 21 Jan 2020, 20:58

I have a Athlon, Family 6, Model 10 single core processor (indeed old :-) ), a GeForce FX 5600 graphics card and use Firefox. I am however able to make screenshots, so it seems it isn't hardware-accelerated at all (maybe I should check the browser settings to enable it, if it is possible with Firefox at all to use it).

With the images. Instead of treating them like textures in real time, you could compute sprites at the needed resolution at load time (if this is possible with HTML5). I also had the Problem with Magnetic Planet 32, that upscaling frames in real time (hqx) is inefficient, so I scaled the images up at load time, and used only BitBlit() to draw them. If the API you use works like a 3D-accelerator, maybe you can use some render-to-surface function, to make the sprites and then use only raster copy operations when drawing the frames.
Pesciodyphus
 
Posts: 11
Joined: 18 Jan 2020, 23:57
Location: Germany

Re: StarMines: The Next Generation space shooter

Postby jkarjala » 21 Jan 2020, 21:26

Are you running windows or linux? It seems the latter has pretty poor gpu drivers, especially if you stick with OSS.

Phaser uses HTML canvas or webGL depending on config, I default to canvas which seems to be well optimized in browsers.
I think the HTML canvas has bitblit kind functions to copy the sprites from sprite sheet to screen (this is handled by Phaser library).

I could easily pre-generate sprites at different resolutions, Texturepacker can even do pretty nice automatic scaling, and load different ones depending on screen reolution. However, I think I'd have to do a lot of adjustments to asset locations, font sizes etc to make the game fit to smaller play area size suitable for those smaller sprites.
jkarjala
 
Posts: 4
Joined: 20 Jan 2020, 18:18

Re: StarMines: The Next Generation space shooter

Postby Pesciodyphus » 23 Jan 2020, 20:44

I use Windows XP, and the extended support version of Firefox. (Again, this is not the latest technology)

I tested the game on a newer computer, and there it workes faster. It again seemed not to be hardware accelerated, as screenshots work, but this may also be a function of firefox. The game seems to generally work well on newer systems.

Note, that the behavior, to change resolution during the running game, has still some uses for the cellphone faction, there turning the device may change the resolution and in-browser games are more demanded.
Pesciodyphus
 
Posts: 11
Joined: 18 Jan 2020, 23:57
Location: Germany

Who is online

Users browsing this forum: No registered users and 1 guest