-
Re: Getting the ball rolling. Which VB6 projects are you working on?
True to the topic of this thread, I'd like to chat about my next coding project : War Dice. A relatively easy app thats played by two players. Player 1 rolls, then player 2 rolls. After three rounds the player with the highest score wins.
For added spice, once I've typed it in, I'm going to try and improve the dice rolling animation, by using someone else's code.
I'm using a book with the code for both the original game, and my improvement, well the programmer of the book's improvement, at least.
I'm working towards a RPG, so the dice code might work with it. Turn based, in case you were wondering. :-)
Sorry for the grammar, but you get my drift anyway : 2 programs in books go into my project as an improvement on the first one, at least.
Also apologies to the OP, but the code is VB.net compliant, and my next discussion of it will be in VB.net forum. So, uncle Bert, so long and thanks for all the fish.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I suppose it might be time for a "Getting the ball rolling. Which VB.NET projects are you working on?" but I'm not going to create that. Someone else will have to.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I can bang projects out fairly quickly now given some of Olaf's help to solve a sticking point or two. I dug out my old steampunk volume control PSD, the design of one of my first Yahoo widgets from approximately 2010-ish. A bit of hacking to the original PSD and I have a VB6 clone of my first creations.
https://www.vbforums.com/images/ieimages/2024/05/1.jpeg
https://www.vbforums.com/images/ieimages/2024/05/15.png
https://www.vbforums.com/images/ieimages/2024/05/2.jpeg
https://www.vbforums.com/images/ieimages/2024/05/3.jpeg
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Today I decompile a net program, extract the C # source code to open the project, the compilation failed. Extract VB. Net source code, can not open the project. Then I created a new project and added those source code files to compile successfully. I suspect that there is a traitor inside Microsoft, just like they leaked the source code of win7 and XP.
Maybe that's why not many people use C # all the time.The number of VB. Net users is even smaller, so Microsoft has given him a complete abandonment.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
I'm finalizing several components, WordProcessor (for text editing), CommonControls (some basic common controls), RibbonBar and some more Libraries (general functions for forms among other functions) for My Ecclesiastical Manager, which I'm going to create using the MCVVM-C standard architecture. So, I hope.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Ecclesiastical Manager, is that a thing? Is there a real market for this type of software? No criticism intended (my stuff is also decidedly very niche). Are you making good progress? Where do we find out more? Too many questions...
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Just largely finished the coding for my Wireless signal widget. I dived into APIs concerning WLAN_CONNECTION_ATTRIBUTES and WLAN_ASSOCIATION_ATTRIBUTES in order to correlate MAC addresses extracted from WlanGetNetworkBssList with the aim of extracting link quality and supplied RSSI values. Gawd blimey, the work required! I gave up and extracted the signal quality using WlanGetAvailableNetworkList via some code suppplied by couttsj, from this forum and in the end I calculated the RSSI value myself. A ten second job rather that a week of mucking around with APIs.
https://www.vbforums.com/images/ieimages/2024/05/17.png
It looks like I'm knocking up a trinket per day but it isn't like that, I've been working hard toward this point for months. I'm just making finishing progress on the code and after that it is the documentation and the boring stuff.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Ecclesiastical Manager, is that a thing? Is there a real market for this type of software? No criticism intended (my stuff is also decidedly very niche). Are you making good progress? Where do we find out more? Too many questions...
The ecclesiastical manager is dedicated software for various functions in the church. It is fed with information, for example, registration of members, ministers, participants, visitors, cash control, banks, assets, correspondence editor, chats, control of Bible school classes, sacraments, among other things. After feeding information, it is capable of managing and offering various reports, cost centers, newsletters, financial management, suggestions on asset management, preventive inspections on vehicles, consultation on legislation, among other things related to ecclesiastical administration.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Currently I'm reading about, and getting tooled up for a rotoscope animation. Has anyone created a scrolling video game, as I'd be interested in whether you got the scrolling to as smooth as a Megadrive or not?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
There are multiple games created with VB6.
Especially those using DirectX work very smooth
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Arnoutdv
There are multiple games created with VB6.
Especially those using DirectX work very smooth
That's encouraging. I'll have to work towards it.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Episcopal
The ecclesiastical manager is dedicated software for various functions in the church. It is fed with information, for example, registration of members, ministers, participants, visitors, cash control, banks, assets, correspondence editor, chats, control of Bible school classes, sacraments, among other things. After feeding information, it is capable of managing and offering various reports, cost centers, newsletters, financial management, suggestions on asset management, preventive inspections on vehicles, consultation on legislation, among other things related to ecclesiastical administration.
Maybe use a face recognition system. With ai automatic recognition, who is the most suitable priest?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
ArthurDent
That's encouraging. I'll have to work towards it.
If you search this thread for earlier entries you will find some games development posted by theTrick that will impress you.
Games:
https://www.vbforums.com/showthread....=1#post5531397
https://www.vbforums.com/showthread....=1#post5531937
https://www.vbforums.com/showthread....=1#post5532011
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Episcopal
The ecclesiastical manager is dedicated software for various functions in the church.
Fascinating, Is it a commercial product, your own, that is already in the marketplace or are you readying it for release?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Fascinating, Is it a commercial product, your own, that is already in the marketplace or are you readying it for release?
I'm in the creation phase, architecture.
Edit: At the moment it would be free in the first versions. Or a free version, and a paid version.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
xiaoyao
who is the most suitable priest?
It would definitely be you! If you converted to Christianity.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Episcopal
I'm in the creation phase, architecture.
So, do you have an estimated delivery date and an idea of how much work is involved? It sounds like a rather mammoth undertaking. A medieval gothic GUI sounds as if it might find a home in your project.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I did a couple of mediaeval skins a few years ago...
https://www.vbforums.com/images/ieimages/2024/05/20.png
I never used the first, and you can see why.
https://www.vbforums.com/images/ieimages/2024/05/21.png
The second was better and I might use that again.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
You could put some art forward for an RPG. It's very good. I'm going at one but my time on the PC is limited, so it could be a year by the time I've finished it.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I have been asked to do some a few years ago. My problem is that I do what I enjoy rather than doing what the client wants. It doesn't always match up.
So, now I just make what I want to make and I no longer worry whether anyone likes it or not. Therefore, I can't let anyone down. Sad state of affairs but that's the way it is.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
ArthurDent
so it could be a year by the time I've finished it.
I restarted in VB6 in 2019 with my first utility, my "enhanced icon settings tool", a replacement for the same that came with Rocketdock, it took me over a year from start to finish working very part time indeed. I did everything incorrectly and had to learn as I went along. I didn't reach a fully working version of my dock until 2022! Still with loads of coding errors and design mistakes but what I learnt! Don't worry about it taking a year. I suggest that many here will take equally long with their 'magnus opus' - I know it should be magnum but I don't like advertising ice creams.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
I restarted in VB6 in 2019 with my first utility, my "enhanced icon settings tool", a replacement for the same that came with Rocketdock, it took me over a year from start to finish working very part time indeed. I did everything incorrectly and had to learn as I went along. I didn't reach a fully working version of my dock until 2022! Still with loads of coding errors and design mistakes but what I learnt! Don't worry about it taking a year. I suggest that many here will take equally long with their 'magnus opus' - I know it should be magnum but I don't like advertising ice creams.
I'm just having a go at game programming. I don't eat much ice cream, but you could say my Cornetto is done, and now hopefully I can do some rewarding Basic, as I try and make a side ways scroller. I can see why in the Amiga days there is a glut of spaceship sprites, and not that many well animated character sideways scroller. No animation frames. My guess is the ratio is 2:1 spaceship Vs animated sprite scrollers. Am I just fooling myself? Because a spaceship game it's what I feel like doing after spending all evening trying to bloody trim video which has my important frames inside it.
Update . Instead of deleting the "bad" frames, I selected and extracted the "good" ones. That worked as a methodology. My next steps are some tweens to get it looking smooth.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Well. I’ve created my sprite animation, not too jerky, not a thousand frames either. I’m just guessing the frame rate until it looks ‘right’. Has anyone here got a motion capture suit. Like the Smartsuit Pro. I need a code template for the next part, to show a scrolling background with a sprite overlaid onto it. Where should I go from here, uncle Bert?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I think I might have to research some code from this forum.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
ArthurDent
I think I might have to research some code from this forum.
https://www.sourcecodester.com/visua...appy-bird.html
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
OK. Thanks Unc. You're my favourite poster so far. Thanks for spending time on me. Definitely on my next Xmas card list. I'll put VB6 on if I can buy a copy from eBay.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
https://www.vbforums.com/images/ieimages/2024/06/6.jpeg
Making progress on my Panzer network gauge. It uses WMI to extract raw performance data. I'm happy with using WMI instead of using APIs. Modern machines are quick enough so that WMI queries have no real impact on a modern system. The sampling rate is modified by a sliding value in any case so it can query as often as or as seldom as the user requires. It uses 0.04% of the CPU on average, peaking to 0.29% when querying WMI but rising to 0.90% when animating the rotating pointer. An interval of once every 10 seconds, I think that is acceptable.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Episcopal
I'm in the creation phase, architecture.
I do wish I could have such a phase. I am a Project Manager by trade and I would always insist on such a phase as part of the plan.
As a techie though and a VB6 hacker I just want to dive in and code. Eventually an architecture shows itself or through guidance from others.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
I do wish I could have such a phase. I am a Project Manager by trade and I would always insist on such a phase as part of the plan.
As a techie though and a VB6 hacker I just want to dive in and code. Eventually an architecture shows itself or through guidance from others.
How would you define 'hacker'? A beginner programmer? You're not that.
You're not crude either, so you can't be a hacker. 'Hacker' as in a bit 'were' or a bit 'whay'? A little bit Neo from The Matrix? Ha, you can't be, that's me!
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I can design graphically using certain tools. I am 'technical' in as much as I like digging into technologies from electronics 60s-80s, mechanics from the same period (cars and bikes) and practical with my hands from lathework to some competent art. I aim to improve my programming skills in two/three language variants. I am a jack of all trades and a master of none. ADHD I think.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
My magnus opus programmatically was Video Star. I've got seven GCSEs. Unfortunately I've got schizophrenia, depression and pains. I'm waiting for a cure. I got it just as I was finishing Video Star. I wish now I had written a game not an app, but I decided VB wasn't a game creation package, some way into it. The manuals I read about VB didn't mention games, either. Due to the fact that there was only a physical supply of books, and I didn't have the web, I had nothing at all on game programming. So I made an application, not a game.
Update : I've found some more animated sprite material on YouTube. Due to their being limited supply of these things, my game will feature a SWAT officer shooting stuff as violently as possible, and the game can be classed as cathartic. I've got to research some Amiga games, they developed sideways scrolling shoot-em-ups to a fine art at about that time.
I've had resistance to making a violent game, but I think it makes the experience more exciting with the bullet dodging and aiming that goes on in stuff like Robocop, or The Untouchables etc.
I've been researching chroma keying, recently too with a view to making my own sprites. Plus I've got an XNA book, due, and a Visual Basic game programming book (I was only half right about VB being unsuitable for games!).
As soon as I get my second book, I'll compete the first game introduced in it and try and add something to it. I'm trying to get an eBook reader purchased, but haven't the money at the moment. I've been splurging on socialising and birthdays...he, he.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Getting the ball rolling. Which VB6 projects are you working on?
Lately, nothing anyone is helping me with.. Just views and being ignored!
*However, yer project seems pretty cool tho.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
I've just ran the above game...and the scrolling is jerky and the gameplay pretty broken. The animation isn't smooth either. I'll have to find some different code.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Since the code requires so little change I still think tB projects are of interest here, so quick plug for my new project Memory List Manager. It's a lightweight utility to clear standby and modified memory without loading a full-blown system resources utility. Windows 10 memory management isn't all that great; standby and modified memory will grow to consume all memory, and contrary to Microsoft's claims, this slows down the system (especially opening stuff), and can even cause out of memory errors and system destabilization.
https://www.vbforums.com/images/ieimages/2024/06/8.jpg
There's also a command line option to run the commands without GUI, and a jump list.
https://www.vbforums.com/images/ieimages/2024/06/6.jpg
Code is actually pretty simple; just like
Code:
Public Function ClearStandby(Optional bLowPriority As Boolean = False) As NTSTATUS
Dim nCmd As SYSTEM_MEMORY_LIST_COMMAND
If bLowPriority Then
nCmd = MemoryPurgeLowPriorityStandbyList
Else
nCmd = MemoryPurgeStandbyList
End If
Dim status As NTSTATUS
SetCursor LoadCursor(0, ByVal IDC_WAIT)
status = NtSetSystemInformation(SystemMemoryListInformation, nCmd, LenB(nCmd))
SetCursor LoadCursor(0, ByVal IDC_ARROW)
Return status
End Function
(Notice the only difference from perfect VB6 compatibility is I prefer tB's "Return <value>" syntax instead of FunctionName = <value>.
More info at the GitHub repo.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
That is gorgeous, I might have to take a look inside your code and then play with it in TB64, that might be the spur to get me into TB64. I've just been diving into some RAM, pagefile and virtual mem gauges as you can see above.
I hope the various columns in your program have balloon tooltips with a brief explanation of what each of the memory lists are... that would be ever so useful for potential users.
The command line option is an extremely good addition that so many VB6 utils. lack.
(when I say TB64, you understand I can't say TB, too much sputum and coughing involved)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I have just reverted back to my original and very first steampunk widget design that I created as a Konfabulator widget a decade or more ago... I am pulling the various components together into a single usable PSD that can form the basis of a VB6/RC6 program.
https://www.vbforums.com/images/ieimages/2024/06/9.jpeg
Thats is the old Yahoo/Konfabulator widget in .js/XML using a browser context to display the graphics with the javascript acting as the logic glue.
https://www.vbforums.com/images/ieimages/2024/06/8.jpeg
That is me rebuilding a single PSD with all the layers named appropriately for the forthcoming VB6 program. If I can convert the complexity of that visual GUI then I can convert anything to VB6.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
ArthurDent
My magnus opus programmatically was Video Star. I've got seven GCSEs. Unfortunately I've got schizophrenia, depression and pains. I'm waiting for a cure. I got it just as I was finishing Video Star. I wish now I had written a game not an app, but I decided VB wasn't a game creation package, some way into it. The manuals I read about VB didn't mention games, either. Due to the fact that there was only a physical supply of books, and I didn't have the web, I had nothing at all on game programming. So I made an application, not a game.
Update : I've found some more animated sprite material on YouTube. Due to their being limited supply of these things, my game will feature a SWAT officer shooting stuff as violently as possible, and the game can be classed as cathartic. I've got to research some Amiga games, they developed sideways scrolling shoot-em-ups to a fine art at about that time.
I've had resistance to making a violent game, but I think it makes the experience more exciting with the bullet dodging and aiming that goes on in stuff like Robocop, or The Untouchables etc.
I've been researching chroma keying, recently too with a view to making my own sprites. Plus I've got an XNA book, due, and a Visual Basic game programming book (I was only half right about VB being unsuitable for games!).
As soon as I get my second book, I'll compete the first game introduced in it and try and add something to it. I'm trying to get an eBook reader purchased, but haven't the money at the moment. I've been splurging on socialising and birthdays...he, he.
If you want to develop a simple game, you might as well use a web page. 2d.js,3d.js
It can run on computers and mobile phones at the same time.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
This is the VB6 first-pass equivalent of the original Konfabulator widget. If you compare it to the older version above, there is virtually no difference, the cable is a bit screwed up, I will be addressing that later.
https://www.vbforums.com/images/ieimages/2024/06/8.png
All the controls are present and each has a balloon tooltip on a hover. Not much logic yet, just adding that now. Nevertheless it has a fully operating preferences utility, menus & help images &c. Shown here below, the older Konfab. widget bottom right for comparison.
https://www.vbforums.com/images/ieim...024/06/10.jpeg
I never dreamt I would be able to create such graphically complex programs with VB6. I am so impressed that VB6 is even able to do this, and increasingly impressed by Olaf's Rich Client.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Hoping this smaller animated GIF will post without being replaced, we'll see...
https://www.vbforums.com/images/ieimages/2024/06/2.gif
er, no. It was replaced... but the forum retained a copy of the original GIF, that at least is an improvement.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I do love coding in VB6, when it goes reasonably well.
Clock/Calendar widget with new about form. All the UI elements operate, ie. they go in/out or up/down and make the correct noise. The time slider is the next thing to address, then the analog/digital clocks.
https://www.vbforums.com/images/ieimages/2024/06/9.png
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
(Notice the only difference from perfect VB6 compatibility is I prefer tB's "Return <value>" syntax instead of FunctionName = <value>.
This was one of the first habits I dropped when I moved to VB.Net. It was instant. I started using Return right from the very beginning. I have no clue why BASIC ever had such nonsense as returning a value through the function name. I've always hated that, even from way back when, before Visual Basic's time.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Show us what you are working on Niya rather than an another VB6/vs VB.NET chat. I don't mind if it is not VB6, let's have a quick look.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
I have no clue why BASIC ever had such nonsense as returning a value through the function name
Other languages (eg Pascal) also return a value this way.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
2kaud
Other languages (eg Pascal) also return a value this way.
. . . and you can pass the (hidden) return variable ByRef to other procedures to assign result value.
Btw, in C/C++ it used to be possible to assign result to _EAX/_AX register intrinsic instead of returning it :-))
cheers,
</wqw>
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
wqweto, how's the RC6 IDE idea progressing?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Show us what you are working on Niya rather than an another VB6/vs VB.NET chat. I don't mind if it is not VB6, let's have a quick look.
The last VB6 project I was working on was something intended for the CodeBank. Parts of it are written in assembly using Trick's add-in:-
Code:
;VB6 Prototype
;**************************************************************
;Public Function JenkinsHash(ByRef key As String) As Long
;**************************************************************
use32
push ebp
mov ebp, esp
push ebx ;We want to use EBX as the BSTR pointer
;----------------------------------
xor eax,eax ;Zero EAX. This will contain our hash
;digest.
xor edx, edx ;Zero the EDX register. The lower 16 bits
;will contain our current character
mov ebx, [ebp + 8] ;Get ByRef String pointer from 1st arg
mov ebx, [ebx] ;Dereference it to get BSTR pointer
cmp ebx, 0 ;Check if the BSTR is null.
;Null BSTRs are valid
jz exitFunc ;Exit the function if null
loopStart: ;***************************
mov dx, [ebx] ;Read the current character
cmp dx, 0 ;Is it the null terminator?
jz exitLoop ;If it is, then exit the loop
add eax, edx ;Add the current char code to the hash
mov ecx, eax ;Copy hash into ECX
shl ecx, 10 ;Shift ECX to the left by 10
add eax, ecx ;Add it to the original hash
mov ecx, eax
shr ecx, 6
xor eax, ecx
add ebx, 2 ;Advance pointer to next character
jmp loopStart
exitLoop: ;***************************
;**********************************************
;It should be obvious what all of this does.
;If not, then look at the C implementation of this
;function in the comments above this function's VB6 stub in the
;ASMHelpers module.
;**********************************************
mov ecx, eax
shl ecx, 3
add eax, ecx
mov ecx, eax
shr ecx, 11
xor eax, ecx
mov ecx, eax
shl ecx, 15
add eax, ecx
;**********************************************
exitFunc:
;----------------------------------
pop ebx
mov esp, ebp
pop ebp
ret 4
The above is an implementation of the Jenkins one at a time hash function meant for a hash table implementation I decided to do for fun. I wrote it in assembly on account of VB6's lack of dedicated bit shift operators.
Quote:
Originally Posted by
yereverluvinuncleber
I don't mind if it is not VB6
Code:
Private Function CalcNewPosition(ByVal currentPos As PointF, ByVal previousPos As PointF, ByVal frictionCoeff As Single, ByVal forcesTotal As PointF, ByVal deltaTime As Single) As PointF
'************************* Formula Explanation *************************
' Calculates the new position using an adapted Verlet Integration formula with friction:
' newPosition = 2*currentPos - (currentPos - velocity * (1 - frictionCoeff)) + forcesTotal * deltaTime^2
' This version incorporates friction into the standard Verlet formula for motion under constant acceleration.
'***********************************************************************
' Calculate the velocity as the difference between the current and previous positions.
Dim velocity As PointF = VectorHelpers.Subtract(currentPos, previousPos)
' Apply friction to this velocity.
Dim frictionAdjustedVelocity As PointF = VectorHelpers.Multiply(velocity, (1 - frictionCoeff))
' Adjust the previous position as if friction had been applied in the previous step.
Dim frictionAdjustedPreviousPos As PointF = VectorHelpers.Subtract(currentPos, frictionAdjustedVelocity)
' Calculate the acceleration displacement, assuming forcesTotal is acceleration.
Dim accelerationDisplacement As PointF = VectorHelpers.Multiply(forcesTotal, deltaTime * deltaTime)
' Compute the new position using the Verlet integration formula, substituting the actual previous position
' with the friction-adjusted previous position in the calculation.
Dim newPosition As PointF = VectorHelpers.Add(
VectorHelpers.Add(
VectorHelpers.Multiply(currentPos, 2),
VectorHelpers.Multiply(frictionAdjustedPreviousPos, -1)
),
accelerationDisplacement
)
Return newPosition
End Function
End Class
Code:
Private Function CalcOverlapCorrections(ByVal b1 As Ball, ByVal b2 As Ball) As PointF()
'I'm particularly proud of this function. I came up with it
'completely on my own.
'It corrects overlapping balls by moving them away from each
'other based on the angle between their centers
'*********************************************************
'Written by Niya (05, Mar, 2024)
'*********************************************************
'The clostest the balls are allowed to each other
Dim minimumDist As Single = b1.Radius + b2.Radius
'Get the path from b1 to b2 as a vector
Dim positionVector = VectorHelpers.Subtract(b2.CurrentPosition, b1.CurrentPosition)
'Get the current distance between the two balls
Dim dist As Single = VectorHelpers.GetMagnitude(positionVector)
'The distance any ball needs to travel so they no longer overlap
Dim distDelta As Single = minimumDist - dist
'Get a unit vector from the position vector
Dim normPosVector = VectorHelpers.Normalize(positionVector)
'Lengthen normalized vector to cover half the distance needed and flip the
'direction. This is how b1 has to move.
Dim b1Move = VectorHelpers.Multiply(normPosVector, distDelta / 2 * -1)
'Lengthen normalized vector to cover half the distance needed but leave
'the direction unchanged. This is how b2 has to move.
Dim b2Move = VectorHelpers.Multiply(normPosVector, distDelta / 2)
'Calculate the new positions of the balls
Dim newPosBall1 As PointF = VectorHelpers.Add(b1.CurrentPosition, b1Move)
Dim newPosBall2 As PointF = VectorHelpers.Add(b2.CurrentPosition, b2Move)
Return {newPosBall1, newPosBall2}
End Function
A pair of extracts from a VB.Net project also intended for the CodeBank. It's part of a simple physics demo.
Things took a drastic turn in my life recently which has left me with very little time to write code so for the time being these pet projects are in limbo.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Niya
I have no clue why BASIC ever had such nonsense as returning a value through the function name. I've always hated that, even from way back when, before Visual Basic's time.
I suppose but I would much rather work in a language which can return values through the function name if desired. To me, makes for much less complicated code and easier to see what is happening and therefore to maintain. But the cool thing is that we have choices :).
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Niya
This was one of the first habits I dropped when I moved to VB.Net. It was instant. I started using Return right from the very beginning. I have no clue why BASIC ever had such nonsense as returning a value through the function name. I've always hated that, even from way back when, before Visual Basic's time.
It is convenient sometimes, consider the classic function i've used thousands of times:
Code:
Public Function LPWSTRtoStr(lPtr As LongPtr, Optional ByVal fFree As Boolean = True) As String
SysReAllocStringW VarPtr(LPWSTRtoStr), lPtr
If fFree Then
Call CoTaskMemFree(lPtr)
End If
-----------------
Anyway, I'm still working on my memory list manager... I saw another open source app like it, and I wanted mine to have equivalent features while looking even nicer. So I added some Shape controls to visualize standby/modified RAM in relation to actually free, added an 'Autooptimize' button to apply the 3 most common procedures in the correct order, set up a feature to run that automatically, and added a minimize to tray option, with tray context menu where all options (+restore UI and quit) are available.
https://www.vbforums.com/images/ieimages/2024/06/12.jpg
Just gotta test the monitoring feature then it will probably be released tomorrow; but thought I'd post here to see if anyone had any features they think it's missing? Or information (again keeping in mind it's not a general memory tool meant to show everything, just very basic info + stuff relevant to the standby/modified memory).
(PS - The numbers in the bar up top don't add up right because I modified zero-byte categories to show up with fake numbers just to demonstrate it; I've checked their values normally)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
wqweto, how's the RC6 IDE idea progressing?
It’s not moving anywhere - there is no compiler ready :))
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Niya
It's part of a simple physics demo.
I am going to need some VB6 pendulum code soon, I have an implementation (of sorts) in .js that I used in the Konfabulator version, I may just convert that and see how it goes. If you know of any VB-like pendulum physics code that could be utilised, do let me know. It'll have to be relatively simple for this small brain to comprehend.
Quote:
Originally Posted by
Niya
Things took a drastic turn in my life recently which has left me with very little time to write code
Sorry to hear it. You may be aware of the drastic events that took place in my own life (father died, mum dementia), I've moved on from that and I am sure you will too.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
Anyway, I'm still working on my memory list manager... I saw another open source app like it, and I wanted mine to have equivalent features while looking even nicer.
I'm impressed by this tool, I appreciate how it is progressing. Always good to take advantage of another's GUI styles to improve your own contributions. I've been spurred on many times by someone else coming up with something I really enjoyed. Inspiration seldom comes from nowhere.
I would suggest a DPI aware version for those with high DPI screens and scaling.
My prefs screens on my 4K screen for comparison
https://www.vbforums.com/images/ieimages/2024/06/11.png
High DPI
https://www.vbforums.com/images/ieimages/2024/06/12.png
Low DPI
The low DPI version auto-scaled by Windows has some charm in the way the fonts are rendered, I almost enjoy the blurry effect but small window apps using small fonts do suffer somewhat.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
wqweto
It’s not moving anywhere - there is no compiler ready :))
Does that mean you are working on one?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Olaf has allegedly been working on an RC6-based compiler for years and will be for the next decade. But its completion will apparently herald his perfect world where the conditions for open sourcing RC6 (or RC20) are finally met, and I guess then we're all supposed to forget about VB6 and tB and start rewriting our apps around RC6/Cairo. Or something like that.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
Olaf has allegedly been working on an RC6-based compiler for years and will be for the next decade. But its completion will apparently herald his perfect world where the conditions for open sourcing RC6 (or RC20) are finally met, and I guess then we're all supposed to forget about VB6 and tB and start rewriting our apps around RC6/Cairo. Or something like that.
Ah, I seeeeeee. I'm treading on places I should not. I now see Wqweto's comments in a new light.
I assume that by building VB6/RC programs I may appear in your eyes, to have joined the dark side...
For me, VB6+RC6/Cairo just does a job that I would struggle to achieve using GDI or GDI+
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Has anyone dared ask Olaf if he has an intended completion date or a measure of completion? I don't want to stir up a hornet's nest, I am genuinely interested.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I'm working to convert a small test utility I originally wrote in VBA (Excel 2003) way back in 2007. The Utility generates 2 accurate low flow rates from a mass flow controller. At the higher flow rate a small vane should just begin spinning. At the lower flow rate the vane should not spin. The utility communicates with the MFC through the manufacturers DDE server Software.
https://imgur.com/a/s3XOooP
(Struggling to get the image to actually appear in the post?)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Use imgur to host the image, use the imgur link provided. This forum regularly eats images for breakfast.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?