Search found 30 matches

by frognik79
May 27, 2016 14:37
Forum: General
Topic: Any OpenGL pros here?
Replies: 3
Views: 849

Re: Any OpenGL pros here?

Close, had to use height:
glTranslatef(0.0f, 0.0f, -32.0f * ((GLfloat)height / 1024));
(yeah I'm using visual studio this time around :D) but it works perfectly.

Cheers.
by frognik79
May 27, 2016 14:07
Forum: General
Topic: Any OpenGL pros here?
Replies: 3
Views: 849

Re: Any OpenGL pros here?

Cheers dodicat, that's what i wanted it to do. I do remember last year using translate z by a ratio in my old test project here: http://www.freebasic.net/forum/viewtopic.php?f=15&t=23332 However I couldn't figure out how to get the proper ratio. I haven't tried anything yet but assume it'd be so...
by frognik79
May 26, 2016 12:24
Forum: General
Topic: Any OpenGL pros here?
Replies: 3
Views: 849

Any OpenGL pros here?

Not really an fb question but I've done about 50 searches for an answer and haven't found what I'm looking for. I'd like to set up a stretchy window with the origin at the center of the window but when the window is stretched the 3D objects remain the same size. When using gluPerspective with the as...
by frognik79
Feb 27, 2015 9:47
Forum: Game Dev
Topic: Unnamed OpenGL platformer
Replies: 11
Views: 4224

Re: Unnamed OpenGL platformer

Kinda getting mixed messages of both too fast and too slow. Just tried the full screen mode and found it worked best. The window mode was too high to fit my laptop screen. Managed to bounce up the chimney. It was all a matter of timing and remembering that unlike the real world you could still move...
by frognik79
Feb 26, 2015 7:02
Forum: Game Dev
Topic: Unnamed OpenGL platformer
Replies: 11
Views: 4224

Re: Unnamed OpenGL platformer

Kinda getting mixed messages of both too fast and too slow. Here's a longplay of wonderboy 3: https://www.youtube.com/watch?v=OBdu19yBNkQ The character does have an inherent weighty feel. When you say slow do you mean the intentionally laggy camera or actual character/mob movement? ATM I'm removing ...
by frognik79
Feb 25, 2015 9:21
Forum: Game Dev
Topic: Unnamed OpenGL platformer
Replies: 11
Views: 4224

Re: Unnamed OpenGL platformer

I had actually forgotten that I was rendering 30 tiles (cubes) each side of the camera independent of screen resolution and that was causing it to draw roughly 1340000 quads constantly. I've now made it to only render what will fit on the screen which drops this to roughly 340000 quads in 1024x768 a...
by frognik79
Feb 24, 2015 14:30
Forum: Game Dev
Topic: Unnamed OpenGL platformer
Replies: 11
Views: 4224

Unnamed OpenGL platformer

Back when I was a kid my favorite game was Wonderboy 3: The Dragon's Trap for the sega master system. Since then I've wanted to make my own game with a similar style so for the past 2 weeks I set out to do just that. The game I'm making was initially a 2D tile based with each tile containing specifi...
by frognik79
Feb 12, 2015 16:35
Forum: General
Topic: ScreenSync question
Replies: 5
Views: 1317

Re: ScreenSync question

Well it's just the wording on the wiki is kinda hard to understand. "If the program uses this small interval of time between frames to redraw the image, the flickering is greatly reduced. In that use, Screensync is a reminiscence of QB where there was only that equivalent method (WAIT &H3DA...
by frognik79
Feb 12, 2015 11:27
Forum: General
Topic: ScreenSync question
Replies: 5
Views: 1317

ScreenSync question

Would I be right saying you put ScreenSync at the start of your loop then do all your processing and use ScreenCopy at the end? I assume for 60 FPS you need to get all your processing done in 16ms or less. Does the ScreenCopy eat any remaining cpu cycles until it's ready to copy to the screen? The r...
by frognik79
Oct 09, 2014 9:21
Forum: General
Topic: screen flickering
Replies: 25
Views: 2722

Re: screen flickering

@frognik79 Avoiding the PUT command is the reason why I joined this discussion. The backbuffer needs to get implemented in each further grafic function and executes slow on boxes / OSs without grafic acceleration (DOS). @Gablea I see, I missed that part. afaik you only need to use ScreenLock/Unlock...
by frognik79
Oct 08, 2014 11:53
Forum: General
Topic: screen flickering
Replies: 25
Views: 2722

Re: screen flickering

The PUT command makes a copy of the back image data to the current screen data. This may be slow on DOS systems without grafics hardware acceleration. In that case I'd use two screen buffers and just swap the pointers (instead of making a complete copy): #DEFINE ScnX 800 #DEFINE ScnY 600 #DEFINE Rn...
by frognik79
Oct 08, 2014 8:52
Forum: General
Topic: Bug: for loop with pointers
Replies: 22
Views: 3477

Re: Bug: for loop with pointers

The IF or SELECT CASE wasn't the messy part I was talking about, it's the way you access the NextEntryDelta that's the mess. I'm not an expert, but this is probably roughly how I would write it to clear up the mess: Dim As Any Ptr pMem = Cast(any ptr, pSystemInfoBuffer) Dim As PSYSTEM_PROCESSES pSy...
by frognik79
Oct 07, 2014 15:29
Forum: General
Topic: Bug: for loop with pointers
Replies: 22
Views: 3477

Re: Bug: for loop with pointers

TJF wrote:
frognik79 wrote:Why don't you tell me what the proper function to get a thread's state.
Because you didn't ask yet.
It was rhetorical, I know for a fact that there isn't another function.
by frognik79
Oct 07, 2014 6:56
Forum: General
Topic: Bug: for loop with pointers
Replies: 22
Views: 3477

Re: Bug: for loop with pointers

This messy code isn't caused by FB. Its your personal style and the messy API you use, which make the code unreadable (and slow). Have a look at WITH and SELECT CASE AS CONST . This is test code purely to test results and will be overhauled, please don't lecture me on basic semantics. The IF or SEL...
by frognik79
Oct 06, 2014 15:29
Forum: General
Topic: Bug: for loop with pointers
Replies: 22
Views: 3477

Re: Bug: for loop with pointers

Correct. It makes me a little uncomfortable though, the way you're casting the pointer in order to increment it. It relies on the cast holding a reference to the original pointer, and not just its value. The approach I would take is: use an Any Ptr most of the time to keep track of where you are, a...