Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Other - #Coding competition

Author
Message
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 2nd Oct 2005 22:32 Edited at: 4th Oct 2005 07:00
For when the current one ends, there's another waiting in line.
I've been talking to Aura on IRC, and I suggested using my game as the next compo. The game is about 90% on it's way to being functional, after that I just have to add effects (explosions mainly). I'm posting this thread now because I'd like to know if people are okay with this being a compo, and any suggestions are welcome.

Knights and Pavers (name will probably change later on) is a Turn-Based-Strategy war between teams of bots.
There are two kinds of bots: Knights and Pavers (duh). Knights are offensive units that can only walk on territory that belongs to their team (team-colored tiles). All Pavers do is walk around, but they can walk on any kind of tile. As they pass over neutral or enemy territory, that ground tile is "converted" to that of the team. Meaning now Knights can pass there.
I plan on having at least two game types: Last Bot Standing and Standard. In the last bot standing, your bots have to destroy all the enemy bots while taking care of each other. In Standard mode, you don't really care about enemy bots. You just want to distroy your enemies' base, while taking care of your own.

All the player does is watch as the bots he programmed fight someone else's. To make bots, you can use (almost) any compiler that can create a dll. Certain languages (VB6) will require a wrapper, as I'm only adding support for C++.

Creating the bot in Visual Studio:
you start an empty DLL project, and add the following line:
#include "KAPAI.H"

There is a NullBrainAI class in that file, which does nothing. You create your own brain by inheriting it ( class MyAI : public NullBrainAI{ ).
Every time it's this bot's turn to play, the Think() method is called, so you'd want to overload it. Here you can send commands to the bot telling it what direction to move or shoot. You better think quickly though. There's a time limit for thinking and if you take too long your bot is penalized by a lightning bolt. Either that or getting head-butted by a goat. Dunno. At the moment all that happens is your HP goes down and it says "Bot penalized for being a slow thinker".
When your bot is loaded, the Load() method is called. Here you can specify to the game what 3D model to load. This way you can make your own tanks/monsters/ships/characters/whatever.

Bot creation will probably change a lot for other languages, depending on their wrappers. Blanky is working on a VB6 wrapper.

Your plugin doesn't receive DarkBasic's globstruct pointer, so don't even think about cheating by moving your bot across the map in a single turn. Also, it was programmed using DBP 5.7, so no need for the latest DX.

I'll try to post some screenshots later today or tomorrow night. It doesn't look fancy because that's not what I'm aiming for ATM. I want to get the basic game flowing before I add cool exploding cats and glowing lasers.

[edit]
Links to screenies that are to be uploaded amongst the rest of the thread:
Pic 1: Placeholder graphics, knights could walk anywhere.
Pic 2: Higher resolution, same old graphics, restrected knight movement.
Pic 3: Placeholder skybox, no more crashing, fog, shooting.
More to come later!

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 3rd Oct 2005 16:27 Edited at: 3rd Oct 2005 16:28
As promissed, SCREENIE!!
Please note, just about everything in the scene is a place holder. Matrix textures, the base model, the two bot types, etc. Will add a skybox and fog later also.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 3rd Oct 2005 17:28
another, without the scaling... looks much better now.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
blanky
21
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 3rd Oct 2005 18:27
Ooh, prettyful.

Btw, come on IRC when I am and I'll be happy to continue work on the VB6 wrapper

Part of the 'Emergency Response Noob Shooting Team' :: Feel free to add me to MSN, but don't expect any big favours.
I AM _NOT_ A MOD, I AM ONLY HUMAN (although I fly in my spare time).
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 3rd Oct 2005 21:59
thanks for the help, blanky. Though, before you get any further on it, I'd like to get the game on an ugly-but-working state. That way I will be sure no changes to the DLL interface will be necessary and no code will have to be rewritten.
At the moment the game just exits randomly, and I have no idea why. And to make it worse, it's a nice clean exit, rather than a crash that creates a crash log, or a "This program has performed an illeagal operation" kinda thing. If it were either of these, I'd be able to debug. Arg. Good thing I'm making the entire game in my SeaMonkeySDK rather than DBP.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 3rd Oct 2005 22:03
What is #coding anyway?
(I thought that I know, but I'm not so sure now)

I'm trying to learn...
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 3rd Oct 2005 22:26
#coding is a chat room on IRC for discussing... code. Why don't you have a look?
Get an IRC client (HydraIRC, great/free)
connect to: beer.devhat.net or pete.devhat.net
type in: /join #coding

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 4th Oct 2005 04:49
Quote: "At the moment the game just exits randomly, and I have no idea why"

Update, I have just found out why and fixed it. Now for adding bullet collision and reinforcements and I can release a beta!

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 4th Oct 2005 06:49
New screenie!

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 4th Oct 2005 15:40
I got HydraIRC, I connected to beer.devhat.net (using Firefox), and now's the question...
Where to tipe in: /join #coding ?

I'm trying to learn...
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 4th Oct 2005 17:01
you're supposed to connect to it in Hydra

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 4th Oct 2005 18:55
I figured that, but I can't find a way to do it. In a file menu it says connect, but I can't select it (so I connected with Firefox).

Sorry for not being smart, but can you guide me step by step, please?
(I have never used any IRC program yet)

I'm trying to learn...
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 4th Oct 2005 19:25
File->Connect
in the URI feild type: IRC://pete.devhat.net:6667
click OK

A new window will open, click on Polulate List.
Pick a channel, click Join.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 4th Oct 2005 22:26 Edited at: 4th Oct 2005 22:29
The problem is: I can't select File->Connect! (I said that allready)
"Connect" letters are gray (most of things in the menu are), meaning that function can't be used and I'm suposed to do something so I would be able to connect, but I don't know what, and that's what I'm asking you...

I'm trying to learn...
blanky
21
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 4th Oct 2005 22:44 Edited at: 4th Oct 2005 22:48
You've killed it, haven't you.

When I started HydraIRC, it showed me a neat dialog and I added DevHat into the network box, and then I connected.

I have no idea why your 'File -> Connect..' button is grayed out, none at all.

Get mIRC (an appalling 7.68MB (cry, 56k users)) or something that comes with an all-encompassing hand-holding 'My First IRC Network' walkthrough thingy. Once you understand it (i.e., after the first attempt) then maybe think of something a bit more complex.

Btw, attempting to log onto a chat network with Firefox is a bit silly, really. I mean, Firefox asks for web pages in the HTTP protocol on port 80, and IRC clients ask for text in IRC protocol on port 6667. So.

[Edit: Neat screeny, Tkf15h; Those damn placeholder textures are the only thing that's bringing it down from, like, really high skyness at the moment. WOOF. Talk to me sometime, and I'll help you liberate one of the really neat skybox textures from my 3ds max sample stuff.]
[Edit de Edit: Those ships are PRETTYFUL. Etc. It's got to be someone else's turn to say something nice about the screenies now.]

Part of the 'Emergency Response Noob Shooting Team' :: Feel free to add me to MSN, but don't expect any big favours.
I AM _NOT_ A MOD, I AM ONLY HUMAN (although I fly in my spare time).
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 5th Oct 2005 00:21
lol, thanks Blanky.
The problem with meeting you on IRC is that I log on at night, after work. Due to the timezones, that's probably early in the morning for you.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Zero Blitzt
21
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 5th Oct 2005 05:22
Sounds cool, TK. Maybe I'll actually come back to my home away from home


Who are the brain police?
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 5th Oct 2005 16:02
I did it! Thank you all!
I was doing something wrong, don't know what, I did everything as since and now (for no reason) it opened connect dialog box!

Thanks, Infinity

I'm trying to learn...
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 10th Oct 2005 22:03
Update: The game is in a semi-working (but still ugly) state. Semi-working because all the main features are there, but it's crashing every now and then. I hope to get this done this week so it can be tested by whoever wants to give this a try.
*Returns to his code with a can of anti-bug spray*

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
blanky
21
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 17th Oct 2005 23:34
Yay, keep working on it ^^

(Btw, is 'DC emulator' DreamCast emulator?! :o I've been trying to get 'into' emulator programming for a while now, but even in my first Chip-8 emulator I did something terribly wrong and I couldn't find out what... )
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 18th Oct 2005 04:39
very little time to work on this.
I'm thinking of opensourcing it. Anybody interested?

And yeah, DC=Dreamcast. I got the processor core done, but had some trouble with memory management. Will probably have to do it all over again. I had miscalculated something in the begining of the project, resulting in the emulator trying to take up 4GB of RAM. Needless to say, that just ain't right.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 18th Oct 2005 09:57
I'm interested, although I'm not sure if I would be of any help
(you'd probably have to explain me some stuff)

I'm trying to learn...
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 18th Oct 2005 16:45
The code isn't exactly ugly... just uncommented, and it isn't very beginner-friendly: Featuring one line of DBP code and the rest is in C++ with my SeaMonkeySDK. Uses linked-lists a lot, OO code (inheritance) and pointers to everything!
Compiles with MSVC2005, though it should work with VC6 with a few modifications (due to no FOR scope compliance).
What I call the SeaMonkeySDK is basiclly a DBP interface library, with a few extras, so getting used to it is easy.
If you're comfortable with all that then you should be OK.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 19th Oct 2005 10:19
I have used only a little of DBP and it doesn't seem very hard to me...
SeaMonkeySDK surely is downloadable (and hopefully free; haven't find it googling). Familiar with OO and pointers, but not sure what do you mean by linked lists... I'm working with DevC++ so it might be an issue.
Am I worth it?

I'm trying to learn...
TKF15H
22
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 19th Oct 2005 15:19
Let's find out. Anybody have somewhere I can upload it? It's 7MB, and I can't attach it to a post for some reason.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Infinity
20
Years of Service
User Offline
Joined: 2nd Jun 2005
Location:
Posted: 21st Oct 2005 10:29
Try googling for free web hosting. You can choose what suits you best.
I heard that 1asphost is good, so you may try that.

I'm trying to learn...

Login to post a reply

Server time is: 2025-08-08 16:20:40
Your offset time is: 2025-08-08 16:20:40