jasonrohrer / OneLife

a multiplayer survival game of parenting and civilization building
http://onehouronelife.com
Other
1.01k stars 282 forks source link

OneLife -> be Better. (OneLife Update) #998

Closed is52hertz closed 9 months ago

is52hertz commented 10 months ago

[!NOTE]\ This issue will continue to be added and modified over time. This issue should not be closed now.

Recently, OneEditor (ie EditOneLife, the same below) has had a lot of changes. Strike while the iron is hot (Purpose: It is a metaphor to seize the favorable opportunity and conditions to do something.) OneEditor is missing a lot of needed features, let us propose:

OneLife


  1. THE MOST IMPORTANT | OneLife's NAME

    translated / name standardizing.

OneLife has three main programs (they are the game body, server and editor) But the server and editor naming is confusing: editor.cpp

const char *getWindowTitle() {
     return "EDITOR - OneLife";
     }

const char *getAppName() {
     return "EditOneLife";
     }

int getAppVersion() {
     return versionNumber;
     }

const char *getLinuxAppName() {
     // no dir-name conflict here because we're using all caps for app name
     return "EditOneLifeApp";
     }

what happened? This has two different names: EDITOR - OneLife EditOneLife It is not difficult to find that the former focuses on the editor, while the latter focuses on the action of EDIT. In the player community, it is called OneLife's Editor This is so confusing! My suggestion is to give it a unified name. my suggestion is:

Editor -> OneEditor
Server -> OneServer

OneEditor


  1. ID Editor.
    id=100
    White Pine Tree with Needles

    Now OneLife's ID only supports numbers (0-9) And there is a maximum value (probably 99999) This does not prevent OneLife But if some private servers (such as mine) want to receive OneLife's data updates at the same time and have their own items, I have to start my ID from 10001. But it will hit the upper limit. And if I wanted to add a conversion to a vanilla item, its ID would conflict with OneLife's. So I suggest that ID support English letters and symbols. And can be edited in OneEditor.(Includes TRANS)


  2. Better search and page turning. The picture below shows the current search and page turning functions of OneEditor. If you forget the name of an item, or look for an item in a stage. You need to click-click-click (even if you hold down Ctrl/Shift) But OneLife has almost 5000 items and many more primitives... I don't want the player's mouse to be broken.

So, here’s a preview of what’s new L-1: L-1

In the above picture, there are three functions: The first one is PAGE (page turning function) Before that, I hope to improve the page display so that the previous page is fixed. When new things are added later, the items contained in the previous page remain unchanged. In other words, the first page will always be those 5 things. Due to subsequent additions, there are only 4 or 3. On the latest page (that is, the latest added OneEditor displays it by default), if there are less than 5 things, only 1234 will be displayed for the things, not for the latest page. Something shows 5 while changing the last page. So the PAGE of the object in the above screenshot should be (OHOLv405 data 12/16/2023)

4935 / 5 = 987

Woops, better 5... let's subtract one

4934 / 5 = 986.8 (=986 ...... 4)

After the above description, the actual PAGE should be 987, so the latest page only displays 4 things. So if the latest page is a floating point number, then the number after the decimal point should be removed and 1 added.

The second is the Filter filtering function. Among them, type is filtered by OneEdiotr. For example, FOOD will filter Use Dist | MAP will filter MapP... L-2

L-2

And tag is a new function in Discription As shown below L-3:

L-3

You can add tags to this OBJECT/SPRITES/TRANS/CATEGORIES Group it as this label. Filter the things in this tag group and display them. (You can select multiple label groups.) If not filled in, it will be moved to the null label group by default.

The third one is the order Order. Time refers to chronological order. Word refers to word order. The arrows can be clicked to represent reverse order and forward order.

(note: Since OneEditor's search box has both left and right sides, the display position of the above functions should also be flipped when it is on the left.)


  1. CATEGORIES’ SAVE button The content of CATEGORIES will be automatically saved, which will cause the game to display an error or even crash if it is accidentally touched. If it is even milder, it is not friendly to obsessive-compulsive disorder. So, add a SAVE button?

  1. Internal small pixel painter. Most of OneEditor's materials are low-pixel, and if you need to make changes, you have to frequently switch between OneEditor and the drawing software - this is troublesome, and the changes cannot take effect immediately.

I would like to add a Painter page within the game. SPRITES can be edited and created, and even OBJECTs composed of SPRITES can be edited and changed. It is enough to have these features built in:


  1. Export. Can export OBJECT images composed by SPRITES ( .png / .jpg / .tga ) You can also export multiple - by selecting the ID in the frame / by selecting the numerical range, for example (80-900) to export all OBJECTs with IDs in this numerical range.
is52hertz commented 10 months ago
Attached Chinese 近日,OneEditor(即EditOneLife,下同)有大量的更改。 趁热打铁 (主旨:比喻要抓紧有利的时机和条件去做。) OneEditor 缺少很多需要功能,让我们提出: ___ 1. **更好的搜索和翻页。** 下图是 OneEditor 现今的搜索和翻页功能。 如果忘了一个物品的名称,或者去找一个阶段里的物品。 你需要 点击 - 点击 - 点击 (即使按住 Ctrl / Shift) 但 OneLife 有快到5000的物品和更多的图元... _我不希望玩家的鼠标被按坏。_ 所以,这是新增功能的预览图***L-1***: 在上述图片中,含三个功能, 第一个是 `PAGE` (翻页功能) 在此之前,我希望改进页面显示,使前面的页是固定的,在后面添加新东西时候,前面的页包含的物品不变,也就是说,第一页永远为那5个东西,不会因为后续添加而变成只有4个、3个,而在最新一页(即最新添加 OneEditor默认显示的),如果未满5个东西,便只显示1234给东西,而不是为了是最新的一页东西显示5给,而更改最后一页。 所以上述截图中object的PAGE应该是 (OHOLv405 data 12/16/2023) ``` 4935 / 5 = 987 ``` Woops,更好满5个... 让我们减去一个 ``` 4934 / 5 = 986.8 (=986 ...... 4) ``` 当经过上述讲述,实际 PAGE 应该是 987,所以最新一页只显示4个东西。 所以最新一页如果是浮点数,那么应该去掉小数点后的数后加1 第二个是 `Filter` 筛选功能。 其中 `type` 是筛选 OneEdiotr 自带的。 例如 `FOOD` ,则筛选 `Use Dist` 的 | `MAP`,则筛选 `MapP` 的 ... ***L-2*** 而 `tag` 则是在 Discription 中新增的功能 如下图***L-3***: 你可以为该 **`OBJECT/SPRITES/TRANS/CATEGORIES`** 添加标签 将其划为此标签组。 筛选在此标签组的东西,并显示。(可以多选标签组。) 若不填写,则默认移至 null 的标签组。 第三个是顺序 `Order` 。 `Time` 指时间顺序。 `Word` 指单词顺序。 箭头可以点击,代表 倒序 正序。 (_note:_ 由于 OneEditor的搜索框左右都有,所以在左时候,上述功能显示位置也应该翻转。) ___ 2. **CATEGORIES 的 SAVE 按钮** `CATEGORIES` 的内容会自动保存,这会导致如果误触,游戏就会显示错误,乃至崩溃,轻微一点的话,对强迫症也不友好。 所以,加一个 `SAVE` 按钮? ___ 3. 内部小型像素绘画器。 OneEditor的大部分材质都是低像素的,而如果需要更改,频繁切换 OneEditor和绘图软件——这很麻烦,而且更改不能即时生效。 我希望在游戏内添加一个 `Painter` 页面。 可以编辑和创建 SPRITES ,乃至编辑和更改用 SPRITES 组成的 OBJECT 。 内部内置这些功能就足够了: 笔(1:硬质,选择什么颜色就涂上什么颜色 2:软质,涂上的颜色根据力度的不同产生不同的透明度。) 橡皮擦 填充工具 文字工具(调用本地计算机的字体) 引入图层的概念,在编辑一个 SPRITES 的时候,可创建图层,在此之上,可以单独移动图层,复制图层,做出一些效果。编辑完成的时候合并图层。 而编辑和更改用 SPRITES 组成的 OBJECT ,则可以选择要改动的 SPRITES ,单独更改后,可预览在 OBJECT 中显示效果。 ___ 4. 导出。 可以导出 OBJECT 由 SPRITES 组合的图像( `.png` / `.jpg` / `.tga` ) 也可以导出多个——通过框选ID / 通过选择数字区间 例如(80-900)导出这个数字区间存在ID的所有OBJECT。
jasonrohrer commented 9 months ago

There are a few things here... the window title, displayed when the application is running, and then the name of the executable itself.

For various reasons, I don't put spaces or punctuation in my EXE file names.

But window titles can be more descriptive and include spaces and punctuation.

The EXE for the game client is called OneLife.exe to keep things short.

EditOneLife

and

OneLifeServer are fine.

Also, many scripts and different things depend on these names.

jasonrohrer commented 9 months ago

Object IDs are numbers.

There are 2 billion possible object IDs. You will never run out.

Object IDs are numbers because that's how they are stored in the map database, for efficiency reasons. They cannot contain letters, etc. They are integers for a reason.

jasonrohrer commented 9 months ago

Since all the art in the main game was drawn on paper with real pens and colored with real brush markers, a painting tool inside the Editor is way outside the scope of what the Editor was designed to do. None of the art in the game is "painted" on a computer.

jasonrohrer commented 9 months ago

Fixing it so that CTRL and SHIFT and CTRL-SHIFT do different things in picker when clicking NEXT/PREV. So you can get variable sized page jumps.

jasonrohrer commented 9 months ago

The Tags can be included in object descriptions, as comments after the # sign.

So, for example, you could have:

Gooseberry# food Wild Carrot# food

And then if you search for "food" these will come up.

jasonrohrer commented 9 months ago

I have added support for searching by fieldName=value for objects. This also supports > or < in search.

Search for:

MapP>0

will find all objects that occur naturally on the map.

Search for:

hat=1

will find all hats.

Searching for:

race=D

will find all people from the D race.

Most fields and checkboxes on the Object Editor screen are supported. This is quite a nice addition. Thank you for encouraging me to add something like this.

jasonrohrer commented 9 months ago

Hmm... you want to export pictures of objects?

You can just BAKE an object as a sprite, and then you will find the baked TGA file in the Sprites folder.

If you want to export objects with all their sprite parts separately.... what is your intended use for such a feature?

The current export/import features is centered around people sharing objects with each other, when they are collaborating or making mods.

jasonrohrer commented 9 months ago

Made a lot of progress in this direction so far.

I'm going to close this issue.

Please try the changes in the editor, to see if they solve your problems.