🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #763

Re: I want to learn how to do simple graphics, keyboard, and joystick I/O

#763
From: John Stone
Date: Sun, 06 Sep 1992 05:39
51 lines
3017 bytes
Hi there!

Here is some more info on what I've got:
I've been working on some more stuff, I have done a really simple
3d perspective projection library, just enough to see if I should
pursue 3d, I've been VERY encouraged by the speed ;-)

If you have seen the "unreal" demo (on wuarchive.wustl.edu) that
has the moving fractal landscapes in 3d (plotted with lots of points...)
I've been able to duplicate the effect in 32 bit OS/2 :-)

I should be uploading 3 demo programs to hobbes in the next few days,
one is a volcano simulation (just a cute little thing) that uses 
a point aggregation algorithm with trajectory to build up a volcano...

The second demo is a cellular automata demo that I adapted from 
psuedocode in an old Scientific American (did it 2 years ago in pascal,
and I just rewrote it in C with my graphics lib)

The third is my favorite, it uses more of what OS/2 is good at :-)
It is my own version of the Landscapes section of the unreal demo
that everyone has been seeing lately... (from the Assembly '92 demos)
I allocate storage for 160,000 altitude points, and fill it with either
a 3D sinewave, or a fractal landscape (may add a few other things before
putting it on hobbes) and I use an integer 3d projection routine that
I wrote to animate/rotate these 3d surfaces... (using lots of points like
the unreal demo)

You can see how I handle screen switching in the cells.exe demo, in that
one I keep calculating new frames even when it isn't in the foreground,
in volcano, I just ignore switching (I allow it, but I don't save the screen
before allowing the switch, so if you could trash it, although I haven't
been able to yet...)
In the 3d program, I don't allow screen switching during the rendering, 
because I need as much speed as possible, but I may change that...  
I use VioScrLock() to get the screen, and I use the status param
to detect if I actually got it or not... (in the case of non-blocking)

anyway, give me a couple more days and I'll release the elementary stuff
that I have done so far.

I REALLY need to get on the ball with a lot of 2D library stuff like
floodfills, filled polys (need these to continue with the 3d stuff too)
and stuff like bitblts (for games etc)

I have had no luck with getting Mouxxxxx() calls to work in 320x200 yet.

Later,
        John Stone
        johns@cs.umr.edu
Technical Details
Message-ID: <1992Sep6.053921.20831@umr.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!mcs213c.cs.umr.edu!johns
References: <1992Sep2.104307.14331@cco.caltech.edu> <1992Sep2.212551.19196@umr.edu> <1992Sep5.193043.4750@sbcs.sunysb.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!mcs213c.cs.umr.edu!johns
From: johns@mcs213c.cs.umr.edu (John Stone)
Subject: Re: I want to learn how to do simple graphics, keyboard, and joystick I/O
References: <1992Sep2.104307.14331@cco.caltech.edu> <1992Sep2.212551.19196@umr.edu> <1992Sep5.193043.4750@sbcs.sunysb.edu>
Date: Sun, 6 Sep 1992 05:39:21 GMT
Nntp-Posting-Host: mcs213c.cs.umr.edu
Organization: University of Missouri - Rolla
Sender: cnews@umr.edu (UMR Usenet News Post)
Message-ID: <1992Sep6.053921.20831@umr.edu>
Lines: 53