Effectively storing arrays in Solidity.

I’ve been doing some work with Ethereum blockchain recently, and the idea I worked on requires that we write a relatively large array of integer values in smart contract’s storage. Now, most tutorials warn you not to store a lot of data on blockchain, because it’s very costly. But how much is “a lot”, and at which point the price becomes too high for practical purposes? I needed to find that out, since we really needed this data on-chain.

For a quick approximation, let’s have a look at a wide-spread type of contract, ERC20 token. At the very least, it stores a mapping of addresses to token holders’ balances. The address is a 20-byte value, and the balance is usually 32 bytes, so we have at least 52 bytes per token holder, which in reality translate to 64 bytes, since the storage in EVM is parceled in 32-byte blocks. A somewhat popular token can easily have 10000 or more holders, so our estimate that it stores about 625Kb of information. That’s quite a lot, actually – more than enough for our purposes, since by our estimates, we only needed to store maybe tens of kilobytes!

Naive approach

So, let’s go ahead and pass that data to EVM and write it down to the storage:
Continue reading

RPGs and Tactics 2018. Part III: spiritual successors galore, a tale about a stolen sun, and more

The criteria for inclusion of a game in my list is specified in Part I. Continued from Part II.

2018 seems to be a year of spiritual successors. Not exactly sequels – for copyright reasons – but games that draw directly and unashamedly on a single source, rather than the whole corpus of “old-school RPGs”, as was often the case in the previous years. Whether any of those “successors” prove to be of any worth remains to be seen.

Continue reading

RPGs and Tactics 2018. Part I: Already released.

I decided to post my yearly overview of released and upcoming RPGs and tactics in English this time. Some explanations before I proceed further.

This list will only included games released, or announced for 2018, and only those games that I consider to be of interest to me. This means it mostly consist of turn-based and/or isometric RPGs and tactics, though sometimes I make exceptions for high-profile games or titles I consider to be interesting because of something else. However, there will be almost no mentions of non-tactical JRPGs, as I’m completely uninterested in the genre and can’t provide any comments on it, as well as most action-RPGs, including AAA titles. Oh, yeah, and the list is text-only, but with links to game’s site, for the sake of brevity.

Projects that I consider to be the most interesting are marked with ☆ sign.

With that in mind, let’s recount what titles have already been released in 2018 at this point.
Continue reading

Open Horizon 7.5th demo

The main feature of this demo is location convertor, currently works for AC5, ACZ and AC6. Others will be supported (I hope) in the future releases. This is not the final version of this demo, still working on features, please help me with testing.

What’s new:

  • Location convertor — height map, geometry and textures
  • Campaign mode

I’m still working on:

  • Difficulty settings
  • Example campaign
  • Ground units

Not included in this release:

  • Trees, clouds, location render settings (sun position, specular amount, etc)
  • Optimizations. Current version produces unoptimized data in terms of speed and size: inefficient formats, lacks texture compression, instancing, etc.
  • Location objects collision data
  • Optional objects

Download early version: Demo 7.5 alpha2

Update 3 Jan: fixed location loading, menu, low start height in free-flight mode

How to use location convertor: drop the tool near DATA.TBL and DATA.PAC (AC5, AC Zero) or DATA.TBL, DATA00.PAC and DATA01.PAC (AC6), run the tool, wait until it finish, copy locations/ to Open Horizon folder. This version of the tool cannot operate on .ISO files directly, so you have to extract it first. Note that XBox360 disc’s content does not appears in windows explorer and requires additional extract tool.

AC6 location progress

Looks bad without lighting, fog and color correction, but at least everything is in place and not broken.Update: And when I thought everything is going fine now, I saw this:The height of this area is exactly 9999 meters, so it’s not a bug, just some weird special case I need to take into account.

A site to store mods

You can share your custom decals on  Open Horizon Booru

    1. Take screenshot of your decal ingame
    2. Upload your decal zip to https://catbox.moe/ for example: https://files.catbox.moe/st31e2.zip
    3. Add post to the booru with a link to the uploaded file in the Source field

Decal creating guide: How-to-create-custom-decals

If you have problems with posting or just feel lazy to create an account, you can send your mods me and I’ll post it

Campaign mode


Menu in Open Horizon is now lua-scripted, with the ability to load other scripts from campaign/ folder. And that means that all the power of lua can be used to create custom campaigns with their own logic. Example campaign will be included in the upcoming demo.

I wish THE Ace Love iDOL: Live Combat M@STER! was a real thing.

I’m going to release new version of Open Horizon this year.