Main Menu

Recent posts

#11
3D Development / Re: Build a basic 3D Render En...
Last post by kevin - March 13, 2024, 10:19:24 PM
Steve,

Quotedidn't originally intend for the program to get this big. been workin on it for about a year now.not sure if i should add more or start a new project?

   Dude, I wish i had some useful advice,  I really don't know what to tell you ! 

Quotei was thinking of re-writing this with a better set up, as i didn't know what data needed to be shared.
a lot is copy/paste with an edit. it is getting harder to add to the code, as i need to adjust it in many area's, so a re-write would make it smaller and easier to grow.

   Yes sadly this such a problem as programs get bigger... Once the surface area of them grows adding new features / changes existing features become more laborious..  I suffer from this situation a lot these days, trying to change anything in a big code base is tedious.   

    If you want I can pick through and try and give some assistance.  Which really is making libraries out of the various underlying elements.   Which allows for the functionality to be shared/exported between projects easier, but as the surface area of the interfaces get bigger,  around we go again! :)   


Quotei was thinking of a 3D editor with all polygons, so you can make any shaped object you like?
there is already free stuff that does this, but i am doing this for the challenge and the fun of it.

    Anything in that space would be cool..  Ideally something that a user can import and just write their code on top of.   So the editor has a set of libraries a user can import and use to load/show objects in their code. 
 
    I dunno...  but something that helps us move in that next direction is needed..  but as you know building big things a hard !

    Enjoy ! :)

#12
Game Design / Llamasoft: The Jeff Minter Sto...
Last post by kevin - March 13, 2024, 08:59:31 PM

 
  Llamasoft: The Jeff Minter Story - A Celebration of a Llegend - Beyond The Scanlines #106

 
#13
3D Development / Re: Build a basic 3D Render En...
Last post by stevmjon - March 12, 2024, 07:20:59 AM
thanks kev. glad you like it.

i didn't originally intend for the program to get this big. been workin on it for about a year now.
not sure if i should add more or start a new project?

i was thinking of re-writing this with a better set up, as i didn't know what data needed to be shared.
a lot is copy/paste with an edit. it is getting harder to add to the code, as i need to adjust it in many area's, so a re-write would make it smaller and easier to grow.

i was thinking of a 3D editor with all polygons, so you can make any shaped object you like?
there is already free stuff that does this, but i am doing this for the challenge and the fun of it.

anyway, if there is any bugs let me know, or any new idea's i can add.

   stevmjon
#14
3D Development / Re: Build a basic 3D Render En...
Last post by kevin - March 11, 2024, 09:22:15 PM

  Brilliant mate !
#15
3D Development / Re: Build a basic 3D Render En...
Last post by stevmjon - March 11, 2024, 07:10:01 PM
well, time for another update to v0.54 March 2024.

this update was delayed because i wanted to add more tools & features requested by Kev.
i also fixed several bugs i found too.

Features :
> 'array' tool : this lets you clone an object in a grid pattern (good for walls, decking etc).
> 'clone' tool : this lets you clone an object in a given direction (good for stairs and above also).
> 'save / load' files : all the shape types are now supported, and the name of a loaded file appears in the screen title (top).
> 'panels' : a panel pops up with settings for different tools. it can be moved around the screen by click & hold the title. it also remembers the last settings used.
> 'panel values' : made sure that small movements of the mouse always give at least 1 integar value (it used to give zero)
> 'solid mode' : this is a new draw mode for the objects. the objects are converted to polygons and drawn solid. the draw order is artists render method so is far - near order.
  * NOTE: the advantage is the objects are drawn solid and are drawn fast. some polygons may 'pop' in front/behind others because i am using artist render method.
> 'more shapes' : there is ball , cylinder & box shapes(new). all shapes can be rotated & scaled.
> 'render modes' : there is multiple smaller render sizes for a quicker view. 100% , 50% , 25% .

i have also included a save file with this demo with the walkway object i made with this program.

   enjoy, stevmjon
#16
Source Codes / Number of Good Pairs - Leetcod...
Last post by kevin - March 10, 2024, 10:40:45 PM
#1512. Number of Good Pairs

Given an array of integers nums, return the number of good pairs.

A pair (i, j) is called good if nums == nums[j] and i < j.

 
Example 1:

Input: nums = [1,2,3,1,1,3]
Output: 4
Explanation: There are 4 good pairs (0,3), (0,4), (3,4), (2,5) 0-indexed.

Example 2:

Input: nums = [1,1,1,1]
Output: 6
Explanation: Each pair in the array are good.

Example 3:

Input: nums = [1,2,3]
Output: 0

 

Constraints:

    1 <= nums.length <= 100
    1 <= nums <= 100



    Here's  solution in PlayBASIC.    It breaks down into a two pass solution,  Using an array to map the number of values that have collisions (pairs) and then tally those up.   I feel like this could be solved it in one pass,  can you do it ?   :)



[pbcode]


 Test$="1,2,3,1,1,3"
; Test$="1,1,1,1";
 ;Test$="1,2,3"


 print "Test:"+Test$

 // Split this split into an numeric array
 dim Numbers(0)
 Count=Splittoarray(Test$,",",Numbers())
 


 //  count unique values   
 dim Values(10)
 for lp=0 to Count-1
      ThisValue = Numbers(lp)
      Values(ThisValue)++
 next


 // compute total good pairs
 TotalPairs = 0
 for lp=0 to GetarrayElements(Values())
       Count = Values(lp)       
      do   count>0      
         count--
           TotalPairs+=(Count)
      loop
 next
 
 print "Good Pairs:"+str$(totalPairs)
 

 sync
 waitkey


[/pbcode]



#17
General Support / Please use bigger fonts in thi...
Last post by piamoo - March 02, 2024, 02:44:41 AM
Hello!

Just like the fonts of this popular forum: https://www.syntaxbomb.com/forum/

Thank you very much!
#18
3D Development / Re: Build a basic 3D Render En...
Last post by stevmjon - February 09, 2024, 08:03:28 PM
good idea kev.

i can add a new preview mode that is 'solid mode' where all the objects are replaced with a PB shape.
this will stop the delay that the shaded modes have each time when movement stops.

i will delay the next release a bit more to implement these new ideas. if you have any more let me know and i will add them.

i have also added a new array tool too. i will post a pic when i get the panel for it done.

   stevmjon
#19
3D Development / Re: Build a basic 3D Render En...
Last post by kevin - February 07, 2024, 07:20:12 AM
  Cool!!!  

 Another thing  I was thinking about was possibly trying a dithering style patterns for the filled preview modes too.   So the user can get a sense of it while something is moving without drawing the while thing every refresh


#20
3D Development / Re: Build a basic 3D Render En...
Last post by stevmjon - February 04, 2024, 11:52:13 PM
kev, i just added a tweaked version of what you suggested with the preview render resolution.

instead of drawing the screen in stages as you suggested, i decided to draw a smaller preview screen size with all the detail in it. still draws so much faster too.
100% = 114 seconds
50% = 28 seconds
25% = 7 seconds

great idea for this suggestion kev. now i don't have to sit thought slow render times, lol.

i will post a new demo very soon too. i now have all the routines in for boxes, and i am now just setting up a nice default scene to view. i wanna get a bit creative with the boxes.

   stevmjon