Save-Point
What's up, RMers? - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Development Discussion (https://www.save-point.org/forum-17.html)
+--- Thread: What's up, RMers? (/thread-395.html)



RE: What's up, RMers? - DerVVulfman - 09-06-2023

Sometimes, it takes a while for a solution...  and mebby a small break to get away and get a new perspective.

[Image: attachment.php?aid=1960]

I began reworking how the text system for the icon list box feature worked and displayed the text. AND, I did it with much success.  I blew up the window so you can see it more clearly.  But I now have the text rendered cleanly and with a nice shadow effect (which MAY be disabled).

The system will increase the vertical spacing if the text it placed too far below, as can be seen in this example. I do plan to institute text justification, so there will be left/center/right options. But admittedly, text may become 'scrunchy' if you place TOO MUCH text in an icon window.  Well, that's assuming you don't increase the actual spacing between icons yourself when defining them.

Technically, there is no ICON BOX widget in any Windows OS system that I have seen.  But it is a nice touch, eh?

Outline as well as Shadow (and color options therein) will be available ... methinks.


RE: What's up, RMers? - DerVVulfman - 09-08-2023

The Icon list I just presented now have a whole cadre of commands... FUN stuff. But when one is trying to emulate Windows objects, one must account for a variety of functions.

So far, the basic syntax for a list that shows the icons prominently appears like this:

Syntax:
object = Widgets::IconBox_List.new(x, y, icon-width, icon-height, columns, spacing, data-list)

Returned:
  • object: The list object created

Parameters:
  • x : x-coordinate of the list
  • y : y-coordinate of the list
  • icon-width : width of the icons used in pixels
  • icon-height : height of the icons used in pixels
  • columns : how many vertical columns in a list
  • spacing :how much spacing (vertical and horizontal) between icons in pixels
  • data-list : the full list under control, each item contains: [icon, caption, data returned]

And on top of that, you can set the following after:
object.list_border_color = Color -- Sets the color of the outside list border
object.list_fill_color = Color-- Sets the background color of the list
--
object.icon_border_color = Color -- Sets the color of the individual icon borders
object.icon_fill_color = Color-- Sets the background color of each icon
object.font_name = String-- Set the font used in the icon's caption
object.font_size = Numeric-- Set the size of the font font used in the icon's caption
object.font_bold = Boolean-- Set if the font used is boldfaced
object.font_italic = Boolean-- Set if the font used is italicized
object.font_align = Numeric-- Set if the caption is aligned left, right or centered
object.font_color = Color -- Sets the color of the caption text
object.font_style = Numeric-- Set if the caption is plain, shaded, or outlined
object.font_stylecolor = Color -- Sets the color of the shadow or outline effect
object.outline_list = Boolean -- Sets if the list itself has an outline or not
object.enable_item(index) -- Sets a specific icon by index position as enabled
object.disable_item(index) -- Disables a specific icon by index position

Currently, I can use the mouse to point-n-click and switch objects within the same one list. I need to see about taking objects from one list to add into another. THAT will be fun.

But a lot has been worked out.


RE: What's up, RMers? - Remi-chan - 09-09-2023

Sooo... I haven't posted aught of it yet. But I might have started making a new game because I'm presently at a stage where I'm just waiting on resources for Fantasia.

So, with that, may i introduce you to:

Flight

As the name suggests, it's a game with a large emphasis on flying. It transitions between a sort of multi-layered world map where you can descend to lower levels where harder and harder challenges will appear. Then during all the bullet hell sequences, you're flying too.

Into Combat!

I'm using Galv's Map projectiles as the basis of this game's combat, which is working very well. It's WASD movement and mouse aim and mouse-click for shooting. it's very modern-day controls and it's so nice to have mouse support for this game.

Did all the battle stuff seen in this video in the span of today. let's see what I achieve tomorrow~!


RE: What's up, RMers? - DerVVulfman - 09-12-2023

Work on the Windows-Styled Interace Widgets continues...


.mp4   2023-09-12 16-45-38_wmv1_wmv1.mp4 (Size: 910.16 KB / Downloads: 1)

The video attached is poor quality, I grant you.  But I intercut it a little and showed that the checkbox in the upper left most window can change from a checkbox with a caption (captions are always optional), to buttons that can be depressed, to radio buttons.  The red dot indicating the radio button was selected is customizable of course.

But I show off two things.

The first is the dropdown window.  The window, when the list is not shown, is merely a simple box with a caption.  And initially, you can see it with the [V] collapse button on the left as it appeared with Windows 3.1.  And oddly, I set the box's text to be italicized, bold-faced and right adjusted.  HOWEVER... a little bit if intercut and you can see that the collapse button need not be needed, and I set the text to be centered.  And a third cut, I set the text to NOT be italicized, and returned it to a more acceptable left-justification.

Meanwhile, I worked on a feature for right-clicking objects.  Returning to the radio button, right clicking brought up a list menu with two options:  Checked and Unchecked (blurry as they were).  And indeed, the right click window was able to accurately function.

One thing that I had issues with in past I never mentioned was the priorities of window buttons when menus were overlain.  For example, if I had the START menu resting atop of any of the WIDGETS windows, the three buttons in the start menu would not work if the area I clicked was simultaneously atop the WIDGETS window.  But now, proper z-Depth was established and whatever window "AND BUTTONS" that are on top are active.

I still have a few things to tweak with the checkbox and some of the work behind the scenes.  And I want to establish two more widgets, a "Hover" widget and a "Text Box" widget that you can type within.  The hover widget would be one which would appear atop the mouse with a little bit of 'help' indicating what the widget performs or any random information related.  And the Text Box widget... well, that will be more based upon the full-keyboard and text-entry system in use.

I will try to make it as least-intrusive as possible.


RE: What's up, RMers? - DerVVulfman - 09-14-2023

Some sections just needed a bit more cleaning up...

[Image: attachment.php?aid=1965]

List boxes in general, those that are fixed and do not scroll, there are no options highlighted.  Yes, when you click an option, it becomes highlighted... but nothing is highlighted or selected by default.  It is by mouse action and clicks that bring up a response.

But for scrolling lists, both in general and for the dropdown lists, the first item within their respective lists is highlighted by default.  In fact, it is established as index position 0 for those that understand arrays or just that lists in this manner begin at 0 and not 1.  THIS CAN CHANGE though, as the index position can be set at any time... 

Joe Cool  During the execution of this demo, I programmed the dropdown list on the right to highlight index position 3 at start.

As I stated earlier, list boxes highlight the information when you 'click' an item.  In truth, when you click an item in any list, it is possible to just GET the desired information after the mouse click.  But for the dropdown list, I added some nuances.  First, the dropdown list's 'Title' now reflects the item selected just as any other Windows Dropdown widget would.  And second, when you have an item highlighted within the dropdown list, the widget stores the data for the highlighted selection for retrieval at any time... not just when you click it.

Thinking   Hrm... Perhaps that should be in the general 'scrolling' list boxes too.   Mad Scientist   Yeah, sounds like a plan.

Lastly, I'm showing off in the upper-left a simple menu that appears when you 'right-click' over a widget that has a right-click option.  Again, right-clicking the radio button brings up a menu and you can click either option that can affect the button itself.  But now I set all available font and font background options to be editable properties after the object's creation.  I know...  that is an ugly shade of yellow. But every option does work.

Serious  But first... no.   Book   When you move the mouse over any items, the items are not highlighted.  List items are only highlighted when clicked. So no menu will initially highlight what item you are targeting.  And that includes the right-clicked options.


RE: What's up, RMers? - Remi-chan - 09-18-2023

I got very productive last night and implemented basically everything I wanted!


-Grazing
-Drops and Pickups
-Boss Bars
-Powerups
-Spellcards

Fixed some issues and done some tweaks since the video, too.

I also have been sprucing up the various areas with lifey stuff! Critters, to be precise!
[Image: bJ9EuVe.png]
[Image: iNs1gwr.png]
[Image: WJqrVxB.png]
There we go~!


RE: What's up, RMers? - DerVVulfman - 09-18-2023

A major hurdle achieved...
The ability to properly make the scrolling list and dropdown windows...
...visible and invisible on demand!
[Image: attachment.php?aid=1969]

I programmed my test system to turn on or off the visible state of one scrolling listbox (of two) and the dropdown if the radio button (checkbox) is enabled.  So yes, this status works as it is executing.  NEEDED OBVIOUSLY.

And I've looked through some visual compilers and I generated a list of the widgets that are drawn on a form.  Or in layman's terms, the stuff drawn in your application window you click, type or whatever within.
  • Picturebox: Not needed. Use of bitmap routines should suffice
  • Label: Not needed. Use of draw_text should suffice
  • Text Box: Needed. Must implement means for keyboard script adaption.
  • Frame: Not needed. I mean... it just draws a box to put stuff within.
  • Command Button: Done. But I do want to tweak fonts
  • Check Box: Done.
  • Radio Button: Done. (Combined with Check Box)
  • Combo Box: Done. Dropdown Box.
  • List Box: Done. Both scrolling and fixed
  • Scroll Bars: Done.
  • Timer: Not needed. Anyone using this should be familiar with HUD-based timers.
  • Drive List Box: Not needed. An expansion of Dropdown Box *
  • Dir List Box: Not needed. An expansion of Scrolling Listbox *
  • File List Box: Not needed. An expansion of Scrolling Listbox *

* While the Drive/Directory/File boxes are not being developed as their own widgets, I may develop code that could be use ... later.

So with that major hurdle done, I just have the actual text entry box to develop. However, I must be honest and say it will more likely be a wrapper for the input system I am using. I am unsure how well it will work with other keyboard scripts.




RE: What's up, RMers? - DerVVulfman - 09-22-2023

Well, I may NOT be able to embed user-editable Text Boxes into my widgets system.  However, its not for me being unable, but for that there are so many 'differing' full-keyboard systems out there that a wrapper would not be possible.  The variables between all the varieties are just SO damn different.  So keyboard input into an editable text box is really left to the end user.

But I'm certainly not done!
[Image: attachment.php?aid=1970]

Scrolling number boxes are available in two varieties...  one has left/right arrows on either side, the other has up/down buttons on the right side.  The numbers scroll beautifully AND the dimensions of the widgets have a nice range.

For button height sake, the number boxes cannot be any shorter than 12 pixels, that because the option for up/down arrow buttons would only allot for a 6px tall button each and drawing up/down arrows does require some space.  However, the right number box example shows a window of 20px in height.  So you can obviously make them taller.

OH, and I mentioned that adding drive/folder/filename widgets might be left to the end-user?  I had no idea how easy it was to get all the Drive letters for a PC.

Code:
for i in 65..90
  drive_letter = i.chr + ":"
  p 'We found ' + drive_letter if FileTest.directory?(drive_letter)
end

Stupid code goes through ASCII characters 65-90 (or letters A to Z), adds a colon (:), and checks if the root directory (the drive in this case) exists.

Works for me, returns all my drives including USB drives.  Simple and useful to propagate a Drive Listbox.


RE: What's up, RMers? - DerVVulfman - 09-23-2023

Dear LORDY... this looks like a mess:
[Image: attachment.php?aid=1971]

However, it is a beautiful mess.

In essence, I set up all the widget backgrounds to allow for bitmap loadable graphics to be used for the window backgrounds and the title and dropdown combo bars.  Along with that, the graphics can be stretched to fit the area or set to tile.  With the 32x32 dot-dot-dot graphic I used, I basically set window areas to be 'stretched' to fit, while the title boxes are tiled. 

OH... except the center "Start Menu".  In that case, I only affected the title bar and not the drawing area.

On top of that, the title and dropdown combo bars also allow for color gradients, such as the right-most combo box.  Okay, its the ONLY combo box.  But it does a gradient shift from pale blue to a yellowish tint.

AND the list boxes can have bitmaps behind the text, using lined bar images in the basic list box, one of the scrolling list boxes and one within the Dropdown Combo box.

All of this is of course optional.  And my next target will be the Window Closing [X] buttons, the [V] Expand button for Combo Boxes, and the Scrollbar arrow buttons.

After that... who knows?


RE: What's up, RMers? - kyonides - 09-24-2023

I recently noticed that the FluidSynth library for Linux had been upgraded since I last had installed it months or even over a year ago. Something makes me think its release version jumped from 1.0.x to 3.0.x on my distro in the last couple of months or weeks. Or probably just a few days ago...

Normally, I would not suspect anything from it for I first thought it was a minor update instead of a major one, like from 1.1 to 1.3 or the like. How wrong I was! Incredible

As of now, HiddenChest for Linux is compiling fine. I get no errors besides some of Ruby's CXX args warnings because they wanna make me refactor some basic code in its code base. It seems to be optional for Ruby version 2.7 so far. Not gonna happen any time soon, Ruby Ruby Header Files. Tongue sticking out

Happy with a sweat I guess that could change if I upgrade Ruby to 3.x in the future. Sarcasm Not keen on that for sure.

The major issue was finding that stopping a MIDI and reading a second audio sample, namely some OGG or WAV file, could cause it to failed for no specific reason.

So I started digging on the web only to find out that it was either FluidSynth related, kind of unlikely, or SDL_Sound based. I went this route, and what I found out was that I had missed the fact that there was a brand new SDL2_Sound project! Shocked

Thanks to getting its source code and some feedback provided by gdb tool, I discovered that the main issue that was causing the error and the fatalistic / apocalyptic core dump was an arithmetic exception.

Detective My first suspicion thanks to my experience in programming and mathematics was that it should be some sort of division by zero kind of error. Sad Actually, I failed. Happy with a sweat But I got very close indeed!

The actual problem was that the divisor was equal to nothing. Laughing
Oops! Not even its arithmetic equivalent, the dreadful 0! Worried 

Now after checking the code for any differences, something I usually / always do manually, I found out the root cause! Two Thumbs Up!

The integer data type was not some uint8_t integer but some uint16_t one! Very happy + Tongue sticking out
Serious Now it does return the dreadful 0 that I was talking about a few moments ago...