igorfs10 / rust_hero

Um jogo simples em rust
GNU General Public License v3.0
4 stars 1 forks source link

Portuguese is beautiful, however... #1

Closed 1sra3l closed 3 years ago

1sra3l commented 3 years ago

I can barely understand it, so reading your code is very hard for me. It is also fairly typical practice to use English names, though with proper documentation (in English) this would be unnecessary. I have been interested in a project like this, and have made a few small projects with similar goals. I think many would like to use your library, though there are no verbose doc comments to read in your code. Thanks for your time, I think Rust is perfect for an RPG :crab: :crossed_swords:

igorfs10 commented 3 years ago

My next step is to rewrite it in english. This is a port of my old game that I was using to learn Rust so I wrote in portuguese, but as I plan to finish the game this time, makes sense for it to be in english.

1sra3l commented 3 years ago

I completely understand. Since it is hard to follow the code function names for me, can you explain if this is a 2D pixel type game, something more like table top cards, or a 3D game.

igorfs10 commented 3 years ago

It will be a 2d pixel idle game based on an old flash game called A Knight's Story 2. Basically the player will have a character that will battle automatically a random enemy, the only player action will be using items and choosing a place which will be unlocked after beating all enemys from a prior place or reaching a specified level. For now there is the battle and save system, I'm still testing some rust toolkits and engine to do the gui, after that I plan to add some kind of upgrade system to improve the weapon and the items of player's character.

1sra3l commented 3 years ago

I've never played that game, I'll look for it. FLTK is great for displaying single images, and the rust bindings are actively maintained. ears is a pretty easy to use sound library for game music/sfx. If you need help with assets (music/art) let me know. And if I can find the game, maybe I can make a fluid file (FLTK UI Designer) of a layout, which can be rustified, using fl2rust. I've just started with the Rust bindings for FLTK 1.1.1 and am pleased that it has maintained a fairly straight forward API, with all the C++ quirks translated nicely into Rust. I've been looking for some sort of casual RPG game. I suppose if you want it to be a WASM game FLTK will not work for you.

1sra3l commented 3 years ago

@igorfs10 are you able to still play it using something other than adobe flash like gnash, openflash, etc..

igorfs10 commented 3 years ago

I didn't know about ears, thanks for the tip. I will need a help, but I want to finish a simple prototype before inserting the assets, I will let you know at the time. I stopped the old version because of the sprites, my my brother was in charge to drawn them, but he was so busy at the time tha he just srawn the main character, so a help with art will be appreciated. FLTK bindings is so simple and greatly integraded with rust ecosystem that seems the best option to make the game, I just need to display some sprites and change them without moving them, so I dont want some thing complex for now. I took a quick look at fluid tutorial but I was too busy to try, I need to learn it to use in my personal applications, I will use the game to lean how to do it. For WASM, I will use another GUI, I'm making some experiments with egui to see if it fits with the game, I took some time to understand how to display an image in it, and I still dont feel comfortable with its rendering system, it's too easy to let a high cpu usage, but the focus now is to make a desktop version and after I do more experiments.

This is the UI of my old version, probable the new version will follow this style. The first line is the title. Second line are New, Save and load game buttons. On third line there are character class and time on the left, location's name in the middle and level info on the right. Fourth line is just to display some texts with infos and warnings. The game area. The bottom area is used for items and its description (left side) and character's attributes (right side).

image

1sra3l commented 3 years ago

So I made this: rust-hero The window on the side is the FLUID window, the window on the right is the way it looks. I will PR you the file, just tell me where you want the ui.fld file. I ran fl2rust on it, and the output looks quite nice

igorfs10 commented 3 years ago

That's impressive, it was quickly. You can put the file in src folder of rust_hero_gui folder. Thank you so much

1sra3l commented 3 years ago

I've been using fluid for a long time, and it is one of the easiest UI designers to make mockups that can easily be made into programs later. If you need help with connecting things in FLTK + Rust open a bug here and I'll comment! And when you are ready for art, open a bug about that as well. I'll watch your repo