Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Hemlos

Pages: [1] 2 3 ... 106
Competitions / Re: Hello World - Contest
« on: 2019-Apr-09 »
The string object lib i used, is up-to-date and ready to rock and roll.
Feel free to use it if you find handy, enjoy.

Competitions / Re: Hello World - Contest
« on: 2019-Mar-29 »
i have a guess, the code will procrastinate  :good:

Competitions / Re: Hello World - Contest
« on: 2019-Mar-13 »
Game on!
Compiled as a console program.
Note: only a few lines in main code, but what it does is pretty complicated.

Code: GLBasic [Select]
// --------------------------------- //
// Project: HelloWorld
// Start: Tuesday, March 12, 2019
// IDE Version: 15.238
// By Hemlos

// Instructions: compile as console


LOCAL HelloWorld AS lib_String_Object_$ = "hElLo wOrLd"

LOCAL BGColor% = 0, TColor% = 15

STD_OUT( HelloWorld._Capitalize$() )
STD_OUT( HelloWorld._Capwords$() )
STD_OUT( HelloWorld._Swapcase$() )
STD_OUT( HelloWorld._RFill$(3, "!") )
STD_OUT( HelloWorld._LFill$(3, "!") )
STD_OUT( HelloWorld._Left$(14) )
STD_OUT( HelloWorld._Right$(11) )
STD_OUT( HelloWorld._Swapcase$() )
STD_OUT( HelloWorld._Upper$() )
STD_OUT( HelloWorld._Lower$() )
STD_OUT( HelloWorld._Encrypt$("GLBasic") )
STD_OUT( HelloWorld._Decrypt$("GLBasic") )
STD_OUT( HelloWorld._Replace$("world","GLBasic") )
STD_OUT( HelloWorld._Replace$("GLBasic","world") )
STD_OUT( HelloWorld._Capitalize$() )
STD_OUT( HelloWorld._Capwords$() )

SLEEP 60000

FUNCTION STD_OUT: showThis$, restTimeMS% = 1000 // clearscreen, stdout, sleep. restTimeMS% = millseconds sleep time (integer) defaults one second
        STDOUT "\n\n\n                            "
        STDOUT showThis$
        SLEEP restTimeMS%
        RETURN 0

Include this String object library lib_String_Object.gbas :
The message exceeds the maximum allowed length (20000 characters).
You'll have to download the .rar to see it in action.  :zzz:
Note: the string lib is mine own creation, based 100% on GLBasic command structures, and inspired by the Python Language.

Beta Tests / Re: 3d Space Sim
« on: 2019-Mar-09 »
Very cool. How do you come up with that kind of ideas?

I randomly study of math and astrophysics on a regular basis, using GLBasic to visualize some math.
I really wanted to see gravity in action, to see; stars, planets and moons form and take on unique orbits.
When i saw the formula for gravity from Isaac Newtons principia, i figured it could be worked out using a double nested loop.
Also, it has become a great platform for refining my 3d libs for cameras, particle engine, lighting, and sfx, etc etc

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Mar-09 »
Figgured it out..

MOUSEAXIS outputs are realtime, and you have to try and capture the output all through your program.
Even at the end of all nested loops.
What i mean is, MOUSEAXIS value can and does change several times between showscreen calls.

so i used this setup to capture the mouse output many times in the program loops:
function detectmouse
self.CaptureX = mX

and then at the end of the main loop, just before the showscreen update the delta api mouse

function update_mouse
deltamouseX = CaptureX
delta stuff
CaptureX = 0 // RESET (showscreen should be next)

ensure to reset the value so you can start capturing again, after the showscreen

Beta Tests / Re: 3d Space Sim
« on: 2019-Mar-03 »
There is a space sandbox simulator if you really want that kind of effect with gas...saw it on youtube
tho it doesn't do accretion disks directly, you can immitate them by shredding stars lol

To answer your q's: yes and yes
basically, during system creation when the profile is chosen, it is an accretion disk engine at the beginning
gas? gas physics are present in the comets, the star pushes the gas tail away from the star.
planets form, its based on solids only, also....some gas are solid or liquid in deep space anyway, no atmospheres yet.
IRL most of the universe is made of hydrogen, doesn't make a good platform for planets.
supernovae create the higher density elements, and that is what these simulated objects represent, without regard to chemical properties and effects.

yes the disks can be formed into rings....every dimensional feature of an accretion is disk is covered if im not mistaking, but im not a scientist so, maybe i missed something.
Directly, it uses these features to form the solar systems:

Code: GLBasic [Select]
                        // SOLAR SYSTEM CONFIGURATION
                        GLOBAL SPLITWAVE                                = FALSE                         // Initial planet formation splits into 2 directions.
                        GLOBAL SPACEWAVEFORM%           = 1                                     // 0 = direct VECTORADD addition, 1 = random VECTORADD addition ()
                        GLOBAL RINGS%                           = 12                                    // Number of rings
                        GLOBAL RADS%                            = 2                                     // # of radial hub arms
                        GLOBAL SPREAD#                          = 12.0                          // additional rad spread random angle on xz plane
                        GLOBAL DIST#                                    = 2000.0                                // RADIUS OF PLANET BELT, PER STEP
                        GLOBAL GAP#                                     = 8000.0                                // Magnitude between each ring
                        GLOBAL G#                                       = 0.000006674                   // Gravitational constant - time, the bigger the constant, the faster time goes. our universe irl is very very slow, constant is tiny and thats a good thing.
                        //PLANET PHYSICS
                        GLOBAL STARSIZE#                                = 1000000000.0          // 0 = normal object >0 = star to form in center, size starts at this size.
                        GLOBAL MaxMASS#                         = 1100000.0                     // RANDOM PLANET MASS MAX START SIZE
                        GLOBAL MinMASS#                         = 1000000.0                     // RANDOM PLANET MASS MIN START SIZE
                        GLOBAL VECTORADD#                       = 0.0                           // addition to SPACEWAVEFORM% angle of fall at initialization, 0 = stable, no variationss regardless of SPACEWAVEFORM%,
                        GLOBAL E#                                       = 120.0                         // solar system initial spin speed

Once the system is created and set into motion, its all Master Lord Sir Isaac Newtons Laws of motion in effect.
The algorithms he created and so beautiful, so beautiful they're compatible with computer code.
And to think he designed them 400 years ago without a calculator or computer is mind boggling.

[edit] it also has 3 cams, so far (these so tedious)
1 planet chase cam(not fixed, litteraly chases), 2 star tracking cam, and 3 freemouse cam
Freemouse cam also tracks with star, because it moves sometimes, quickly.

Beta Tests / Re: 3d Space Sim
« on: 2019-Mar-02 »
<3 That is neat! Would it work better if the planet shading was more "hard", like a cartoon shade?
Looks awesome and I bet even better while moving about. :)
not sure, if it would or not?

heres a close up on the planets moving..
the ones on fire recently absorbed smaller things
the ones with trails (in this scene) are the smallest and original objects flying around, they take on color when they combine with something smaller, and lose the tails.

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Mar-01 »
Code: GLBasic [Select]
*** Configuration: WIN32 ***
GPC - GLBasic Precompiler V.14.721 SN:a3f75373 - 3D, NET
Wordcount:3007 commands

*** Finished ***
Elapsed: 16.1 sec. Time: 19:37
Build: 1 succeeded.

Start debug session.
DECLARE entry not found: GetPointerTouchInfo
DECLARE entry not found: EnableMouseInPointer
Injection started

I just noticed this in v15 debug mode output during compile.

Beta Tests / Re: 3d Space Sim
« on: 2019-Mar-01 »
collisions with beautiful slow motion explosions too???   ;/

fine ok, as you wish. And how about comets and trails that push away from stars?
How about this lighting from the star to the planets?
These objects all share the same object, they are coloured by another light from the cam position.

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Mar-01 »
Too bad  :(
With my solution, I totally solved my problem, even if yours is not quite the same, try anyway because I don't think it's a GLB bug, I think is one of the reasons why there is always an option in a 3D game to control the sensitivity of the mouse  ;)

How do you control a failure in output?
Im willing to try anything, but im pretty sure its a bug in glb, it has something to do with the internal timers somehow.

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Feb-28 »
  :D Indeed, it's a very big problem for the player

Indeed it is....players will uninstall (i would)  :giveup:

Glad you're found a solution and good luck on your project, Hemlos  :good:

The solution is more like a workaround.
I did notice some more glitching after testing this workaround for several hours.
The failure still exists, just... not as bad though.

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Feb-23 »
imagine flying around space in a space ship and your only control, the mouse, stops responding as you are flying into an asteroid field.
asteroid dinner my friend

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Feb-22 »
Instead of SLEEP

Using a timer variable that uses gettimerall() millseconds value to allow you to skip mousechecking on every loop.

i use timers for all kinds of stuff
only sleep does the fix

Bug Reports / Re: MOUSEAXIS fails
« on: 2019-Feb-21 »
Try not to multiply the speed of the mouse_velocity by a delta time but with a mouse_speed variable that the player of your game will be able to modify in the options.
without sleep its breaking the raw output. sleep 1 does the trick.
furthermore, with sleep 1, you can use a delta time no prob
Code: GLBasic [Select]
                sleep 1
                self.M2X%       = MOUSEAXIS(0)  // raw x
                self.M2Y%       = MOUSEAXIS(1)  // raw y
                self.M2W%       = MOUSEAXIS(2)  // wheel +/- raw
                self.M2B1%      = MOUSEAXIS(3)  // button 1 raw
                self.M2B2%      = MOUSEAXIS(4)  // button 2 raw
                self.M2B3%      = MOUSEAXIS(5)  // button 3 raw
                MOUSESTATE self.M1X, self.M1Y, self.M1B1, self.M1B2 // this is for 2d mouse position & button clicks

ye, sounds like an array crash

Pages: [1] 2 3 ... 106