Re: Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Sorry guys if this sounds like a shameless plug, but I've received
multiple inquiries about Crash Course and game programming today so I
thought I'd toss this out for mass consumption.  Please no flames.

On Tue, 27 Jan 1998, Florian Bruecher wrote:
> I have some questions about your crash course!
>
> 1. The crash course from your page at http://exo.com/~lgp/euphoria
>     reach only at week 5!!! (Oh my god,the lines of code should
>     begin at week 6!!! sad  !). When will it start with week6?

Check out the zip archive.  It has more lessons than the html pages.  I
have been on hiatus from the lessons lately, but should pick up on them
again soon.  In the meanwhile, You can still purchase the OidZone
Programmer's Refence book.  It covers the OidZone game engine (completely
written in Euphoria) in gross detail.  Complete design Specification for
the game, programming theory, and a line by line expository of the code.
$40 + Shipping  You also get a disk with the source and art and a license
to use the game code in your own game projects

> 2. What programmes do you use for the sprites? AniVga 1.2 or FastVga?
>    What programmes do you use for the sound?

I am unfamiliar with these.  I used Autodesk Animator and 3D studio to
create the art if that's what you are asking.  The sprite routines that
draw the images onscreen in the game were written by me (and Jiri Babor)in
Euphoria.  The book explains them line by line.

> 3. Do you really programs all this games?
yes.  I wrote every line of game code for all 6 of our games.  I used a
number of "standard" 3rd party Euphoria libraries, all of which are
available from the Official Euphoria Home Page for non game specific
stuff (SFX2, font routines, gif reader, etc)

> 4. Do you want to support us? (Beginner guide for Euphoria)
>    (you can send me some (very) simple sources,like
>      a) how to move sprites
>      b) how to play sound
>      c) collision support?

All of that is covered in detail in the book, and will be covered
eventually in the Crash Course.  There are a number of Euphoria libraries
available for these processes, but no reference other than my book to show
you how to put it all together in a game.

2) To play sounds, Use Jacques Deschenes' SFX2 routines.

1) The easiest way to keep track of sprites is using "Director Sequences"
for each one: Oidata[1]={x,y,dx,dy,active} say would tell you where Oid
#1 is on screen, what direction it's moving and how fast it's going, and
whether or not you need to draw it.  You would have a procedure to figure
out where it's going, set x,y,dx,dy,active and send the appropriate sprite
image to your sprite draw routines to put them on the screen. There are
quite a few sprite libraries for Euphoria available on the Official
Euphoria Home Page: http://members.aol.com/fileseu

3) Collisions between simple objects are easy to do.  Compute a bounding
box (or "collision region") around (or inside) your object and another
around the object you want to test collisions with, and see if part of
either box is inside the other.  Say you have a 10x10 ball at {20,50} and
a 5x5 ball at {23,45} and you want to know if they are colliding.  Get the
screen coordinates of the upper left and lower right corners of each
bounding box, in this case:

x1=20 y1=50  x3=23 y3=45
x2=30 y2=60  x4=28 y4=50

then check to see if x1<=x3<=x2 and y1<=y3<=y2 etc. for all 8 corners.
if any of them are true the two objects are colliding.

Accurate colission detection bewteen big complex shaped objects is pretty
complicated most of the time and beyond what I can explain in a short
note.  For OidZone I just computed smaller collision regions that were
completely inside all animation frames of my spinning weird shaped
asteroids.  To justify it I figured you weren't really damaged until you
"really" hit the asteroid. =) Generally we break a weird object (like a
mountain range or a palm tree) into multiple collision regions and test
each one to approximate.

> 5. How do you program a simple DOS? smile

beats me.  I write games. =)

Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp/euphoria
Coming Soon from LGPGames:  Runner!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu