Search found 53 matches

by sero
Feb 19, 2021 14:44
Forum: Tips and Tricks
Topic: 2D shadows
Replies: 26
Views: 3009

Re: 2D shadows

I found a small, and very simple SAT test of mine Jaw drop. There is a lot of useful material here. Anyone interested in collision detection should make this a part of their curriculum. Here's a short youtube video showing and explaining the basic concept. https://www.youtube.com/watch?v=IELWpIGtjR...
by sero
Feb 18, 2021 21:00
Forum: Tips and Tricks
Topic: 2D shadows
Replies: 26
Views: 3009

Re: 2D shadows

Google is your friend. Ahh, good ol' Google. The fourth link that Google provided me upon searching "separating axis theorem" deceptively went to a viagra page. Not just viagra, but super viagra, and viagra professional, too. Avoid the "dyn4j" result if you search this yourself....
by sero
Feb 17, 2021 22:32
Forum: Beginners
Topic: Inconsistent stuttering problem
Replies: 11
Views: 252

Re: Inconsistent stuttering problem

Is there somewhere in my code I need to reference this precision timer? How does it work exactly? The precision timer example belongs to the Windows only "winmm.dll" library. The reason we use it within a preprocessor #ifthen is to check for a Windows system. It seems that the Windows sys...
by sero
Feb 15, 2021 13:43
Forum: Tips and Tricks
Topic: Guess what the output of this code is?
Replies: 4
Views: 174

Re: Guess what the output of this code is?

I got this output: Image
by sero
Feb 15, 2021 3:14
Forum: Beginners
Topic: Inconsistent stuttering problem
Replies: 11
Views: 252

Re: Inconsistent stuttering problem

For a bit more information regarding this topic see the FBWiki: https://www.freebasic.net/wiki/ProPgAntiFlickering
by sero
Feb 15, 2021 2:33
Forum: Beginners
Topic: Inconsistent stuttering problem
Replies: 11
Views: 252

Re: Inconsistent stuttering problem

Try adding this screencontrol above your screenres : screencontrol 103, "DirectX" 'screencontrol 103, "GDI" ScreenRes screen0width, screen0height, bitdepth, 2, (GFX_FULLSCREEN Or GFX_NO_SWITCH) If "DirectX' doesn't help, use GDI. If neither of these help, you can always try ...
by sero
Feb 15, 2021 1:00
Forum: Beginners
Topic: Inconsistent stuttering problem
Replies: 11
Views: 252

Re: Inconsistent stuttering problem

Try this and see if it helps at all. It could be a Windows system timing inconsistency. '######################################################################################################## #ifdef __FB_WIN32__ declare function set_precision_timer lib "winmm.dll" alias "timeBeginPe...
by sero
Feb 14, 2021 22:23
Forum: Projects
Topic: Maze Walker
Replies: 3
Views: 213

Re: Maze Walker

Nice demonstration. If Indiana Jones is your thing, you should code in a rolling stone chasing after the character. Really make the code sweat!
by sero
Feb 11, 2021 21:41
Forum: Game Dev
Topic: experimenting with sprites
Replies: 21
Views: 796

Re: experimenting with sprites

@ron77 - What MrSwiss is saying is an important thing to aim for when coding. These are basics that you should make a habit of. You'll need to follow these basics if you want to become a better coder. I updated my example for you that takes away the bad habit of using "shared" and "in...
by sero
Feb 11, 2021 15:56
Forum: Game Dev
Topic: experimenting with sprites
Replies: 21
Views: 796

Re: experimenting with sprites

Glad I could help. Here is another version that locks frame increment with our timer that checks to update the screen. original code: #INCLUDE "fbgfx.bi" USING FB screenres 640,480,32 color rgb(0,0,0),rgb(120,120,120):CLS TYPE ObjectType X AS SINGLE Y AS SINGLE Speed AS SINGLE Frame AS INT...
by sero
Feb 10, 2021 17:49
Forum: Tips and Tricks
Topic: getjoystick() demo
Replies: 3
Views: 240

Re: getjoystick() demo

Strike down zombies in this next getjoystick() demonstration. Use thumbsticks axis 0 and axis 1 to move and aim your sword. Button 0 and 7 will activate your sword for effective zombie slaying. A keyboard version is included separately. Use arrow keys to move and space to attack. Sword aims in the d...
by sero
Feb 10, 2021 0:12
Forum: Game Dev
Topic: Conway's game of life
Replies: 7
Views: 306

Re: Conway's game of life

Conway's game of life Nice work. Thought I'd add my own pixelated version of your code: dim shared as long W = 640 dim shared as long H = 480 screenres W, H, 32 W -= 1 H -= 1 DIM SHARED AS long grid(0 TO W,0 TO H), _new_grid(0 TO W, 0 TO H) DIM As long gen, n, nei, was DIM as long x, y RANDOMIZE TI...
by sero
Feb 08, 2021 2:55
Forum: Tips and Tricks
Topic: getjoystick() demo
Replies: 3
Views: 240

getjoystick() demo

Using coderJeff's previous example of getjoystick() code https://www.freebasic.net/forum/viewtopic.php?f=3&t=5229 as well as heavy inspiration from paul doe's fbg-mouse.bi https://www.freebasic.net/forum/viewtopic.php?f=7&t=28958 I've put together a new getjoystick() demonstration. All four ...
by sero
Feb 07, 2021 13:29
Forum: Tips and Tricks
Topic: Trigonometry and tank control movement
Replies: 5
Views: 288

Re: Trigonometry and tank control movement

This is very helpful information badidea. Thank you. I'm curious about: #Ifdef __FB_WIN32__ Is there a list of __FB__ definitions? Is there documentation about it? This is preprocessor stuff right? Does the compiler define it? What are these standard definitions? I'd like to learn more about all thi...
by sero
Feb 07, 2021 3:10
Forum: Tips and Tricks
Topic: Trigonometry and tank control movement
Replies: 5
Views: 288

Re: Trigonometry and tank control movement

badidea wrote:Without the timeBeginPeriod/timeEndPeriod it works fine on linux as well.

I'm glad to hear that. Would using an #ifdef in this case be possible to make it linux friendly? Also, is there something similar to timeBeginPeriod/timeEndPeriod on linux?

Go to advanced search