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

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

Previous topic - Next topic

Matty

Strikethrough = Done.
1. Dream sequence to prepare player for arrival of bosses in a few turns.
2. Advisor with context sensitive tips and help who can be 'summoned' (eg the game is called Warlock so perhaps you can summon an imp of sorts to give advice at will)
3. Adjust arcade mode: think about refreshing spells at each levelup or each new dungeon level.
4. In options perhaps allow the player to set the rules of arcade mode based on their preference and level of challenge desired.
5. Localstorage, find a way to handle exceptions when the browser localstorage is full-it happens and currently the game doesn't fail gracefully during saving/loading when it occurs (hmm not sure yet if Javascript even has error catch handlng methods)
6.Fix bug with saving 'interactive' elements on the main map-most are saved but supply wagons position is not always handled correctly and likely the main bosses will have an error there too.
7.Animations-more attack animations have been made, but more are needed.  Potentially look into widening the cells by 20pixels on creatures to handle more interesting animations,  currently it is a bit to narrow to really allow what I'd like. But that would require a lot of adjustments to graphic elements to be made.
8. Fix text boundaries, as you say, overlap occurs-note the same font size appears different on different screen sizes for same resolution on tablet, phone and desktop-I might need a way of working out the font size which is appropriate for each given they sometimes don't work right even though resolution is identical.
9.A problem impossible to overcome is that when updates are made to graphic elements and even code, sometimes the browser has cached old data and will not refresh on handheld devices unless you completely clear the cache.  I don't like this feature and is not something I can easily code for.
10. Potentially look into a Web page to exe converter to allow the game to finally be packaged as a desktop executable... wish list, only if it can be done easily with minimal speed hit.
11. Others to come.

Derron

Quote
8. Fix text boundaries, as you say, overlap occurs-note the same font size appears different on different screen sizes for same resolution on tablet, phone and desktop-I might need a way of working out the font size which is appropriate for each given they sometimes don't work right even though resolution is identical.

- do not use "font-size: 10em" but "px". This would remove display-size-based scaling
- <meta name="viewport" content="width=device-width, initial-scale=1"> or similar to avoid trouble with iphones or so
- most simple: use bitmap fonts (your language is english - so you only need a handful of letters :D). Also saves hassle if you use a "do not distribute" font and you could add slight shadows, subtle outlines, ...)


Quote
9.A problem impossible to overcome is that when updates are made to graphic elements and even code, sometimes the browser has cached old data and will not refresh on handheld devices unless you completely clear the cache.  I don't like this feature and is not something I can easily code for.

Can't you define a string in your game? append this to all file requests (after the "?"-query sign)
so "versionString=1200" leads to
https://mattiesgames.com/mygame/sprite.png?v=1200

This caches in the browser ...and if you change your versionString to 1201 it will load it properly as the url differs to the cached.

An other idea is to directly tell the browser to
- not cache at all '(website tells to never cache or invalidate immediately)
- mark content changed (server software detects changed content by file datestamps and reports accordingly but browsers could ignore that)


bye
Ron

Matty


Matty

Done..thanks Derron, em fixed it for text(on everything except IE browser...have to find out why that one doesn't like it....)

And the ?v=number part at the end of the img.src code works a treat......

For those who are interested.....my game uses an engine I've been working on for each Javascript game since we began the competitions.

The code has the following modules which I'll describe and link to here:

init.js - handles screen and input configuration and calls the request to load all the relevant resources. Nothing in here needs to be touched most of the time.
http://mattiesgames.com/warlock/init.js

audio.js - handles audio processing. Note mobile devices handle audio in browsers different than desktop, they require some additional mucking about as you need to detect screen interaction of some sort before audio will play to prevent autoplay as part of browser design these days.
http://mattiesgames.com/warlock/audio.js

renderer.js - handles all draw calls. It puts all draw calls including text, lines, rectangles, images and animated images into a list which then get displayed in sequence and then flipped from the 'backbuffer' into the front buffer with a flip() command. Thanks blitz languages for this idea.

http://mattiesgames.com/warlock/renderer.js

guiconfig.js - contains some simple parameters for controlling default gui details, mainly colour, font and other themes. Can be overridden or ignored but is a set of defaults that can help to make things look consistent.
http://mattiesgames.com/warlock/guiconfig.js

codedgui.js - contains basic gui controls which includes buttons, text labels, boxes, and so on.
http://mattiesgames.com/warlock/codedgui.js

functions.js - miscellaneous functions such as rand(), abs(), sign() and so on plus some aliases for them (such as both Rand and rand function the same)
http://mattiesgames.com/warlock/functions.js

main.js - final javascript to append to the index.html - this contains the main loop and final initialisation calls.
http://mattiesgames.com/warlock/main.js

recorder.js - this is currently not used, it is an attempt to drive screen recording via mouse input from start to finish of the game...with some settings of record, play and stop.
http://mattiesgames.com/warlock/recorder.js

gamedataonline.js - this is a module I use for each game that is completely customised each time. What you have below is the code to 'Warlock'. If you look at the same file for any other of my Javascript games you will have a different set of code in there.
The functions in the engine version of this are mainly stubs that you fill in with the relevant details for your game.
http://mattiesgames.com/warlock/gamedataonline.js

That's most of the code...you can of course look inside the index.html to see how it all hangs together....

Matty


Derron



Similar to the character stats you should have a "space" after the double colons ..
Stat:25
Stat: 25

Or check if you should better have the value right aligned and the label left aligned.


Also visible on the screen: the 3 blue balls/bells/whatever are drawn _below_ the caption.
Do not draw the panel's decoration _before_ the content, but _after_ the content.

Panel.Draw:
- panel.bg.draw <--- the background box
- panel.content.draw  <--- avatar, stats, boxes ...
- panel.overlay.draw  <--- your decoration

After this you can draw your dragged stuff (eg potions you "clicked")




The numbers ("amount" ?) are drawn differently:
- font size differs
- position in the "circles" differs (yellow 4,4,4,4 vs yellow 3)
- font face differs (yellow 3 vs teal 3)
- circle position differs (yellow 4,4,4,4 vs yellow 3) -> maybe orient the amount number position to the "grid rect" rather the actually used sprite dimension -> and or center sprites on a virtual "rectangle" (like on a grid based sprite sheet).




Do not just "resize" overlays/decoration ... use the same "size" so a leaf stays similar big or small. If another decorative element does not fit there (eg the sword) then leave it out.
Variation (but consistent style) allows to have a similar look while avoiding the "based on the same block" visuals.


PS: You seem to have evolved a lot with this game already - compared to previous games. So please do not just read my posts as critics - see them purely positive (for now :D) as it proofs I am interested in your programming and artistic development/improvements.


bye
Ron

Matty

Thanks Derron.  I don't know why I don't notice these things until you point them out, but they all need doing.

Most of what you've suggested are easy fixes.

I appreciate your criticisms, however I wish my work was good enough to be 'complete'.

Matty

Wow...I finished playing the game.  I defeated the six emissaries.  It was on easy difficulty, it took me 950 game days and I was level 9 by that time.  The map was pretty well corrupted by evil as the 6 emissaries started around day 300...my character was permanently diseased by the end of the game but I'd gotten used to it.

The emissary battles required bucket loads of magic.

I am pleased.  It was quite fun.

In real time it took me 3 sessions of about a total 3 hours play overall to go from start to finish.

Having my weapon enchanted after winning a quest helped.

Matty

Attached are documentation and my engine should you wish to play around with any of it....for Javascript...


Matty

Recently:
Bug fixes....
A few minor features added.
Some responses to criticisms on other sites - a few changes made as a result.
More animations created for most creatures.
A few more interactive elements on the main overland map.
The advisor has a few more things to say.
Options for dungeon speed and difficulty can now be set within the dungeon itself.
Bound spells bug fixed.
Disease/Poison situation altered.
..

And that's a summary for now....not much to show on the screen however as a result yet....nothing really all that new.

Matty

Updates....
More map interactions, merchants, paladins, ambushed paladins, wandering mysterious characters.
New items.
Can hear tales at the tavern that tell you about the game world.
New special items.
Bug fixes.

Matty


Matty

Smooth movement in dungeon now works.

Thanks Derron for the encouragement to do so...I knew it needed to be done.....same needs to apply to overland map as well...that will be done later...its 1:20am right now....

Matty