English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Retrogaming General Discussion (https://eab.abime.net/forumdisplay.php?f=17)
-   -   For Game Programmers... (https://eab.abime.net/showthread.php?t=20848)

DaphydTheBard 18 November 2005 11:10

For Game Programmers...
 
Hey All,

Fairly new to these boards, so hi to all and sundry.

If there is anyone in the community who dabbles in the art of game programming, either reproducting Amiga classics, or writing clones, or just writing retro-style games in general, then I may have a little present for you which I'd like to offer to anyone who's interested.

I'm a professional developer for a living, but in my spare time I dabble in the art of games programming. I've spent the past 2 years writing a game engine in Visual Basic 6 and DirectX, and whilst it's not 3D, it's absolutely perfect for writing 2d, retro games.

I've got some pretty neat classes in the engine, for everthing from doing smoke and light effects, to a feature rich bitmap class with transparency, transluceny, rotation, scaling, and animated frames, to sound classes, multiplayer classes, starfield generation, solar system simulation, even a galaxy generator (which looks pretty neat).

I haven't documented it properly yet, but I have an example asteroids game I developed which uses a lot of the classes and show's how everything works.

If anyone here is struggling to get started writing their own games, my engine could be just what you're looking for, as it abstracts all the hard DirectX stuff away behind the scenes, and let's you concentrate on the more fun aspects of game development. I have classes also, for handling "actors" in games, and a camera object, which can be used to keep the viewpoint focused on an object while the world scrolls around it.

If anyone's interested in getting their hands on a copy of my code, I'll be more than happy to share it. I'm also looking to put a little team of enthusiastic people together to help me out with artwork, sound and music for my current project.

If anyone's interested post here and I'll reply when I next check the boards.

:great

Zetr0 18 November 2005 19:53

Heys Daphyd, and welcome to the EAB.

I like what i read, you can never have enough coders, and if your interested in sharing and creating game projects, then contact one of the moderators (RCK or BippymM) and see if you can get cleared to join the AGF (Eab's very own Amiga Game Factory) there are some current proejcts that may take your fancy, ad i must admit i cannot wait to get my teeth into a serious project and with your help we could release this for the PC too.

Wich is awsome :)

the AGF consists of coders, muscians and writers / scripters and it is always more the merrier. It would be a pleasure to work with you on some projects for the amiga and PC so please sign up.

gimbal 18 November 2005 23:50

Well I'm a Java + OpenGL coder, so I don't want your Microsoft enabled VB + DirectX engine :lol

Seriously, I've used DirectX in the past when I still thought that C++ was the solution to everything and I happen to think Direct3D is far superior to OpenGL, but Java + OpenGL = cross platform and easily available, and the fact is that I'm an authentic Java geek.

I salute you for creating a working game engine, it's very tough indeed. Did you use Direct3D to fake hardware 2D, or DirectDraw?

demoniac 19 November 2005 00:49

DaphydTheBard,

I'm interested in checking out your code. I have played around w/ OpenGL, but never got started w/ DX. Thanks.

Zetr0 20 November 2005 05:03

Heys gimbal, C++ IS the solution to everything, LOL (pure vein C is actually) java is just a quick and dirty prototyping tool :p

*hehehe*

And personally , i tip my hat at you Daphyd as i beleve it is harder to code in the monolith of visual basic 6 than any other language, (unless its FORTRAN wich is *politely* not very nice and sux big daddy pants) :)

and C++ / OpenGL is INCREDIBLY portable ;) and faster too .... muchly so.. and if it isn`t you can compile it to ASM and tweek that engine to its finest moment ;)

but seriously as a programmer for the last 15 years, these are but our tools and the cyberspace our playground and it is always great to see and appreciate good solid work / engineering. a simple easy to use construction kit is a powerfull tool

I look foward to getting to see and hey maybe even use some of you work Daphyd:)


Amiga on :)

cosmiq 20 November 2005 20:51

SDL library is cool too !! played around with it..
i'm doing visual dataflex for a living
thats not really fancy though
but this sounds good.. show us some screens!!
-c.

gimbal 20 November 2005 21:13

Zetr0: C++ was the solution to everything when Java and C# didn't exist, now it's just a nice retro language to do specific low level stuff with. Doing everything in C++ is just plain stupid when there are languages available that can cut the development time dramatically and make it binary compatible across different platforms, not just source compatible.

For heavy duty 3D game development I would be open to discussion about C++ being better because of the reduction in overhead, but seasoned Java / C# developers can without a doubt create a 3D engine that rivals the speed of an engine written in C++. It's all about the expertise of the programmers writing the engine, not the language they used.

You have to go with the times, standing still will only get you nowhere.

ant512 20 November 2005 22:06

Quote:

Originally Posted by gimbal
seasoned Java / C# developers can without a doubt create a 3D engine that rivals the speed of an engine written in C++

:shocked

I've coded in Java, C#, C++, C and dozens of other languages. In short: So very very wrong.

Zetr0 21 November 2005 10:11

LOL, sorry my dear Gimbal, didn`t mean to catch a nerve. but err C# .. yeah if ya wanna code on microsoft systems, have you ever tried porting that over to a linux platform....!?!??! (i have and its horrid) in the end i took only 3 of the 16 header files. and re-wrote if for MS expected non-dependencies...

and err JAVA, well again... Enterprise apps even though can be developed in java (trust me i used to do this) for finalisation it would be coded for C# as a final implementation. hence the ethos Java to prototype and C to Run.

Personally i am a bit retro, i absolutely love banging the metal at any given moment to eek that last smidge of performance out of something (be it cpu, gfx etc) so here is an interesting point for those that use borland (yuck!) products after Builder 4 the low level compiler compiles to delphi(vomit) first then onto object and asm binaries..

and a 3d engine in java that can hold its own against an identical engine in C or C++ ????? hmm naaa not buying that, i know to much(nearly 16years), but really you nearly had me sold :p.

For a partially inturpreted language Java has come a long way since its most humblest beginings, and I admit i have worked on solid *Nix enterprise systems that use Java throughout (albiet a force fed sun standard flavour) wich brings it onto the next point.

Java is slowly becoming bloated as opposed to evolved, if there ever was a curve i think sun might find it in serious crisis.

Coding peeves:


I dont hate Java but...

(not to pleased about a forced UNICODE) *4bytes for a fecking character..... shesh thats like for every language right lol including swahiely*

Evangelical Java Gurus saying: "it really is as fast as C/C++",
i am sure it would be if we took an oversized trash collecting routine out, or better still were allowed to programm memory routines. and a full compliation as opposed to leaving it half a jar ? (yeah poor pun)

I dont hate C / C++ but...

Just for reference how far can a far pointer point? ;)

C# and Borland are NOT the definitive C/C++ standard (no matter what they say)

the C++ council makes other councils look fast in deliberation and execution.

I dont hate ASM but...

Why do i have to square dance to calculate ?
mov jmp, mov, jmp pea

Different CPU's have a different number of commands, (some very nice and totaly useless not mentioning IBM's System 32/36 and AS400)

Logical bit shifts become your life.

------------------------------------------------------

Oh i could go on, but i fell i have offended enough people.

DaphydTheBard 21 November 2005 11:06

4 Attachment(s)
Hey All,

Thanks for the replies.

To answer Gimbals question, my engine is hybrid 2d/3d engine.

It's essentially a 2d engine (ideal for platform games, top down shooters, etc) but in order to achieve high level sprite effects such as real-time rotation and translucency, I've hacked in some 3d code as well behind the scenes. It's all transparent from a top-level programmers perspective though - you basically declare a sprite object, load in a bitmap, tell the compiler it's a 3d sprite, and then you can rotate it, set translucency/transparency, and scale it to your heart's content.

A lot of the classes in the engine are inter-dependant (naturally) so for example, ALL graphics classes need a reference to the RenderDevice Class in order to display their output, and the planet/solar system/galaxy class all make use of the BitMap class in order to store and manipulate their pixel data.

Here are some example screenshots of my engine in action.

Attachment 9751
This is my Asteroids game in action. The planet you can see in the background is dynamically created at runtime, so it's always different, and it spins, and it has translucent cloud cover!

Attachment 9752
This is my Galaxy Generator.

Attachment 9753
And this is my Solar System/Planet Generator. Still a work in progress, but pretty much finished and useable in it's current state. My latest achievement!

Attachment 9754
...And this is a little pacman clone I wrote for my dad as a father's day present! The little guy you control in the game actually LOOKS like my dad, which was kindof the idea...
This doesn't actually use my engine but instead uses API calls. I bodged the whole game together in about 3 days!

I'll post some code later today if I get time.

DaphydTheBard 21 November 2005 11:12

I forgot to mention I'm also an avid musician - I've done loads of stuff on the PC using ModPlug Tracker, CoolEdit, and my Roland GrooveBox :cheese

Not sure what the upload limit is here, but I could upload some Mp3's of my stuff as well if anyone wants a listen!

woody57 21 November 2005 12:03

The ZONE limit is 6mb per entry BUT if you want some free online space to show case it PM me

That or use the FREE filehost which gives you 47.86mb per file allthough you can use split archived files with as many parts as you like !

http://.de/

Your work looks EXCELLANT Daphyd The Bard I am glad you found the time to post this thread :great

Zetr0 21 November 2005 12:03

Heys Daphyd,

Thats some damn good stuff, you should be please of your work :) to be honest insofar i am not aware if there is a maximum upload for the zone.

You know there should be some place other than Aminet that supports MODS / MP3s of peeps musics, i have about 300 tracks i could upload (been writing / sequencing since i was 15 lol .... ahhh octamed, protracker.... such days....)

Currently I am re-writting a Spy hunter game in C++ and OpenGL, its 2d top down, it features vehicle and equipment purchasing, city and intersate travel, a boat mode and a helicopter mode (which was taken out of the original because of time constraints), should be able to post some screenies in the next couple of weeks.

PS.

even though its a PC game, the sprites (actors / entities) were rendered on the Amiga.. gotta lurve Imagine!!!!

DaphydTheBard 21 November 2005 12:10

1 Attachment(s)
Ok guys,

Here's what I'm going to do.

Over the next few weeks, as time permits, I'll post the classes here, in this thread, one at a time, with instructions on their useage.

To start though, here is a list of the classes that comprise my engine, and a brief summary of each, just to whet your appetites. :D

My engine is called Anarchy. (dunno why, just liked the name :crazy)

Well, hopefully that gives you lot an idea of what my engine can do. I'll start posting the classes later, but I have a busy schedule at the moment, so it might be a bit slow getting started! :spin

Any questions, just post them here.

Cheers folks!

DaphydTheBard 21 November 2005 12:39

'Anarchy Engine - RenderDevice Class

Below is the source code for the primary class, ae_RenderDevice.

To use my engine in your VB project, you need to set references to DirectX7, and DirectX8, with the reference to DirectX7 FIRST.

Save the code below into a class in your project and call it clsAE_RenderDevice (It's IMPERATIVE that the class names' are correct as they cross-reference each other!).

Then, to use the class in your project, declare it as follows:

Private aeRD As New clsAE_RenderDevice

To setup the display, call the following function from your start-up code:

aeRD.Create Me.hWnd, 640, 480, False

The first parameter is the Handle of the Form (or PictureBox) that you are using for your display.

Second and Third parameters are screen dimensions, and last parameter is a boolean indicating if the display should be full-screen (TRUE) or windowed (FALSE).

Note:

Calling this function in your Forms' OnLoad event will lead to problems, as the form is not yet visible. What I do is have a timer on the form, which fires once only after the form is loaded, that sets up the display, and then switches itself off.

You can hide the Windows' Mouse Pointer like this:

aeRD.CursorVisible = False

When you're program is finished, you can clean up as follows:

aeRD.CursorVisible = True
aeRD.Destroy()

This will switch the display back to windows (if in fullscreen mode) and will show the cursor again.

Basic rendering output to the display is done as follows:

aeRD.Clear()

'Draw your non 3d sprites here, including background, etc.

aeRD.SubFlip()

'Then draw your 3d sprites, and special effects, etc.

aeRD.Flip()


That's basically it for this class - there is further functionality, such as the ability to GET and SET pixels (which is quite fast as it automates bitmap surface locking as and when needed).

The Flip() function can also take optional parameters to do split-screen gaming and earthquake effects. I'll cover these more later on, when I post some example code.

DaphydTheBard 21 November 2005 12:40

1 Attachment(s)
Here's the Source Code for the class: :nervous

changed to text document to make easier thread reading

DaphydTheBard 21 November 2005 12:41

1 Attachment(s)
Here's the rest:


changed to text document to make easier reading of thread

woody57 21 November 2005 12:43

Hello Daphyd the Bard
this will fit easier if you add the code in a plain text document & post it as an attachment using wordpad I believe ....just a suguestion ;)

DaphydTheBard 21 November 2005 12:47

:laughing

Yeah, I'll probably do that from now on!

Thanks :crazy

DaphydTheBard 21 November 2005 12:52

Thanks for modifying this, Woody.

I'll post the code in txt files from now on.

:great


All times are GMT +2. The time now is 18:24.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04724 seconds with 11 queries