800x480 resolution

It seems that texts are really readable on your device… but I’m afraid that downscaling would require too much CPU power. Scrolling seems to be the best solution… I think I could try to implement it. BTW - how does the mouse pointer work on your Nokia?

See for yourself :wink:

youtube.com/watch?v=v0w8LsDAx6I

:smiley:

That looks very promising. Thanks for sharing. :slight_smile:

Is the game lagging because of the CPU power or RAM? I’m thinking of buying a smartphone in the coming months, but I’d like to know what’s more important to have VCMI run at its best (that & battery life are the only 2 criteria I care about - otherwise all last generation smartphones have more than enough for my needs). :stuck_out_tongue:

Turning up animation speed may help a little :wink:

RAM is not that necessary as long as entire system + game fits in. So 256MB is enough for now. And hopefully won’t grow rapidly in the future!

@sslmm

Nice video, I’m just trying to add scrolling but it’s a bit harder than I previously thought. I’m not sure if I manage to do it today.

Definitely CPU. As Warmonger says, 256 MB is more than enough, so anything more won’t speed VCMI up. And it’s very unlikely that VCMI will need much more in the future.

Ah yes. It’s so long since I played in slow speed, I forgot it existed :blush: (and I also think in VCMI it’s either even slower or buggy as compared to OH3).


And to comment on a post about 800x480 from another topic:

The part with buttons containing a piece of background is a bit annoying, but I guess it’s not impossible to solve (because I guess that means also the WoG team was able to edit those buttons to include parts of their WoG background).

If someone would have the skill & time for that, we could have the following:

#1. Reduce the number of menu buttons from 5 to 4

#2. From the 1st Main Menu screen both High Scores & Credits could be removed, and replaced by the More button (it’s in the H3Complete auto-load interface, so I guess it can be found in the game files somewhere):

#3. Clicking on More would open another 4-buttons interface:

  • High Scores
  • Credits
  • Settings (suggestion - a link to the VCMI Settings/Options interface)
  • Back

#4. Clicking on Credits could optionally also open a 4-buttons interface:

  • H3 Credits
  • WoG Credits
  • VCMI Credits
  • Back

#5. From the 2nd Main Menu screen, the Tutorial button could be removed. Instead, we could have the TUTORIAL map accessible in the Single Scenario list. Maybe even default (as after almost 10 years I got sick of H3, and now VCMI, always defaulting on that Arrogance map :p). Of course, also the saved games should have the same format as single scenarios, but maybe have them default when saving to a name starting with TUTORIAL_.

#6. Same principle as above could be applied to the Campaign menu. Now we have WoG, RoE, AB, Custom & Back. We could have:

  • RoE
  • AB
  • More
  • Back

And More would open:

  • SoD
  • WoG
  • Custom
  • Back

(and something similar should be done about the normal 5-buttons interface as well, because it’s annoying not to be able to access the SoD campaigns in WoG now)

If you work on implementing this today, I have a suggestion/request: is it possible to bind this resolution to the 0 key? Like this we can keep the H3 default 800x600 bound to 1 in the resolution selection list.

I’ve partially implemented support for screen scrolling in the newest revision. It works only for game setup menus and has some bugs, but it gives a glimpse of what could be done. To try it out, compile revision 1771 (or newer if my changes won’t be reverted) and change pregameRes is settings.txt to 800x480 (or anything else). Screen will be scrolled when you put your mouse near top or bottom of the screen.

Thank you guys for your enthusiasm and work! I’ll compile 1771 tomorrow night, and check it out (got to get up early, and will be back late).

BTW, I really like the ideas of Zamolxis! :slight_smile: But how did you mean the binding to 0? I’d just have checked for the 800x480 resolution being active in settings.txt, and the also start the game with 800x480 (instead of 800x600). If you consider OnionKnight’s thoughts, you could then choose the “mini-widescreen” class to be active for the whole game.

Regarding the speed: I forgot to strip and optimize the binaries after the getting the backtraces for Tow. So the video was taken with a huge binary. I just uploaded the new files and tried them myself. It’s probably a bit smoother now…

Realy Zamolxis, Your idea is very very interesting :slight_smile: . Really! I don’t know if it is viable but i hope it could be . So and the rest of the game? How is the principle of it? In the menu the “buttons” were marked on the background. and in the battle/castle views? What are the tricks that we have to do so we can arrange those?

Oh, and in my n900, the game runs more smoother and with more precision that in that video :wink: (that one was recorded with the first version posted by slash ).

Thanks again for all this. Thanks to you i can finally say that one of my “tecnologic wishes” came true: Play heroes 3 on the go :smiley:

@Zamolxis
There is one more nice solution - instead of using “More” button we can add scrolling to main menu buttons
So when launching VCMI in 800x480 we’ll see:

Small and inactive "Scroll Up"
New game
Load Game
High Scores
Small and active "Scroll Down"
Exit

Pressing on scroll down will show Credits, VCMI settings, etc.
If we’ll launch VCMI in some larger res like 1024x768 all available buttons will fit at once and scroll buttons will be disabled or even removed.

As result:

  • On higher resolutions scrolling will be unused - all available buttons will fit on larger screen already (and there is no need to adjust menu for every res. ).
  • On small res. there will be no need of multiple “More” buttons - what if somebody will add one more campaigns set (like Heroes Chronicles)? Another one “More” button?
  • Exit button will always accessible in one click - navigation may be somewhat less annoying IMO.

Possible problems:

  • Background parts should be removed from all buttons - otherwise it won’t work.
  • I have not found anything that can be used as arrows in main menu - new pictures needed.

Tow dragon,

regarding the scrolling. It works quite well (tested in the SDK, not the phone). But I have to use the following configuration:

resolution=800x600; // format: WxH
pregameRes=800x480; //WxH
screenSize=800x480; //WxH

If I change resolution to 800x480 the screen is cropped and cannot be scrolled any more. But if I leave it to 800x600 the game will fail to start (after “Begin”) as it tries to run the screen at 800x600 in the adventure map. But we should use 800x480 here. (Config by Zamolxis)

Additionally it’s quite uncomfortable to use the sliding this way. It’s okay in the SDK as I have my usual mouse pointer. But on the phone the pointer is moved only while holding the finger down, or clicking on any area. So you have to click with your fat finger on the very edge of the screen. Would it be much more effort to make it scroll on click-and-drag? Like hold down your mouse button and slide up/down?

So in short: Works great, with two issues: Game crash if in 800x600 mode (mayor) and sliding uncomfortable (minor).

Thank you!

What just came to my mind: The sliding is still just a workaround, is it? Really no offense, but when it comes to releases, a scrollable 800x600 window would be a mayor suck imho.

I don’t exactly understand (yet) how those buttons are created, but why don’t we just make them a lot smaller? they are way to huge on any screen, they could be quarter the size even on my 800x480 (sure, if we scale the entry menu one day, we’d need different sized buttons, or scale them too). That way we could have even more buttons on one menu, instead of thinking about splitting them or scrolling.

Don’t get me wrong, I’m really happy to have the resolution switch in the settings.txt now (instead of patching CMT.cpp myself), and after scrolling is fixed I’m even happier (and all the N900 guys)! :slight_smile: It’s just about the long term planning…

Because we are not artists. We are just programmers. You can freely assume that we can do nothing with graphics - just embed them in the game. And in-game scaling of graphics is something we would like to avoid.

I’ll try to fix the scrolling soon.

I’m not an artist too, sorry. But it sounds like if someone would create interfaces with smaller buttons, you could use them, right? If yes, I could at least give it a try, but please don’t expect anything stylish. :stuck_out_tongue:

Thank you very much! (In fact the scrolling works fine, we’d just need to have it switch back to plain 800x480 when it comes to creating a game)

Is it for performance reasons? The scaled images could be cached, so scaling operations would only need to be done once.

Yes, if we had graphics, we could use them in VCMI.

It’s mostly for performance reasons. And caching seems to be to hard for me because all graphics coordinates would be altered too… it’s possible but hard, time consuming and even more bug-prone than scrolling.

Found something here:
heroescommunity.com/viewthread.p … enumber=30
There is even archive with smaller buttons but it still have pieces of background so you’ll need to ask authors either for making 800x640 version for you or give buttons with transparency.

Not sure about second case. AFAIK image format for H3 (*.def) doesn’t handle transparency well. Usually 32-bit *.png will help in this case (and they do not limited by 256 colors) but VCMI can’t load them currently.
Maybe it is time for impementing this? I doubt that designers are eager to learn how to use all that weird (IMO) tools like DefTool or ResEditor.

EDIT:
Found more interesting download in that thread:
mediafire.com/file/nzgnwziyt … _v.1.1.wog
*.wog file is just a usual *.rar archive with changed extension
Extract all *.def from it to /Sprites folder
Update to rev 1779 (minor fix for correct loading)

Now you only need to fix positions (currently hardcoded)

I’ve changed the screen scrolling to drag-and-drop, but I’m afraid getting it working in-game is way too time consuming for me now. Since it’s not the most important feature to be done there are two options:

  1. I stop developing screen scrolling and leave what I have done hoping someone could take it over in the future.
  2. I stop developing it and revert all changes. It will make the code a bit nicer.

I’m not sure which option is better so I’m waiting for suggestions.

I think you have to revert it.

How did you get it? IT works for me…
BTW: you need to set resolution and screenSize to the same value to get the old behavior and resolution command could work wrong, but that is easily fixable.