Warlock - an update on my competition entry 'The Young Prince'

Started by Matty, March 07, 2020, 20:25:20

Previous topic - Next topic

degac

QuoteTake a look at the graphs here: attached.  Shows time in minutes spent across the bottom and a column indicating how many users fit in that category.  The other graph shows the percentage of players who played until a result was achieved eg character death out of the total users who loaded the webpage at all.  On the numerical level between 8 and 9 out of 10 users see the splash page and walk away.  And yet....the comments above suggest the game is moderately fun for people.

Well, modern time :-)
People don't spend too much time, they want something to enjoy for a while. It they are happy, you made goal.
8 out 10 users see the splash page and walk away... maybe it's just a robot (I don't know).
If  I watch your sentence from another point of view, I see 1-2 users that stays on the site to play... a higher value than many other situation I suppose.

And if people give you a comment, this means that the game has high potential.
Not bad
If there's a problem, there's at least one solution.
www.blitzmax.org

Matty

Thank you degac.

I think especially after various life events of the past five to seven years my expectations and understanding of the world are all over the place.   Quite likely I have very warped expectations both high and low in so many areas and especially game making.

degac

Well,
if I just 'watch' this thread (you comment, questions, answers etc) and the progress of the game (there are the screenshot - you could put a section on your site of the evolution of the game maybe!) I see an evolution (in better) of the game (gfx, ui) and overall on the 'focus' of the it, with little details and so on.
It' s something 'live'.
It's something that people can see grow.
Just this is a sign of attention and care of the game and (intentionally or not) of the users/players.
The fact you listen to the critics (positive or negative) is always appreciated, even from the worst user - they remain speechless sometime :-)
If there's a problem, there's at least one solution.
www.blitzmax.org

iWasAdam

Hi Matty.
Thanks for uploading the full install of warlock. I've had a very quick look and there is an issue I've found that answers one of your main questions about speed and display.
You have (approx) 200+ individual png images, all of different unrelated sizes. This will cause any display to be slowed down, particularly on lesser cpus such as mobile.

You will need to learn about atlassing plus making sure all graphics are the best size for output.
It's about optimising load times, and GPU hit. GPU's want the least amount of textures and textures that (preferably) conform to hex sizes (definitely even size).

E.G.
Have just a few mega textures of 256x256, 512,256, 512x512 or 1024x1024, etc. And then fit all your graphics into these.

You will probably have to learn how your language accesses atlas textures and how to feed them into your sprite manager, but you will get a HUGE speed boost in display :)

It will also discipline you in how to prepare graphics for games and target sizes better :)

As an example, heres one of the sprite maps I used in one of my games:

Although it is very small, the concept remains the same: everything is packed into a single image giving virtually no overhead. if it was 200+ tiny little images the GPU would begin to have a fit - even though the images would be small. It's the number of thing not the size that counts :)

I've also had a look at the general scales of the sprites and a suggestion here would be the following:
Use a good sprite editor (whichever you feel really happy about) and use a sprite size of 64x64 pixels.
A single tile would be 2x2 sprites = 128x128 pixels for isometric which would fit the size you tend to use.
Here's an example of your sprite with a base template


the white being the base the height giving you room to draw, etc (ignore the slight variances in line width and stepping, that was just the app stretching things)

Matty

Thanks Adam.  I'm glad you downloaded it.

(A few bug fixes this morning, your version might be missing these).

With the image atlas-I've understood the concept for a long time but when I built my engine I hadn't allowed for it.

I believe the best solution that allows for it but which rwquires minimal change to the game code that calls drawing is to modify the renderer.js so that internally when a draw image command is called it somehow maps the definition provided in my loadimage command to a master atlas image x, y and w, h location.

It is possible because if you look closely you will see I already have support for various shaped animation strips.

In the loadimage and loadanimimage command I need some way of referencing the master image and coordinates and then inside the renderer.js doing the necessary magic.

That way all the many draw commands can basically remain unchanged.

Derron

If you passed
DrawImage("myimage.png")
instead of
DrawImage(myImage)

you could easily use a registry in your DrawImage function which looks up for the sprite "myimage.png" then call the sprite's draw(x,y). It is up to the sprite if it is a virtual image (DrawPoly()) or a single image (drawImage(img)) or .... part of a sprite atlas (atlas.Draw(id, x,y) - or manual a DrawSubImage(atlas, spriteX, spriteY, x,y))

So instead of having a specific "DrawImage(imgObject)" you better pass drawable objects like "imgObject.Draw(x,y)" - that way you define the "image" somewhere and leave it to the object on how it is to draw.

If you have a render manager (sorting stuff for you) then the render manager just chains these image objects and the image objects need to fulfill certain requirements regarding their interface (provide a GetWidth(), GetHeight(), Get...)



PS: I suggested that sprite atlas usage some many posts ago already (when Matty uploaded two variants for initial-loading-time-comparison)

bye
Ron

Matty

Thanks.  Yes Derron I know you mentioned it before but I wasn't prepared at that time to consider changing the code to handle it.

If I do, it likely will be for a sequel or next game using this code which I thought might be a cyberpunk style game.

Matty

Greetings folks.....

I felt like adding a simple update to the credits page - it simply shows all the past players' avatars (arcade mode only) at the point they completed the game as a kind of simple 'thank you to the players'...of sorts...

You get an idea of it here:



And for some fun here are a few random avatars for you: