The MASM Forum

Projects => Game Development => Topic started by: avcaballero on May 01, 2018, 05:49:40 AM

Title: Caballero's drawer
Post by: avcaballero on May 01, 2018, 05:49:40 AM
 :biggrin: Just a place where to left things that I'm checking if anyone want to prove it from time to time. This time flying around between two claustrophobic planes.
Title: Re: Caballero's drawer
Post by: Siekmanski on May 01, 2018, 06:52:23 AM
 8)
Title: Re: Caballero's drawer
Post by: daydreamer on May 02, 2018, 03:23:09 AM
nice :t
Title: Re: Caballero's drawer
Post by: avcaballero on May 04, 2018, 09:18:28 PM
All the merit for Lode Vandevenne. This raycaster may be reduce in size dramatically creating textures on the fly, just time for that ;)

Edited: I haven't said it, but you can move with the cursor keys :bgrin:
Title: Re: Caballero's drawer
Post by: Siekmanski on May 04, 2018, 11:12:36 PM
 :t
Title: Re: Caballero's drawer
Post by: HSE on May 05, 2018, 01:23:19 AM
A total disaster: I can't find the weapons, fortunately no enemies!  :biggrin:
Title: Re: Caballero's drawer
Post by: avcaballero on May 05, 2018, 03:28:55 AM
he he, next time it will not be so easy, foreigner :biggrin:.
Title: Re: Caballero's drawer
Post by: avcaballero on May 06, 2018, 03:16:17 AM
Brick walls and grass floor generated on the fly. This last one can be improved, but the bricks walls are neat, I think. I can make more type of textures on the fly. In any case the file size uncompressed is 62kb uncompressed and before now was 380 Kb, with the same tune in the background. Quite size save. :bgrin:

Edited:
1. Added another texture that pretended to be a heat metal grid for the walls
2. Substituted the ceiling by a cloudy sky.
3. I could make more textures on the fly but don't know if it worths
Title: Re: Caballero's drawer
Post by: zedd151 on May 06, 2018, 07:35:24 AM
--> Brick walls and grass floor generated on the fly

reminds me of Wolfenstein Castle.  :lol:
Title: Re: Caballero's drawer
Post by: daydreamer on May 06, 2018, 05:44:59 PM
looks great,textures on the fly is what makes it look great independent of distance with no need for a mip/map solution?or you use mipmap too?
usual problem with using only one wall bitmap is it doesnt look good at distance
Title: Re: Caballero's drawer
Post by: avcaballero on May 06, 2018, 06:36:49 PM
No mipmap involved here, it's just that the textures are bigger than before
Title: Re: Caballero's drawer
Post by: LordAdef on May 08, 2018, 04:01:29 PM
Great Stuff Caballero! is there a tuto coming?
Title: Re: Caballero's drawer
Post by: avcaballero on May 09, 2018, 03:56:31 AM
Thank you, Alex

I think I could make a new chapter if at least you are interested on it. Though I need time for that, family, job, my own time, time for my own learning. You know, few free time.
Title: Re: Caballero's drawer
Post by: avcaballero on June 03, 2018, 06:01:42 AM
My flag, a sine wave example
Title: Re: Caballero's drawer
Post by: felipe on June 03, 2018, 11:30:40 AM
That's a nice serpentine flag  :icon14:. Btw is this some kind of preparation program to support Spain in Russia world cup  :biggrin:?
Title: Re: Caballero's drawer
Post by: avcaballero on June 03, 2018, 05:55:14 PM
No need, the competition is ours :lol:

The flag effect is a nice exercise, easier to say than to do
Title: Re: Caballero's drawer
Post by: Siekmanski on June 03, 2018, 06:42:38 PM
Quote from: caballero on June 03, 2018, 05:55:14 PM
The flag effect is a nice exercise, easier to say than to do

It depends on the algorithm you're using, it can be done with 64 to 128 pre calculated values. ( depending on the animation speed )

What is your algorithm?
Title: Re: Caballero's drawer
Post by: avcaballero on June 03, 2018, 07:20:44 PM
You have to define the points in the flag that have to be waved, and the tone of color according to it.

Which algorithm do you use?
Title: Re: Caballero's drawer
Post by: Siekmanski on June 03, 2018, 08:07:25 PM
1 - Create a coordinate grid for the flag including the colors
2 - Create a sine table ( X,Y ) for a full rotation with the radius and steps you need for one coordinate. ( power of 2 size )

3 - Now step with linear interpolation thru the sine table and increase the X,Y coordinate added with the new X,Y sine position.
    X starts at 0 degrees.
    Y starts at 90 degrees.
    Each next horizontal coordinate is one step further in the sine table.

    ( You can also use the sine values to add some shadow to the colors )

To speed things up, you only have to calculate the left horizontal half of the flag because, it is one full X,Y rotation.
You can copy the coords and colors to the right half of the flag by only updating the X coords.
Title: Re: Caballero's drawer
Post by: avcaballero on June 03, 2018, 08:49:37 PM
I'd like to see your example, let's see that red/white/blue waving flag  :t
Title: Re: Caballero's drawer
Post by: Siekmanski on June 03, 2018, 09:15:35 PM
 :t
Next week, can't find the sources.
I'll have to make a new one.
Title: Re: Caballero's drawer
Post by: avcaballero on June 03, 2018, 09:53:04 PM
Ok, I'll be here :t

I'm trying to do the filling of regions for the quadrilaterals
Title: Re: Caballero's drawer
Post by: avcaballero on June 04, 2018, 02:27:24 AM
Flat color for the flag. Still appears some nasty black points that have to removed... someday

No acelerated graphic card involved here and no predefined function, just the all by hand  :biggrin:
Title: Re: Caballero's drawer
Post by: felipe on June 04, 2018, 02:42:31 AM
They are not nasty, if they were more shiny, they will look as the reflexion from the sun light or something like that.  :icon14:
Btw, this flag seems to say GOOOOAAAALLLL!!!!!!  :icon_mrgreen:
Title: Re: Caballero's drawer
Post by: daydreamer on June 04, 2018, 03:15:24 AM
really nice flag :t
I had same problem with black pixel when floormapping,either you start filling the first pixel or last filling end pixel doesnt work properly

Title: Re: Caballero's drawer
Post by: Siekmanski on June 04, 2018, 04:58:19 AM
 :t

And some shadow, from the sine table?
Title: Re: Caballero's drawer
Post by: avcaballero on June 05, 2018, 04:00:40 AM
Yes, a palette according to the sine wave
Title: Re: Caballero's drawer
Post by: daydreamer on June 05, 2018, 06:02:48 PM
I wish i had time to finish my version of flag,for my swedish national day 6th june :(
Title: Re: Caballero's drawer
Post by: zedd151 on June 05, 2018, 06:25:20 PM
Quote from: daydreamer on June 05, 2018, 06:02:48 PM
I wish i had time to finish my version of flag,for my swedish national day 6th june :(

Better start cracking, you don't have much time left.   :P
Title: Re: Caballero's drawer
Post by: avcaballero on June 17, 2018, 05:00:12 AM
Hello.

This version is similar to the previous one, except that this one makes an animated gif file in the same folder than the executable with the waving flag. All made with the all-made-by-hand GDI. The interesting of this one is just this: all made by hand.

When I have time I'd like to do:
- Allow to design your own flag, that also could be dumped to an animated gif.
- Improved the painting algorithm to remove the black points
Title: Re: Caballero's drawer
Post by: zedd151 on June 17, 2018, 05:08:03 AM
screenshot from ubuntu, exe ran in wine.   :biggrin:
Title: Re: Caballero's drawer
Post by: avcaballero on June 17, 2018, 05:14:26 AM
Aha, it looks fine :biggrin:

I hope to have in a short time a version to be able to design your own flag on the fly.

So finally you opted for Ubuntu. I installed my son in his laptop bodhi linux (https://www.bodhilinux.com/), quite light and pretty.
Title: Re: Caballero's drawer
Post by: zedd151 on June 17, 2018, 05:16:03 AM
Quote from: caballero

So finally you opted for Ubuntu.

nah, just running from live cd, checking it out (ubuntu that is)

to keep ON topic, exe ran fine ubuntu 12.04.   :bgrin:
Title: Re: Caballero's drawer
Post by: avcaballero on June 24, 2018, 07:19:17 PM
Two 3d shapes, a cube and a sphere. You can leave from the planet clicking on it and pressing ESC. You can move the planed dragging it with the left button of the mouse.

A very talented techno spanish group. Aldus haza (https://youtu.be/dbc1ollRt_E). I didn't know they were spanish till now. I liked them since ever :t
Title: Re: Caballero's drawer
Post by: Siekmanski on June 24, 2018, 08:34:51 PM
Hi Alfonso,

Nice stuff.
We discussed the flag routine, I'm still working on it. ( sorry for the delay )
It will all be done in 2D mode, so no fancy 3D stuff.
Hope to show it soon to you, first finishing my other project ( fast SIMD Matrix transposition building blocks )
Here's a pre release, I still have to finish the shadow and the XY movement code for the final result.
Title: Re: Caballero's drawer
Post by: avcaballero on June 24, 2018, 09:28:36 PM
Hi Marinus

You're welcome. It would be nice to see it when you have finished it  :t, take your time. I'm working now on making a window to design any flag on the fly and save if in a gif. After that I'd like to improve the routines.
Title: Re: Caballero's drawer
Post by: daydreamer on June 24, 2018, 10:06:24 PM
wow Caballero,I wonder how did you do it,so it behaved cool strangely on my xp computer?I clicked on 'x' on window and window+black background disappeared and a rotating 3dsphere was still on my desktop,but everything around it was transparent,I was able to switch to other windows also and when I wanted to close it I clicked on the sphere and esc

very nice flag Siekmanski
SIMD matrix blocks?,sounds very interesting
now when being busy with working with graphics,I see a need of support group hierarchy when you need to use complex 3d objects in a game or demo
does that need some recursion algo to go from highest group 3dtransforms to go down to tiny details,to lots of very tiny parts of objects when it explodes
Title: Re: Caballero's drawer
Post by: Siekmanski on June 24, 2018, 11:22:56 PM
Can't wait to see your new flag design.  :t

My routine is divided in 2 ways to draw the flags.
1. simple 3 color flags need only 3 pixels in memory.
2. advanced flags will be loaded as color/size reduced png or jpg images and are as small as possible without losing too much detail.

@ daydreamer
Yeah, the pieces flying around due to the explosion need their own world transform matrix per object.

The SIMD matrices are in different small row and column sizes so we can build a very large Matrix Transpose algorithm for all sizes.
I'll post an example routine to time the matrices soon to see how fast the small blocks will be on different computers.
It reminds me of building with LEGO blocks when I was a little kid.  :biggrin:
Title: Re: Caballero's drawer
Post by: avcaballero on June 29, 2018, 06:02:35 AM
Hello, not finished yet. Here is where I am for now
Title: Re: Caballero's drawer
Post by: zedd151 on June 29, 2018, 01:02:36 PM
Doh!!!

I downloaded the .png image.   :shock:

That's what I get for clicking before reading. I can't wait to see how your little program works.  :t
Title: Re: Caballero's drawer
Post by: Caché GB on June 29, 2018, 02:19:20 PM
Hi zedd151.
That's an ID-10T Error. I've made a few myself.
Title: Re: Caballero's drawer
Post by: aw27 on June 29, 2018, 07:55:42 PM
Quote from: zedd151 on June 29, 2018, 01:02:36 PM
Doh!!!

I downloaded the .png image.   :shock:

That's what I get for clicking before reading.

Yeap, always "Abre Los Ojos"  (http://www.abreojosensamblador.net/), would say Caballero.  :badgrin:
Title: Re: Caballero's drawer
Post by: zedd151 on June 29, 2018, 10:13:48 PM
Quote from: AW on June 29, 2018, 07:55:42 PM
Abre Los Ojos, would say Caballero.  :badgrin:

Otherwise, Open your friggin' eyes.   :P

Title: Re: Caballero's drawer
Post by: avcaballero on June 30, 2018, 10:21:01 PM
Hello, this is a prerelease :t
Title: Re: Caballero's drawer
Post by: zedd151 on July 01, 2018, 12:40:38 AM
The interface looks okay, but I think it would be easier to use if the user didn't have to click on each 'pixel'. While the left mouse button is down, couldn't we just continue to the next 'pixel' (using the same color) without having to click each individual 'pixel'?

Just a thought. Also it would be very hard to make a remblence to the US flag. See my new avatar, I put it up just for this post.   8)

I don't expect you to rewrite your code to my specifications, but just to let you know that one size may not fit all.  But I do like the idea of an automated designer.   :t
Title: Re: Caballero's drawer
Post by: avcaballero on July 01, 2018, 01:05:49 AM
Yes, it wouldn't be easy to make the us flag, it would be needed more points. With this only an approximation.  I would like to make a more advanced version later. This version is more simplistic.

Edited: Now you can draw holding down the left button of your mouse
Title: Re: Caballero's drawer
Post by: zedd151 on July 01, 2018, 05:15:14 AM
Quote from: caballero on July 01, 2018, 01:05:49 AM

Edited: Now you can draw holding down the left button of your mouse

:t   Thats much better. Now if I could draw a straight line, I'd be goin' places.   :badgrin:

As for the flag,   The one I tried looked about like that.   :P   

 
As for the US flag design, They never imagined someone would try too recreate it one pixel at a time.  :icon_rolleyes: :shock:


Quote
This version is more simplistic.

Simple can be good sometime.


Hmmm, no comments on my pixel-flag avatar?    :icon_confused: ;) :shock:      :icon_mrgreen:
Title: Re: Caballero's drawer
Post by: avcaballero on July 01, 2018, 07:50:47 PM
Ah, I didn't see it. Did you make it with any icon graph tool?
Title: Re: Caballero's drawer
Post by: daydreamer on July 01, 2018, 09:28:20 PM
It doesnt save the flag
Title: Re: Caballero's drawer
Post by: avcaballero on July 01, 2018, 09:43:07 PM
Yes, it is not finished. When it is, you will see the waving flag of Spain and pressing the "1" key, you will access to the flag design window, if you accept, the waving flag will be what you have designed. If you checked the "save to gif", it will generate your waving flag in an animated gif with the name that you write in the edit box.
Title: Re: Caballero's drawer
Post by: zedd151 on July 01, 2018, 10:22:41 PM
Quote from: caballero on July 01, 2018, 07:50:47 PM
Ah, I didn't see it. Did you make it with any icon graph tool?

Nope. Built from the ground up, pixel by pixel.   :biggrin:   Using MS Paint fron Windows xp.   :bgrin:

I now have I think the smallest possible flag that still bears resemblence to the original. The larger one was to distracting.

The original idea came to me when I was on another forum years ago and needed an avatar. Many of the members there
had a flag to represent where they are located, or were born. So that is when I made my first pixel flag.

When I saw yor flag designer GUI, it remnded me of the old days.
Title: Re: Caballero's drawer
Post by: daydreamer on July 01, 2018, 11:43:18 PM
Quote from: caballero on July 01, 2018, 09:43:07 PM
Yes, it is not finished. When it is, you will see the waving flag of Spain and pressing the "1" key, you will access to the flag design window, if you accept, the waving flag will be what you have designed. If you checked the "save to gif", it will generate your waving flag in an animated gif with the name that you write in the edit box.
looking forward to it,I already tried make several flags
it would actually be nice to have background from your masm32 Clock as flag,would be an excellent avatar here
Title: Re: Caballero's drawer
Post by: avcaballero on July 02, 2018, 04:54:07 AM
Which one of the clock? Something like El paso del tiempo (http://www.cidadedacultura.gal/sites/default/files/styles/989x421/public/multimedia/headers/2014/09/salvador_dali_los_relojes_.jpg?itok=rV1Ed4sI) by Salvador Dalí?

Well, this is a beta version, there are still some mistakes, but it admits your flag design and saves it as a waving flag in an animated gif.

Main known bugs:
- Always saves the gif
- Always with the name of "spain.gif"
- The background is always black

Please, let me know if you have done some nice designs

:eusa_boohoo:Fisher in trance (https://www.youtube.com/watch?v=zyeDZHgqs7A)

This snapshot takes 100kb, if it's a problem tell me and I will remove it

Title: Re: Caballero's drawer
Post by: zedd151 on July 02, 2018, 07:40:36 AM
Quote from: caballero
Well, this is a beta version, there are still some mistakes, but it admits your flag design and saves it as a waving flag in an animated gif.

Where? All I find in that post is the gif player exe waving the flag of spain.

attcached:
The US flag you have made comes just in time for the 4th of July, Independence Day here in The US.    :t   
Be sure to wave that flag once or twice on July 4th.  :P
Title: Re: Caballero's drawer
Post by: jj2007 on July 02, 2018, 08:06:38 AM
That's cute :t

Can you now do the same with the Russian and Chinese flags? Please, not the German one, most Germans feel embarrassed to see their flag, it reminds them where nationalism will eventually end.
Title: Re: Caballero's drawer
Post by: Siekmanski on July 02, 2018, 04:47:18 PM
Very nice, like the idea to save it as an animated gif.  :t
Title: Re: Caballero's drawer
Post by: zedd151 on July 02, 2018, 07:18:35 PM
Quote from: zedd151 on July 02, 2018, 07:40:36 AM

Where? All I find in that post is the gif player exe waving the flag of spain.

I don't know hhow, but somehow I missed the .gif file that was created by the viewer. Today I had another look at it after seeing Siekmanski and jj2007's replies.   :icon_rolleyes:

Also, I had forgotten that I had animations turned off in IE.  :icon_confused:

So forgive any misunderstandings.   :biggrin:

brain freeze
Title: Re: Caballero's drawer
Post by: zedd151 on July 04, 2018, 01:17:12 AM
Not to be overly critical, but the flag waves in the wrong direction.  The pole would be on the left and the wave should travel to the right. (at least on the American flag - other countries flags may not have a left or right side, but for the US flag - the star field is always on the side of the pole or other mounting - and is displayed usually with the star field on the left hand side)
Title: Re: Caballero's drawer
Post by: avcaballero on July 04, 2018, 02:42:34 AM
You demand a lot, for what you pay :greensml:

I've just fixed the main know bugs in this version

Edited: I've just cleaned the annoying black points on the flag.
Title: Re: Caballero's drawer
Post by: zedd151 on July 04, 2018, 04:24:39 AM
Quote from: caballero on July 04, 2018, 02:42:34 AM
You demand a lot, for what you pay :greensml:


:badgrin:


Your waving US flag looks great.  :t




:biggrin:  The check is in the Mail.
Title: Re: Caballero's drawer
Post by: avcaballero on July 04, 2018, 04:34:56 AM
Nah, I think you are right. Have a drink in my name! :t
Title: Re: Caballero's drawer
Post by: avcaballero on July 08, 2018, 09:03:50 PM
I've just cleaned the unwanted black points
(http://abreojosensamblador.x10host.com/unicorn.gif)
Title: Re: Caballero's drawer
Post by: avcaballero on July 24, 2018, 09:09:41 PM
I have stolen the Windows fonts to make my own 3d logo. Work still win progress.
Title: Re: Caballero's drawer
Post by: HSE on July 24, 2018, 09:18:02 PM
Quote from: caballero on July 24, 2018, 09:09:41 PM
Work still win progress.
Look very interesting :t (the idea, because with that crazy rotation I can see what say :biggrin:)
Title: Re: Caballero's drawer
Post by: Siekmanski on July 24, 2018, 09:20:32 PM
Looks like the old Amiga vector-ball fonts.  :t
Title: Re: Caballero's drawer
Post by: avcaballero on July 24, 2018, 09:29:42 PM
> I can see what say
It says "caballero" but some points are missed for now
Title: Re: Caballero's drawer
Post by: zedd151 on July 25, 2018, 02:52:48 AM
Quote from: caballero on July 24, 2018, 09:29:42 PM
It says "caballero"

In what language?  :badgrin:

just kidding, it's a start. Looks good.   :t
Title: Re: Caballero's drawer
Post by: avcaballero on July 25, 2018, 06:16:00 AM
Now the text is fulfilled, though not finished yet
Title: Re: Caballero's drawer
Post by: HSE on July 25, 2018, 06:34:30 AM
 :t
Title: Re: Caballero's drawer
Post by: zedd151 on July 25, 2018, 07:03:38 AM
ah.... there we go!

much better.   :t
Title: Re: Caballero's drawer
Post by: avcaballero on July 27, 2018, 08:33:11 PM
Enhanced versión, good enough. Three types of visualización.

- key 1 (default). 3d logo, darker as deeper.
- key 2. Illuminating effect.
- key 3. The same with a nice background that has to be made in a few seconds.

You can change from any choice to another. And a tune.
Title: Re: Caballero's drawer
Post by: Siekmanski on July 27, 2018, 08:59:58 PM
 :t :t
Title: Re: Caballero's drawer
Post by: HSE on July 27, 2018, 10:52:17 PM
 :t  Yes... we know.
          You can't do that without a tune  :biggrin:
Title: Re: Caballero's drawer
Post by: avcaballero on July 28, 2018, 02:07:03 AM
 :biggrin:  :t
Title: Re: Caballero's drawer
Post by: avcaballero on July 31, 2018, 12:36:42 AM
Mars lander with some interferences yet, v1
Title: Re: Caballero's drawer
Post by: daydreamer on July 31, 2018, 03:11:59 AM
nice work caballero :t
Title: Re: Caballero's drawer
Post by: avcaballero on August 03, 2018, 03:21:31 AM
This bulls**t is taking me talking to myself for a while, you see, it's a work in progress. No acelerated graphic card used, no opengl or directx, only gdi. If anyone want to test it and tell me, here it goes:

- You must unzip the three files in the same folder to execute it.
- Turn on the speakers and loud them, it worths.
- Some nice toys as lambert and environment mapping, etc.
- The best is that you can move freely the camera:
  * E: move forward +Z
  * D: move backward -Z
  * A: move up +Y
  * Z: move down -Y
  * Q: move to the left -X
  * W: move to the right +X
  * X: rotate to the left in the XZ plane
  * C: rotate to the right in the XZ plane
  * R: rotate up in the plane YZ
  * F: rotate down in the plane YZ
  * T: rotate to the left in the plane XY
  * Y: rotate to the right in the plane XY
 
Known bugs and todo list:
- I have to incorporate also this two files to the resource.
+ I have to incorporate the mouse and the cursor keys to move the camera (already done).
+ It increases the memory usage continuously, I have to fix it. Take care of it, nothing serious though, but don't take the program running for hours Already fixed :biggrin:.

Edited: In this version I have incorporated the mouse and the cursor keys. Same as the previous one, but with the mouse you can rotate left/right/up/down. With the left/right mouse button it will rotate left/right. Use the cursor buttons to move left/right/up/down. I have fixed the memory increasing too.
Title: Re: Caballero's drawer
Post by: HSE on August 03, 2018, 05:11:30 AM
Very interesting  :t
Title: Re: Caballero's drawer
Post by: Siekmanski on August 03, 2018, 10:07:19 AM
Nice, I like the colors of the Spherical Environment Mapping object very much.  8)
Title: Re: Caballero's drawer
Post by: daydreamer on August 04, 2018, 02:54:36 AM
looks great,nice Music
Title: Re: Caballero's drawer
Post by: avcaballero on August 04, 2018, 06:17:01 PM
Here is the version with the built-in mouse. Same as the previous one, but with the mouse you can rotate left/right/up/down. With the left/right mouse button it will rotate left/right. Use the cursor buttons to move left/right/up/down.

I have fixed the continuously memory increasing.
It will move according to how fast the mouse moves, so don't be rough. :biggrin:

I left it in the first post so as not to occupy unnecessary space.
Title: Re: Caballero's drawer
Post by: avcaballero on September 30, 2018, 09:41:48 PM
Another proof with stars
Title: Re: Caballero's drawer
Post by: HSE on October 01, 2018, 07:15:46 AM
Nice  :t
Title: Re: Caballero's drawer
Post by: Siekmanski on October 01, 2018, 07:28:19 AM
Cool effect.
Which random routine did you use?
Title: Re: Caballero's drawer
Post by: FORTRANS on October 02, 2018, 01:06:54 AM
Hi,

   It ran on Windows 2000.  It ran faster on Windows XP.  The
near-field stars had some jitter or rough movement.  Overall
very nice though.

   It did not run on Windows 98, it raised an exception.

Regards,

Steve N.
Title: Re: Caballero's drawer
Post by: avcaballero on October 02, 2018, 04:26:16 AM
Hello

@Marinus. The random function is the c standard, but only used at the definition of the cube of stars. The motion is just rotating and translating the objects.

@Steve. Thank you for testing. I think that the jitter is due to the speed to the rotation of the stars, more evident as closer to the camera, unless I am using at some point integers instead of floats. I wonder if the error raised in the W98 is due to the mod player. I attach a version without this player, if you could test it again in W98 and tell me how it worked. Thank you.
Title: Re: Caballero's drawer
Post by: FORTRANS on October 02, 2018, 05:19:21 AM
Hi,

   Yes, that one runs on Win98.  Runs slower, obviously, but it
seemed smoother as well.  I got to notice some larger stars
that went by too quickly on the faster systems.  On exit it
throws an error.

This program has performed an illegal operation
and will be shut down.

ESTRELLA caused a stack fault in KERNEL32.DLL at
015f:bff742a3

{Corresponds to CS:EIP}

SS=0167
ESP=0094207c


HTH,

Steve N.
Title: Re: Caballero's drawer
Post by: avcaballero on October 28, 2018, 06:10:55 AM
Hello, a tiny 3d bouncing ball
Title: Re: Caballero's drawer
Post by: HSE on October 28, 2018, 06:24:09 AM
 :t

Can you draw the walls that constrain the ball? 
Title: Re: Caballero's drawer
Post by: Siekmanski on October 28, 2018, 01:21:22 PM
Cool.  8)
Title: Re: Caballero's drawer
Post by: avcaballero on October 29, 2018, 12:09:42 AM
Thanks for watching :t.  Héctor, not for now, I'm trying to do some bouncing balls with gravity 8)
Title: Re: Caballero's drawer
Post by: avcaballero on October 29, 2018, 01:00:20 AM
This is a preview of the bouncing ball with gravity demo. Now I'm going to watch a chapter of Elementary :t
Title: Re: Caballero's drawer
Post by: avcaballero on October 29, 2018, 06:19:18 AM
Here is the "final" version. For some reasong I cannot manage to put more than 7 spheres at the same time, I must review it if I have time. There are another things to improve also. In my W7 runs smoth and without penalty the system.

Till next time :t

Just forgot: Incanto d'amore (https://www.youtube.com/watch?v=6DMbKVfu_bQ) :eusa_boohoo: :t
Title: Re: Caballero's drawer
Post by: daydreamer on October 29, 2018, 06:42:12 AM
Great caballero,now I got tempted to try with lodes examples,if someone have the address,if anything should be worth trying on very inferior hardware it should be that kind of very fast old-school tutorials
Title: Re: Caballero's drawer
Post by: HSE on October 29, 2018, 07:02:54 AM
Small problem... balls are not reflecting others balls  :biggrin: :biggrin:

:t
Title: Re: Caballero's drawer
Post by: avcaballero on October 29, 2018, 07:07:21 AM
@daydreamer
Well, lode's site (https://lodev.org/cgtutor/) is a great site to learn graphics programming. If you already can program graphics in vga, Windows GDI is a fast way to move to Windows graphics. Good luck :t

@HSE
Yes :bgrin: Not perfect
Title: Re: Caballero's drawer
Post by: avcaballero on April 13, 2019, 07:19:26 AM
Hello, a tunnel effect
Title: Re: Caballero's drawer
Post by: avcaballero on April 15, 2019, 12:22:38 AM
tunnel + dark effect
Title: Re: Caballero's drawer
Post by: Siekmanski on April 15, 2019, 04:26:51 AM
 8)
Title: Re: Caballero's drawer
Post by: jj2007 on April 15, 2019, 04:53:50 AM
 :t
Title: Re: Caballero's drawer
Post by: avcaballero on April 15, 2019, 05:07:49 AM
Hello, guys

Free direction tunnel with darken shadows
Title: Re: Caballero's drawer
Post by: daydreamer on April 17, 2019, 12:50:41 AM
great :t
Title: Re: Caballero's drawer
Post by: avcaballero on April 18, 2019, 11:52:48 PM
Tunnel with tiny c source code. EDITED: removed the "green" ghosts

(https://images2.imgbox.com/91/28/POLhfke6_o.png)
Title: Re: Caballero's drawer
Post by: HSE on April 19, 2019, 01:05:12 AM
 :t

Some green triangles appear from time to time.
Title: Re: Caballero's drawer
Post by: daydreamer on April 19, 2019, 04:01:47 AM
Quote from: caballero on April 18, 2019, 11:52:48 PM
Tunnel with tiny c source code

(https://images2.imgbox.com/91/28/POLhfke6_o.png)
:t
love the colors,they remind me of the Tron movies
Title: Re: Caballero's drawer
Post by: avcaballero on April 19, 2019, 04:11:04 AM
@HSE: Check it out now :t
Title: Re: Caballero's drawer
Post by: avcaballero on April 29, 2019, 05:20:53 AM
A first approximation to a dynamic curved tunnel (the position of the center of the tunnel is not static). A high cpu requirements. Only gdi.
Title: Re: Caballero's drawer
Post by: daydreamer on May 01, 2019, 12:03:44 AM
Quote from: caballero on April 29, 2019, 05:20:53 AM
A first approximation to a dynamic curved tunnel (the position of the center of the tunnel is not static). A high cpu requirements. Only gdi.
slow initializing and after that cool turning tunnel :icon14:
Title: Re: Caballero's drawer
Post by: Siekmanski on May 01, 2019, 04:45:26 AM
Very cool effect.  8)
Title: Re: Caballero's drawer
Post by: jj2007 on May 01, 2019, 05:06:42 AM
Cool indeed :t
Title: Re: Caballero's drawer
Post by: avcaballero on August 08, 2019, 11:32:11 PM
Hello, I've just installed masm32 package in my new computer zipping/unzipping my older instalation in W7. It works fine, even as I have installed it not in the root directory, but in a folder. The sound emits from time to time some interferences that I think in W7 worked just fine. I'll have to see it.

Edited: I've just checked it in WXP in my virtual box and it just works fine, it plays the tune smooth and fine. It seems that W10 brings me surprises and fun
Title: Re: Caballero's drawer
Post by: daydreamer on August 09, 2019, 02:16:47 AM
Quote from: caballero on August 08, 2019, 11:32:11 PM
Hello, I've just installed masm32 package in my new computer zipping/unzipping my older instalation in W7. It works fine, even as I have installed it not in the root directory, but in a folder. The sound emits from time to time some interferences that I think in W7 worked just fine. I'll have to see it.

Edited: I've just checked it in WXP in my virtual box and it just works fine, it plays the tune smooth and fine. It seems that W10 brings me surprises and fun
nice plasma,but as you say annoying noise sometimes on W10
Title: Re: Caballero's drawer
Post by: avcaballero on August 09, 2019, 08:43:22 PM
I'd say that the problem is in the ufmod libraries
Title: Re: Caballero's drawer
Post by: avcaballero on November 23, 2019, 11:15:14 AM
Fixed point vs Float Point. This is a final example with palette :thumbsup:
Title: Re: Caballero's drawer
Post by: Siekmanski on November 23, 2019, 10:43:07 PM
Smooth  :thumbsup:
Did you use 16:16 fixed point?
Title: Re: Caballero's drawer
Post by: avcaballero on November 24, 2019, 12:21:57 AM
Hi, Marinus, I have scaled by 2^16, nevertheless, it is so smooth due to the palette usage, though the fixed point seems to be better than float point. I will upload the samples in my fifth chapter.
Title: Re: Caballero's drawer
Post by: Siekmanski on November 24, 2019, 10:03:26 AM
Fixed point arithmetic is very useful if you want to prevent rounding and drifting errors, e.a. in audio re-sampling.
Title: Re: Caballero's drawer
Post by: daydreamer on January 23, 2020, 11:06:02 PM
Quote from: caballero on April 29, 2019, 05:20:53 AM
A first approximation to a dynamic curved tunnel (the position of the center of the tunnel is not static). A high cpu requirements. Only gdi.
this seem best candidate to test with dual threaded,second thread draws simpler demo while calculating this one
Title: Re: Caballero's drawer
Post by: avcaballero on November 20, 2020, 06:12:58 AM
Looking around, I have found this program that I did several years ago. Play wav, mp3 or other format music, also movies, with a time slide bar and a volume control. It also has a graphic equalizer that can be seen if you have an open sound input. Just 13 kb.
Title: DynSky in a Torus
Post by: avcaballero on November 29, 2020, 11:03:02 PM
Looking at some old code, I have slightly modified this torus to give the clouds movement in the torus. With a light background music.
Title: ODBC DB Accessing example
Post by: avcaballero on December 26, 2020, 01:05:00 AM
Hello, this days I'm doing some examples on ODBC accesing to db, access and oracle. I have already had success, and now I am rewriting the code to polish it.

The mdb accessing has this look:

>fasm_access
mdb ODBC connection successful
KING    PRESIDENT
BLAKE   MANAGER
CLARK   MANAGER
JONES   MANAGER
FORD    ANALYST
SMITH   CLERK
ALLEN   SALESMAN
WARD    SALESMAN
MARTIN  SALESMAN
TURNER  SALESMAN
JAMES   CLERK
MILLER  CLERK
Disconnect successful


For it, I have made previously a mdb db with the Oracle alike emp table, whose structure is this:

create table emp( 
  empno    number(4,0), 
  ename    varchar2(10), 
  job      varchar2(9), 
  mgr      number(4,0), 
  hiredate date, 
  sal      number(7,2), 
  comm     number(7,2), 
  deptno   number(2,0), 
  constraint pk_emp primary key (empno), 
  constraint fk_deptno foreign key (deptno) references dept (deptno) 
);


Instead of using Microsoft Access, I have used MDB Viewer Plus, that is a free mdb viewer and editing tool. And I have fed it with some data.

I will rewrite then the oracle example.
Title: Re: Caballero's drawer
Post by: TimoVJL on December 26, 2020, 02:59:18 AM
As i sometimes use oracle SQORA32.dll directly, i needed a modified odbc32.def files.
Title: Re: Caballero's drawer
Post by: avcaballero on December 26, 2020, 04:21:00 AM
Using the code to access mdb, already more structured, the access to oracle gives me an error, but debugging it goes fine  :rolleyes:. Well, not everything was going to be easy.
Title: Re: Caballero's drawer
Post by: avcaballero on December 26, 2020, 05:47:33 AM
You aren't going to believe it  :toothy:  I had fixed some bugs but I have missed an "int 3" in the code to debug it, that's what failed, removed it and everything seems to go right with the Oracle ODBC conn. I have made it in fasm, I'm going to do it also en others compilers.

Well, right, everything is ok now  :thumbsup:

E:\>fasm_oracle
Oracle ODBC connection successful
KING    PRESIDENT
BLAKE   MANAGER
CLARK   MANAGER
JONES   MANAGER
SCOTT   ANALYST
FORD    ANALYST
SMITH   CLERK
ALLEN   SALESMAN
WARD    SALESMAN
MARTIN  SALESMAN
TURNER  SALESMAN
ADAMS   CLERK
JAMES   CLERK
MILLER  CLERK
Disconnect successful

Title: Re: Caballero's drawer
Post by: avcaballero on December 26, 2020, 10:43:57 PM
Playing with windows properties I realized some years ago that it could be possible to exchange the title bar place with the windows button places. Up till W7, in W10 I have realized that is not longer possible. Just a curiosity  :bgrin:

I have this code for masm also and c in mi web page. I attached the fasm version that is what I was looking at now.

** Warning. Hitting any button do something like hiding the taskbar and others, hitting the same button again restores the original form.
Title: Re: Caballero's drawer
Post by: jj2007 on December 26, 2020, 10:48:07 PM
No source?
Title: Re: Caballero's drawer
Post by: avcaballero on December 26, 2020, 10:51:51 PM
The code is just above the image, also in my webpage

http://abreojosensamblador.epizy.com/?Tarea=6&SubTarea=3#Taskbar
Title: Re: Caballero's drawer
Post by: jj2007 on December 26, 2020, 11:55:46 PM
Quote from: caballero on December 26, 2020, 10:51:51 PM
The code is just above the image, also in my webpage

http://abreojosensamblador.epizy.com/?Tarea=6&SubTarea=3#Taskbar

"Masm codigo" gives a 404. The attachment above is a standard windows template, it does not cover your taskbar demo.
Title: Re: Caballero's drawer
Post by: avcaballero on December 27, 2020, 03:35:57 AM
When the page says "error 404" is because it doesn't find the object linked. In this case, it was my fault, I didn't write the "W" in "TaskWM01.asm". The source attached above is complete, you may drag and drop in the fasm editor and compile with F9, that's all, I just missed the "a.ico" file in the zip that is used in the source. Anyway, it should work the link now in my web page.
Title: Re: Caballero's drawer
Post by: avcaballero on December 27, 2020, 03:37:23 AM
I have started (but not completed) the Windows version of Oracle ODBC in fasm.

Title: Re: Caballero's drawer
Post by: TimoVJL on December 27, 2020, 03:51:30 AM
For oracle timestampTO_CHAR(HIREDATE,\'DD.MM.YYYY\') AS HireDateor just cut it shorter ?
Title: Re: Caballero's drawer
Post by: jj2007 on December 27, 2020, 04:54:01 AM
Quote from: caballero on December 26, 2020, 10:43:57 PM
Playing with windows properties I realized some years ago that it could be possible to exchange the title bar place with the windows button places. Up till W7, in W10 I have realized that is not longer possible. Just a curiosity  :bgrin:

Cute :thumbsup:

But are you sure that subtracting WS_EX_APPWINDOW from the current ex style is the correct way?
        wmBoton06:
          cmp       [vbInvertTitle], 0
          jnz       wmBtn06_01
            mov       [vbInvertTitle], 1
            invoke    SetWindowText, [hBtn7], offset szRetaurarTitle
            mov       eax, [hMiWndStyle]
            sub       eax, WS_EX_APPWINDOW
            invoke    SetWindowLong, [hWnd], GWL_EXSTYLE, eax
            jmp       wmFin
          wmBtn06_01:
            mov       [vbInvertTitle], 0
            invoke    SetWindowText, [hBtn7], offset szInvertirTitle
            invoke    SetWindowLong, [hWnd], GWL_EXSTYLE, [hMiWndStyle]
          jmp       wmFin


This works fine:
GuiParas equ "Press Ctrl T", w160, h100, icon Star, b Turquoise
include \masm32\MasmBasic\Res\MbGui.asm
Event Key
  .if VKey==VK_T
xor rv(GetWindowLong, hWnd_, GWL_EXSTYLE), WS_EX_LAYOUTRTL
invoke SetWindowLong, hWnd_, GWL_EXSTYLE, eax
  .endif
GuiEnd
Title: Re: Caballero's drawer
Post by: avcaballero on December 27, 2020, 05:05:54 AM
Hmmm, that's nice, I didn't know WS_EX_LAYOUTRTL = 0x0040 0000h = 100 0000 0000 0000 0000 0000b.  Now it works exchanging places for title bar and W-icons also in W10.  :thumbsup:

The key seems to be in that position of 1.
Title: Re: Caballero's drawer
Post by: avcaballero on December 28, 2020, 07:38:57 AM
One more step done. As you already know, to connect to Oracle via ODBC you need a system DSN connection string, a username and a password. Instead of putting it directly in the code, I have created a combobox that I feed with the connection strings already created in the ODBC data manager and a user box and another for the password. When the "Connect" button is pressed, read from there to establish the connection. Once connected, you can disconnect or extract the data and dump it to the listview. In the Fasm program I was doing, I was stucked retrieving the information from the system DSNs to feed the combobox, so I switched to Masm, where I have been successful. The image you see is from the MASM version.

With this, the basic version of the connection to Oracle would almost be there. what would be left to do:
Implement superclass to be able to navigate between text boxes and buttons using tab.
A basic help system indicating what each thing is


This will be the basis for my final goal, which is to make a program that reads from two access files: acc_old, acc_new, and from an oracle database. The structure of the access files replicates the structure of the oracle database. Inside here are some LONG/BLOB fields that hold some code. The acc_new brings news in this code, while acc_old contains the original that helps us to find what specific novelty it brings and implement it in oracle. With the added difficulty that in Oracle you may have made your own changes to this code. And, furthermore, this code is historicized.

Depending on what comes in acc_new I will search acc_old and oracle and download everything to different folders and text files that contain said texts and thus be able to compare them easier from text files.

I am considering the possibility of also generating a mariadb or sqlite database to save all the recovered data, such as the name of the code, who it depends on, and the start and end date of existence, for each of the environments.

If I don't get bored before, I have here for a long time.
Title: Re: Caballero's drawer
Post by: avcaballero on December 29, 2020, 02:20:51 AM
I would say that this basic project is already finished. Unfortunately it does not seem to be possible to use the help button with the minimize or maximize buttons in the standard title bar.
Title: Re: Caballero's drawer
Post by: TimoVJL on December 29, 2020, 03:13:41 AM
Is it a window or Dialog based application ?
Is IsDialogMessage() used with a Window app ?
Title: Re: Caballero's drawer
Post by: avcaballero on December 29, 2020, 03:35:27 AM
QuoteThe title bar of the window includes a question mark. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.
WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.

https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
Title: Website account suspended
Post by: avcaballero on December 29, 2020, 04:48:19 AM
...
Title: ODBC Access and Oracle
Post by: avcaballero on December 30, 2020, 11:07:50 PM
Hello, here the full fasm source codes for odbc connecting to microsoft access files and Oracle. "db_access.mdb" file also included. The program runs a query from the "emp" table.

First you must connect to the data base, for it you have to provide some data:
  - Access. mdb filepath that you may type in the editext or by using the openfile dialog button. Then click in "connect", if you previously didn't fill the filepath the program tells you and position you in the edittext for it. When you finally connect, the "get data" button will be enabled and you can click on it to get the data from de data base table emp dumped in the list view of the program. You may disconnect when you want and then the "get data" button will be disabled again.
 
  - Oracle. You must fill the DSN choosing it in the combobox, the user and password. Then you will be able to connect to database, otherwise the system indicates you what reamains to provide and put you in the right place for it. When you finally connect to database, the "get data" button will be enable, the same action as in access.
 
You may change the position for every object in the program using tab button.

* Edited: A minor improvement and bugfixed on listview headers.
Title: Re: Caballero's drawer
Post by: avcaballero on January 02, 2021, 08:25:11 AM
I have perfiled the program for my personal project based on the ODBC-conn basic programs that I did some days ago. The name of the mdb loaded (without its path) is added to the groupbox. When the Oracle-conn is achieved, every object in its groupbox is deactivated, except the button to disconnect. I am planning to add a progress bar also above the executing button. It should extract the source codes inside every db to text files, so they would be better examined.
Title: Re: Caballero's drawer
Post by: avcaballero on January 03, 2021, 02:58:54 AM
I'm noticing that SQLExecDirect doesn't allow functions within a sentence. For example, "select format(dt_start, "yyyymmdd")" triggers an error. Has anyone experimented such inconvenient? In the end I don't worring about if, because I can easily do it by hand in asm, but it would easier that the query send me the result. I have tested "select {fn format(dt_start, "yyyymmdd")} as fecha" but doesn't work either.
Title: embedded data base
Post by: avcaballero on January 09, 2021, 12:36:34 AM
For this project I'm thinking on a embedded data base, my first thought was on SQLite, but it is more than 500k dll for such a tiny project, it seems ridiculous. So I searched and found LMMD (https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database), 64K. It seems quite sexy for this project, but I didn't know it, any knowledge out there?

I have three environments:
  - Orig. Main.
  - Prev.
  - Dest.
 
Starting from Orig I want the find what object has changed in Prev and Dest, but also it may be some differences, so I have stablished the next statement:

  - Orig: 1 = 0001b
  - Prev: 2 = 0010b
  - Dest: 4 = 0100b
 
In such a way that, for example, 1 + 2 = 3 = 0011b means that this object is in Orig and Prev environments. And I have to dump all this data to the db I use. This information is usefull to know what object is in which db. Which one has changed, which one has been deleted, which is new, so on.
Title: Re: embedded data base
Post by: HSE on January 09, 2021, 01:29:12 AM
Quote from: caballero on January 09, 2021, 12:36:34 AM
my first thought was on SQLite, but it is more than 500k dll for such a tiny project, it seems ridiculous
Yes. You can use the static library but size is same because is an object, and you can't remove unused functions. Any way is nice  :biggrin:
Title: Star Wars Text alike
Post by: avcaballero on March 23, 2021, 11:35:12 PM
This is my first attempt on doing so, not very well yet
Title: Re: Caballero's drawer
Post by: avcaballero on March 24, 2021, 06:52:36 AM
A bit better now, I think
Title: Rotating Sphere + back face culling
Post by: avcaballero on March 25, 2021, 10:53:03 AM
Rotating Sphere + back face culling
Title: Rotating cube
Post by: avcaballero on March 30, 2021, 10:32:00 PM
Rotating cube
Title: Re: Caballero's drawer
Post by: jj2007 on March 30, 2021, 10:35:32 PM
Source?
Title: 3D Simple Shapes
Post by: avcaballero on April 26, 2021, 01:23:40 AM
WIP - 20Kb

F1: Plane
F2: Cube
F3: Cylinder
F4: Sphere
F5: Torus

1: Wired
2: Wired + back face culling
3: Flat filled
4: Lambert shading
Title: Re: Caballero's drawer
Post by: daydreamer on May 02, 2021, 04:14:27 AM
great :thumbsup:
back face culling also possible with import few hundred polys?
Title: Re: Caballero's drawer
Post by: avcaballero on May 02, 2021, 06:13:54 AM
Of course  :thumbsup:
Title: Re: Caballero's drawer
Post by: avcaballero on May 12, 2021, 06:10:37 AM
I have added the Gouraud shading that is, basically, a color gradient over each triangle. The result is a softer shading. But still with some white streaks that I need to fix.
Title: Re: Caballero's drawer
Post by: avcaballero on June 05, 2021, 11:52:03 PM
Hi, fist attempt on making the Apollonian Gasket
Title: Re: Caballero's drawer
Post by: avcaballero on June 09, 2021, 03:38:00 AM
nearly
Title: Re: Caballero's drawer
Post by: HSE on June 09, 2021, 05:25:08 AM
Hi caballero!!

I was trying to see how you solved z-order in 6.1.9.14. Atractor de Aizawa (http://abreojosensamblador.epizy.com/?Tarea=5&SubTarea=6).But not, you don't solved (yet?).

Regards, HSE
Title: Re: Caballero's drawer
Post by: avcaballero on June 09, 2021, 05:12:02 PM
@HSE. Short memory, sooooo, the truth is in the code

Something strange still remains   :eusa_pray:
Title: Re: Caballero's drawer
Post by: HSE on June 09, 2021, 11:01:36 PM
Quote from: caballero on June 09, 2021, 05:12:02 PM
@HSE. Short memory, sooooo, the truth is in the code

:biggrin: Binary working wrong, little truth in the code is.
Title: Re: Caballero's drawer
Post by: daydreamer on June 10, 2021, 07:48:05 PM
Quote from: HSE on June 09, 2021, 11:01:36 PM
Quote from: caballero on June 09, 2021, 05:12:02 PM
@HSE. Short memory, sooooo, the truth is in the code

:biggrin: Binary working wrong, little truth in the code is.
zbuffer simpler solution?
Title: Re: Caballero's drawer
Post by: HSE on June 10, 2021, 08:40:28 PM
Quote from: daydreamer on June 10, 2021, 07:48:05 PM
zbuffer simpler solution?
That is the solution that fails.
Title: Re: Caballero's drawer
Post by: avcaballero on June 13, 2021, 11:44:18 PM
Ok, now it is correct. The point is that if you set the generating spheres by eye, the algorithm can cause gaps between the following spheres. The generating spheres must be perfectly tangent.
Title: Re: Caballero's drawer
Post by: avcaballero on January 02, 2022, 02:09:21 AM
Raytracing my nick

:eusa_boohoo:  https://www.youtube.com/watch?v=2ULT8J4JBpg

Title: Re: Caballero's drawer
Post by: Siekmanski on January 02, 2022, 07:24:31 AM
 :cool: Cool tune...  :cool:
Title: Re: Caballero's drawer
Post by: avcaballero on March 05, 2022, 08:59:42 AM
Just for fun, 3 types of tunnels