ArkanDOS

General discussion for all topics related to DOS, Windows, Linux, consoles, etc. Anything to do with games.
User avatar
Quadko
Darklander
Darklander
Posts: 2092
Joined: Fri Jun 24, 2011 10:07 am

Post by Quadko »

haha! It's amazing but true, drawing sprites are fast compared to most other actions because it's just copying memory (fast) rather than doing any math or individual pixel calculations (slower!). Of course, other stuff can get in the way, too. :P
User avatar
MrFlibble
Demoniac Demo maniac
Demoniac Demo maniac
Posts: 3733
Joined: Sun Dec 05, 2010 11:39 am

Post by MrFlibble »

Great!!! ^_^ I'm happy that you have levelled up and upgraded the visuals :D

BTW, I did not know that drawing sprites is actually a low-cost operation for the PC's resources. We didn't get this far during our programming courses back in school, just some basic character typing routines and math operations.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

Well, comparing it to my own drawing routine, a sprite is just copying a picture from a far memory into the viewing area. My own drawing routine does not use that. My own drawing routine calculates the approximate points to be drawn so it is slower. A sprite already has all the drawing saved ahead of time so there is no work to be done. My drawing routine draws it at the time it is needed.

However, with sprites - I am not fluent yet. I can do simple block sprites which copies an exact square picture. However, moving a picture that is irregular shape is a lot harder. Well, for me at this point I do not know how to do irregular shapes yet anyways. I just copy a basic picture within a square region and that is all.

http://www.mediafire.com/download/gbi1e ... kanDOS.zip

Here is my update. This time it has a little feature that you can use to future proof the game.

Instead of a speed check, I have come out with a commandline ArkanDOS

If you type in "ArkanDOS 12000000" in Microsoft Windows XP (32-bit) it runs fine.
However because the modern computers are so fast you can just run ArkanDOS at superspeed.haha

This is in the event you do NOT use DOSBox.

Let's say 20 years down the line the computer gets superfast, you can increase the value to slower.

In this version I have changed the bouncing ball routine to sprites.

There are still some subtle glitches to be worked out.

However, this is the latest ArkanDOS that is future proof.

I did not want to update it officially over at WWW.PLAYDOSGAMES.COM because there are too many glitches. So anyone who wants the beta can download this version instead of the stable one over at WWW.PLAYDOSGAMES.COM - thank you!

There is a second value after the speed. This value is use for the sound duration. So let's say you wanted the click that happens when the ball hit the blick to be longer, you just increase the value until you are happy.

So it would go something like this:

(I have tried it in Microsoft Windows XP - and the first value is fine. However, I am not hearing sound in my VirtualBox. Maybe it is just on my end.)

Anyways, here is the format of the commandline ArkanDOS:

ArkanDOS <duration> <duration>

Duration of delay is how much to slow it down just in case the computer is too fast.

Duration of brick contact is how long to pause when the ball connects with the brick.
This second value is just for special affect.

So a live example is:

ArkanDOS 12000000 80000

Just to be clear, this is in the regular MS-DOS command prompt NOT DOSBox. DOSBox currently does not allow faster speed than DOS.
On the other hand, MS-DOS command prompt depends on how modern your cpu is.

Since my computer is a dual core 2.5ghz machine it is going to run the ArkanDOS too fast.
So these two values are going to slow down the game enough to be playable.

I have been able to slow it down so much that it does not move at all when I play the game. So it might lock up if the value is too high so a reboot might be needed in this case. So just start with a small value and work your way up to what is fun for you.

Your mileage may vary.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
MrFlibble
Demoniac Demo maniac
Demoniac Demo maniac
Posts: 3733
Joined: Sun Dec 05, 2010 11:39 am

Post by MrFlibble »

tienkhoanguyen wrote:However, with sprites - I am not fluent yet. I can do simple block sprites which copies an exact square picture. However, moving a picture that is irregular shape is a lot harder. Well, for me at this point I do not know how to do irregular shapes yet anyways.
It is my understanding that irregular shapes are accomplished by using the transparent colour thing - some areas of a rectangular sprite are marked to be "see-through" so that if this sprite overlaps with another one or is positioned against some background the background or another sprite will be visible in the transparent parts of the sprite.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

Jesus Christ!hehe It is going to be a miracle if I ever come out with the full version haha. I just looked at my demo again that is using sprites and it is running dashes everywhere haha.

http://www.mediafire.com/download/amjlu ... KANDOS.EXE

I erased all the previous links in mediafire because I was starting to get confused and it was a mess. So I just leave this link here for now just in case someone wants the latest beta of the sprite version.

Just between you, me, and Quadko - the sprite version is definitely better.

Mr.Flibble - thank you - you are always helpful. I am just tired out right now and not feeling happy since well I guess game making is supposed to be like that. It is not supposed to be overnight success haha.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

It has been fun. Now it is becoming less rewarding and more like stress. Arkanoid is already made at least for another system. All I am doing is making a little remake of the game. I am learning there are so many talented people out there.

Like I said, the maker of QuakeONE is one of the people who I completely am amazed with. In fact it is my favourite DOS game on my HP2000-2d24DX laptop.

The only other game that I have on my laptop and it is legit too is Heroes.

So I have chosen my two favourites of all time on the DOS platform.

In any case, my point is I think my demo is playable enough to be a complete little game in itself.
It may not be the full version of Arkanoid however it is for the kid at heart - young and old.

No matter who you are the original ArkanDOS over at WWW.PLAYDOSGAMES.COM is what I enjoy making. I had fun making that version.

Remember to backup!!!!!!!!!!!!

My beta did not work like I wanted so I pulled out the original from my backup set.

So every time you have a "next" edition - JUST DO IT
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

http://www.mediafire.com/download/82zu8 ... PDEMOB.exe

Okay, here I have managed to develop my own routine to read in a 15 color bitmap. It is nothing much however that is all Borland Turbo C 2.01 can handle. The source code is included. It is nothing complex however I will have you know it took me working late into the night with hardly any sleep to get it figured out. haha So without further adue, the above link will automatically extract the DOS graphics loader and load 3 images. Just make sure you press the key after the first image is loaded. The next two images load automatically and ends. After that you can see the entire source file in the directory called BMPDEMO - it also has the FILE_ID.DIZ in there just in case you wanted to check for file corruption and missing files.

Once you have the chance to see the demo, you will see what I mean when I say that I am limited in 15 colors. So competing with the current lifelike pictures is just not possible. However, it is my baby, Borland Turbo C 2.01 haha

I just ask that you keep my entire files intact if you choose to use my routine or distribute it. I give it as freeware. It is a simple routine however it makes creating DOS games easier. I think so anyways. haha
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
MrFlibble
Demoniac Demo maniac
Demoniac Demo maniac
Posts: 3733
Joined: Sun Dec 05, 2010 11:39 am

Post by MrFlibble »

tienkhoanguyen wrote:It has been fun. Now it is becoming less rewarding and more like stress.
Yeah, that's the other side of doing creative stuff. Sometimes you just need to have a break and switch to something different (not necessarily a different project, just some different activity).

Sometimes when you're thinking too hard on a problem it actually becomes more difficult to find a good solution. In these cases it helps a lot to switch your attention and just not think in that direction for a while.
tienkhoanguyen wrote:Like I said, the maker of QuakeONE is one of the people who I completely am amazed with.
Do you mean John Romero? Or John Carmack? (would be Carmack if you mean the programming side, Romero - and some other people - if level design) Or the guys who maintain the QuakeOne community?

Anyway, it's cool that the development of your game is going on :) Keep it up! ^_^
User avatar
Quadko
Darklander
Darklander
Posts: 2092
Joined: Fri Jun 24, 2011 10:07 am

Post by Quadko »

15 colors
Yep, good old ega/vga! They max at 16 colors, does that mean you're probably stealing one for transparency? Hehe. I'll check it out when I get at chance, hopefully this evening.

And I've almost got my first joystick asm code working, so thanks for the encouragement and example. ;)
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

Jesus Christ!hehe Well, there used to be a time when I would. However, that was a long time ago when I was still getting in trouble. These days I am happy "borrowing". haha ;)
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
MrFlibble
Demoniac Demo maniac
Demoniac Demo maniac
Posts: 3733
Joined: Sun Dec 05, 2010 11:39 am

Post by MrFlibble »

Quadko wrote:
15 colors
Yep, good old ega/vga! They max at 16 colors
Isn't VGA 256 colours by default?
User avatar
Quadko
Darklander
Darklander
Posts: 2092
Joined: Fri Jun 24, 2011 10:07 am

Post by Quadko »

I debated whether to separate MCGA/VGA 256 color out vs. 16 color VGA in my comment, guess I should have. Caught! :)

IIRC, Vga did faster and more modes/higher resolution of 16 color screens than Ega, and also allowed a 256 color mode that we all know and love for games. I even think there were "VGA" setups that didn't support MCGA 256 colors, but those were no use for gamers.

In fact, I think Windows 3.x's standard 640x480 16color mode required a VGA card, an EGA card only supported lower resolution, but I'm fuzzy on that and could be wrong.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

My Borland manual says it should support 256

Post by tienkhoanguyen »

However, it is only with certain cards. I tried all the cards and all of them came up 15 so something is wrong.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
Quadko
Darklander
Darklander
Posts: 2092
Joined: Fri Jun 24, 2011 10:07 am

Post by Quadko »

... I'm not following.

Cards = Video cards? And there are Ega/Vga 16 color modes, and Hicolor 15/16/24 bit modes that show many, many more colors but are painful to work with in dos, even with the VESA drivers that make it "easier".

No matter what card, the video mode you select will be limited to 2/4/16/256/hicolor/trucolor modes.

And, just to cover all bases, colors ranges are 0..15, not 1..16, and black counts as a color right? :)

Any of that make sense to what you're saying, or am I still way off base and not following what you're saying?
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

Im still kinda new as you can tell. I do not know how I even got the demo working.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

I lost my joy along the way.

When I first started ArkanDOS I just did it as a challenge. Now it has become work. You are probably sensinsing my stressed and tired energy level. I really do need a break.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
Quadko
Darklander
Darklander
Posts: 2092
Joined: Fri Jun 24, 2011 10:07 am

Post by Quadko »

Please feel free to take one as you like! Rest and joy are important, it's all supposed to be fun. I'm tired, too, so hopefully didn't come across too strongly, just not following what you were saying but trying to.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

Don't worry my English is poor. I'm not good at explaining. If you take a look at my source code I learned to speak codes from the streets. All I understand is values 0-15 is color then repeats until 255. Hehe

My dad tells me sometimes we speak the same however the language gets in the way. So it is just a misunderstanding. I am starting to think spaghetti code haha

It just means I have been told my programming is poor structure. However it is the only way I know how to make it work.

All those years learning sloppy style is not going to change at all. Bad habits. Wish I had a soda and some whopper with fries. Hehe
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2664
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Post by tienkhoanguyen »

I have not been able to crack the code to programming higher than 16 colors hehe
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
Quadko
Darklander
Darklander
Posts: 2092
Joined: Fri Jun 24, 2011 10:07 am

Post by Quadko »

That certainly makes sense! And 0-15, for 16 colors, I am with you now.

Hm, how to get to 256 colors. How do you switch to a graphics mode in your game? Is there a Borland C++ call, or do you call a dos interrupt directly? Mode 0x13 is the normal 256 color VGA/MCGA mode, with one byte per pixel (instead of 1 byte for 2 pixels in 16 color mode).

The system interrupt way is calling INT 0x10 with AH = 0 and AL = 0x13. I see a Borland "initgraph(...)" function, if you are using that or something similar you can pass the second "mode" parameter as 0x13, I think.

Code: Select all

void initgraph&#40;
  int* GraphDriver,
  int* GraphMode, // Try setting this to 0x13 for 256 color mode
  char*  PathToDriver
&#41;;
Maybe it won't work, but worth a try if you want to play with it. :) But yours is already working, so no worries if you don't!

Sample link I found for Borland Graphics:
http://en.wikipedia.org/wiki/Borland_Graphics_Interface
Post Reply