Author Topic: SMFX intro  (Read 2259 times)

0 Members and 1 Guest are viewing this topic.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
SMFX intro
« on: November 29, 2024 »
New remake from SMFX in glorious 800x x600 mode !!
Additional code for the dpi awareness for non-scaling by ttemper, thx mate.
The windowed mode is now moveable and the fullscreen mode is a maximized borderless window.
Also pressing F1 brings up some info.
« Last Edit: November 30, 2024 by KrazyK »
Challenge Trophies Won:

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 7
    • View Profile
Re: SMFX intro
« Reply #1 on: November 30, 2024 »
Additional code for the dpi awareness for non-scaling by ttemper, thx mate.

hehe, np at all :)

i like the background effect. how did you achieve that? sprite cut up on the x axis, zoomed for each level as well as speed changes? or is it a sprite transformed to 'lay' at a calculated angle?

ive been messing around in PB for the last few months (created a prod for a scene group), and have been coding different procedures for scrollers, vertical scroller, text typer, etc as well as how to set up a screen, make it movable (without the top bar), make it resizable (with scale) to fullscreen at the press of a key, enable mouse input, use winapi calls, etc... its certainly a learning experience, but so far so good.

the only thing i lack is math-calculations on how to achieve certain effects. im working on a 2d plane atm, so i can blit text to it then lay it down on a plane (like the starwars vertical scroll effect). unsure how to approach it atm, whether to use mesh/texture or go the math-calc + sprite way. theres many ways to create the desired effect, just need to work out the best approach.

trying to find decent libraries to use (sprite library, window library, etc) are hard to come across, and the ones i do find, are old and need updating (which i havent bothered with yet). and the oldskool libraries and such (OSDM?) are extremely outdated... id like to get my hands on the source so i could update them though.

nice remake prod as per usual krazyk :) keep em coming.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: SMFX intro
« Reply #2 on: November 30, 2024 »
i like the background effect. how did you achieve that? sprite cut up on the x axis, zoomed for each level as well as speed changes? or is it a sprite transformed to 'lay' at a calculated angle?
Well I have to admit I did cheat with this one using several screengrabs but then had to crop,flip and convert them to black and white at runtime.  I tried so many ways to get it to look just like the original but all attempts failed miserably.  I may try again when I have more time.

ive been messing around in PB for the last few months (created a prod for a scene group), and have been coding different procedures for scrollers, vertical scroller, text typer, etc as well as how to set up a screen, make it movable (without the top bar), make it resizable (with scale) to fullscreen at the press of a key, enable mouse input, use winapi calls, etc... its certainly a learning experience, but so far so good.
I did a remake of The Union StarWars demo that has that effect.  It uses a custom transformsprite routine where I draw the scrolltext as an image onto a sprite, slowly move it up then transform the sprite to lie at the correct angle giving the effect of the text moving away.
I've dropped some code in my google drive for ya.

https://www.dbfinteractive.com/forum/index.php?topic=6811.msg84504#msg84504
Challenge Trophies Won:

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 7
    • View Profile
Re: SMFX intro
« Reply #3 on: December 01, 2024 »
I did a remake of The Union StarWars demo that has that effect.  It uses a custom transformsprite routine where I draw the scrolltext as an image onto a sprite, slowly move it up then transform the sprite to lie at the correct angle giving the effect of the text moving away.
I've dropped some code in my google drive for ya.

awesome, thanks. will check it out.

i did find a 'drawing3d.pbi' library amongst all the demo code (from your "The Lost Boys Beatnic Demo Screen (Mindbomb Demo)")... and i was messing with that a lil' bit yesterday, and got some rotating cubes up on screen (albeit flat looking). i'll play some more with the code and see what it does and how it functions (and how fast it is).

ideally im looking basically for a layer/plane/canvas to blit to and then able to transform that to what angle (x,y,z) as i'd like. i have some ideas for prods in mind, just need to find (or work out how) the code for it (im not that great at math calculations).

thx again.

[ EDIT... ]
I noticed that with your window (windowed screen), when you click and drag on the taskbar, the intro (timer) does not pause... what code are you using for this? as my code that ive been using pauses the screen for a split second on lmb click (and hold). normally the window timer pauses, which makes the entire repeat loop pause also (no screen updates). i'd like to hear how you achieved the no-screen-pause upon lmb click + drag. :)

and yes the "HyperTransformSprite" procedure/calculations was pretty much exactly what i was looking for. thanks. :) it works well... i mainly use sprites for canvases anyway (helps keep layering and scaling uniform), so this works out great. thanks.
« Last Edit: December 01, 2024 by ttemper »

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: SMFX intro
« Reply #4 on: December 02, 2024 »
I noticed that with your window (windowed screen), when you click and drag on the taskbar, the intro (timer) does not pause... what code are you using for this? as my code that ive been using pauses the screen for a split second on lmb click (and hold). normally the window timer pauses, which makes the entire repeat loop pause also (no screen updates). i'd like to hear how you achieved the no-screen-pause upon lmb click + drag. :)

Check out my shared drive for how to do the window thing ;-)
Challenge Trophies Won:

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 7
    • View Profile
Re: SMFX intro
« Reply #5 on: December 03, 2024 »
Check out my shared drive for how to do the window thing ;-)

ah yup, its pretty much identical to how i had it, apart from i was using a seperate window timer and binding the event to it rather than using a thread.

ive tried your code, and for some reason it refuses to compile... i'll debug when i have time in attempt to get it functioning.

it keeps showing -> ERROR] StartDrawing(): The specified output is NULL (0 value) which refers to -> StartDrawing(SpriteOutput(#creds))

not sure if there is anything else to do in regards to threads. -shrugs-

[EDIT... 20241205]...
ok, so after some debugging with the window, timers and threads (so the screen refresh does not pause), i have found out the root cause of my LMB pause issue, and it was to do with the rendering system used.

by default PB now uses OpenGL at compile, where I was getting the LMB ~2 second timer/screen pause... but when using a thread, it would error on compile, timers would work but the screen wouldn't update (tested timers in thread and also main loop).

i changed the compile rendering subsystem to DirectX9 (either 9 or 11 can be used on my system), and huzzah, it fixed all the timer and thread issues, and everything just 'worked'. so its an OpenGL vs DirectX9 issue (glad that i finally found out the root cause of the LMB pause for ~2 seconds).

so now with the two timers, main repeat loop (for the lmb screen drag), and the thread (to repeat all the intro drawing on the backbuffer and flipping)... since they are now seperate, upon LMB on the intro window, the main repeat loop timer pauses (i see this in debug), but the threaded repeat loop continues to timer (in its own thread). inside the main repeat loop, the delay can be "Delay(1000/60)" 1000ms / 60fps... aka ~16.6ms delay (rather than 1ms), which seems to match the threaded loop timer, since everything is forced to 60fps, therefore both timers sync up properly.

i have also tested my wincallback and new timer + bind method to which the LMB click/drag still causes the window to pause for a split second... so the only option for zero pause is the DirectX9 + Thread.

whatever the case, im glad i debugged and figured it out. thanks for the thread code to mess around with.
« Last Edit: December 05, 2024 by ttemper »