Author Topic: Particle emitter designer  (Read 5834 times)

0 Members and 1 Guest are viewing this topic.

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Particle emitter designer
« on: September 28, 2021, 03:29:56 pm »
This program creates an emitter that works within a framework I wrote some time ago!

The UI is utilizing my self-written universal menu framework which you can find here: https://github.com/Targon-Industries/um.
The particle system stems from a game I started and I might want to expand with this and more tools to come.

To try it out yourself, download the .zip below, extract it and run the program, should work fine. Please don't hesitate to report bugs! 8) You can also save/load emitter files, if you want to share them.

Newest version
 


 
unknown.png
« Last Edit: September 30, 2021, 03:51:36 am by loudar »
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Particle emitter designer
« Reply #1 on: September 28, 2021, 08:28:58 pm »
@loudar I tried your app and slider bars might need a bit more work. They were overlapping the print of the next column over. This reminded me of STx work with particles. https://www.qb64.org/forum/index.php?topic=1615.msg108267#msg108267

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Re: Particle emitter designer
« Reply #2 on: September 28, 2021, 08:46:07 pm »
I think the overlapping might be because your window is too small ;D If you resize it, they should move outwards, because I aligned the left column to the left side and the right one to the right side.
You could, if you want to, tinker with the placement in the internal/.tui files, documentation is in the GitHub repository linked above!
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Particle emitter designer
« Reply #3 on: September 28, 2021, 08:53:30 pm »
OK so how many pixels does a slider need in width?

Wait don't you set the screen size in code?


Yeah you even measure my window potential and use half
Code: QB64: [Select]
  1. Screen _NewImage(sw / 2, sh / 2, 32)
  2.  

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Particle emitter designer
« Reply #4 on: September 28, 2021, 09:04:05 pm »
Yes fixed by fixing sw and sh. You need a minimum screen width for slider bars with labels.

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Re: Particle emitter designer
« Reply #5 on: September 29, 2021, 02:39:02 am »
Since the window is resizable, you could just maximize the window and everything should work as expected. The UI updates itself automatically. I'll set a minimum depending on your screen size for the initial size though!
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Particle emitter designer
« Reply #6 on: September 29, 2021, 09:35:50 am »
Well I'll be jiggered!

_FullScreen does not just make everything bigger, everything including the particles drawn remain same sized but there is more space to fit everything.

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Re: Particle emitter designer
« Reply #7 on: September 29, 2021, 11:31:54 am »
Good that you remind me of _FULLSCREEN! I will add a checkbox to toggle that ;)
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Particle emitter designer
« Reply #8 on: September 29, 2021, 11:52:18 am »
Ah the maximize in top right corner does work as well, not use to seeing/using that option in QB64 app.

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Re: Particle emitter designer
« Reply #9 on: September 29, 2021, 12:10:42 pm »
Since maximizing isn't the same as proper fullscreen, I will add the option anyway ;D
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Particle emitter designer
« Reply #10 on: September 29, 2021, 08:40:11 pm »
If I made that, Mark would blame me for not making the middle mouse wheel move the scrollbars, when the mouse was turned sideways!

Hey, I love the interface. It reminded me of something I implemented in SCREEN 0 for a WP app.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Re: Particle emitter designer
« Reply #11 on: September 30, 2021, 03:48:04 am »
Good news, Pete! Scrolling on the sliders is now implemented, as well as the fullscreen toggle.

Also added the option "extra" (how much particles deviate from their path) and "wind influence" (self explanatory)!

Also a little side note/question: The dropdown menus seem to be expanded randomly sometimes and I can't figure out why for ages now, so if anybody wants to have a look...
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Particle emitter designer
« Reply #12 on: September 30, 2021, 05:23:19 pm »
First: I have difficulty running the '.bas' file on Linux. Granted, filename case settings were expected and modified, but then it would not locate libraries... But that's a Linux thing...

Second: Ran the executable using Wine on Linux and it ran very well. Cool program. Well done! Question: How long did it take to write this and from whence came your inspiration?
Logic is the beginning of wisdom.

Offline loudar

  • Newbie
  • Posts: 73
  • improve it bit by bit.
    • View Profile
Re: Particle emitter designer
« Reply #13 on: September 30, 2021, 07:00:35 pm »
The "opensave" library probably causes an issue, since that uses Windows things, I believe. As I haven't done an own file explorer, that will be the only supported platform for now. The .bas file you should be able to open in your IDE though 👀

I think I started the first bits of code for this about a year back. The UI framework was inspired by the ease of HTML, I wanted to capture that and put it into a QB64-native desktop variant. So I designed all the elements I wanted and I am still continuously expanding that library as I go.
As for the particle routines, that was a piece of code I also started a year ago, but only wrote that for a little 2D "game" which never became anything. Now I relived it to make it modifiable with the UI and maybe use the emitters I create in a Level design tool that is yet to be written 8)
As for putting those pieces of code together, it took me one day. Writing all the aspects...months!
Check out what I do besides coding: http://loudar.myportfolio.com/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Particle emitter designer
« Reply #14 on: October 01, 2021, 02:01:21 am »
Recognising the opensave file was purely an Linux thing... Linux was expecting 'opensave' but saw 'OpenSave". I do not know why it could not find the other libraries. Filenames were correct. "I" could see the files but the QB64 message said that it could not.. That's as far as I got.... I then ran the executable instead... Still a cool program...
Logic is the beginning of wisdom.