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.

Work in Progress / Project Atomic - RTS

Author
Message
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 7th Aug 2010 00:39 Edited at: 29th Nov 2010 12:27

Original post:


This project has died, as I'm basically too lazy :p My motivations have changed towards a space based RTS, which is currently in development. I will not post a WIP until a fun demo is available, which should be soon.
Screenshots!






Engine Features

The game is being written in dbpro. I’ve made a short list of the features currently done, and what is pending.

- Done
- Pending

Single Select Units
Multiple Select Units (when holding ctrl)
Box Select Units
Multiple Box Select Units (when holding ctrl)
Point to point movement
Timer based movement
BlitzTerrain
Water
Structure Placement
Terrain Editor
Building Structures
Pathfinding

Newest build attached!

Thanks!

Attachments

Login to view attachments
prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 7th Aug 2010 01:42 Edited at: 7th Aug 2010 01:44
Pretty neat demo I get around 600 fps no stuttering, lags, etc. (amd turion x2 2.2ghz, 4gb ram, 64-bit win 7) its pretty early to say how good the game is but its a good start!

edit: added specs

swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 7th Aug 2010 03:08
Heh, I get about 4000 fps.
Unfortunately the selection boxes sometimes don't select from the right place. (they often start where I last clicked, odd)

swis
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 7th Aug 2010 04:05 Edited at: 7th Aug 2010 21:15
Thanks for the quick feedback guys!

I'm glad you get such good frame rates, as you can probably see from the screenshots, mine are awful.

It's very early days, but I've just implemented terrain, I'll get another demo up when it's flawless ( give me a few days ).

As for the selection boxes, i noticed that myself, but i assumed it was just my touchpad or something, because shaun didn't have any problems. I'll get it fixed.

Theres alot more work gone into it than you actually see, I've got a gui system in there, and a system for gathering files, although that's broken atm

EDIT: Heres a screenshot showing the terrain (it's awful atm, but its' there)

I've fixed the selection issue, and I also rewrote the whole selection code to make it more efficient. xD

Next on my todo list are

-zoomable camera
-build structures
-pathfinding
Thanks!

Attachments

Login to view attachments
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 8th Aug 2010 22:03 Edited at: 8th Aug 2010 22:35
This was the latest build before I messed it up.

I've since implemented BlitzTerrain and got the gui system working, although BlitzTerrain broke my unit movement system.

I'd appreciate if you could again, tell me what the performance was like, and tell me of any noticeable bugs.

Sorry for adding stuff every day, but I want to try and keep some interest in this project!

CONTROLS! :
+/- zoom camera
Arrow Keys Move Camera
Left click Select
Right Click Move

Attachments

Login to view attachments
prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 8th Aug 2010 22:37
Its gone down to 150fps (from 600) but the terrrain looks nice now

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 8th Aug 2010 22:39
That's quite a drop, hopefully when I release the build with Blitz it will be higher.

Nabz_32x
16
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 9th Aug 2010 00:36
This version gets on my "lame" Laptop 65 Fps, the fps go down to 15 when a selection Box is drawn.
The old version gave me 145 fps.
Any Ideas how you are going to implement pathfinding?
serious Pathfinding is the reason I won´t attempt making a strategy game. Does DB has some functions for that?
Are there any open community written examples?
Sorry for drifting off, but the selection itself works good, except the slow performance of drawing the selection box, the older version didn´t suffer from that.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 9th Aug 2010 02:28
Thanks for that!

Hmmm... I don't have a problem with selection boxes, and mine is pretty lame, i'll do some tests, and hopefully i can get that sorted out for you.

I've already thought about pathfinding if you look in the dbpro section, I made a thread about it. Theres a link to a useful library by IanM.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Aug 2010 05:14
IanM has a very good A* library. If you approach the pathfinding in an intelligent manner, it shouldn't need to run the path search very often.

Doh, just noticed you already mentioned IanM's library.

Any thoughts on how to do fog of war? I really like the smoothness of WC3's FOW but never quite came up with a reasonable method.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 9th Aug 2010 17:22
Nope, I haven't really given it any thought yet, except worrying how hard it's gunna be.

I guess I'll make another array that hold the last known data on the enemies, and then once they can no longer be seen, use the data from that array.

I don't have a clue how to do the lights though, a light for each unit is not practical, and impossible in DirectX i think.

Nabz_32x
16
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 9th Aug 2010 18:46 Edited at: 9th Aug 2010 19:07
I know what you mean Phaelax.
I would draw a matrix over the map, then do some auto edging (all parts in fog are 1 all non fog are 0 exact textures are calculated by checking the surrounding of the Data where a 1 is...). So that makes it a little smoother.
For smooth fog of war disapearance / aperance the only solution is to slowly blend the new texture for example fog into the old used texture (no fog completely transparent) of that specific tile, applying the result of the image manipulation every frame as a texture on the matrix... Never done image manipulation in DB so no idea how well it would work performance whise... You also would need to put these manipulated images into the image containing the tile Data for the matrix... Further you have to store every tile that is currently in the "blending process" in the image containing tile data, as long as it animates...

For the lights, there is always the option to use transparent sprites, You could make one for the lightcone and one for the projection on the ground which should be rotated to fit on the terrain / matrix (detecting the inclination of the terrain).
A good way to simulate lights if you run out real lights.

If you don´t want it that smooth, you could use some predefined tiles containing the "blending" animations of every displayable fog tile.

swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 9th Aug 2010 18:51 Edited at: 9th Aug 2010 18:51
Big drop. I get 700 fps, and with a selection box 60! Oh, and what do you mean by
Quote: "I don't have a clue how to do the lights though"


swis
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 9th Aug 2010 19:29
Jesus! are my selection boxes really that bad?! I'm backing my files up right now, as I've been hit by a virus , but i'll be sure to get that sorted. I'm using the d3d functions, so i don't see how the box itself is affecting it, but i'll look through the code and see what i've done that's inefficient.

Quote: "Big drop. I get 700 fps, and with a selection box 60! Oh, and what do you mean by
Quote: "I don't have a clue how to do the lights though""


You know, on an rts, the parts that the player can see are brighter than the parts that the player can't see.

Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 9th Aug 2010 19:42 Edited at: 9th Aug 2010 19:44
@Mad Nightmare, if you're using the object screen x(objID) and object screen y(objID) functions like this:
when you check for the the units being selected,
your code will run slower than if you assign the return of those values prior to checking it. I made the basis of an RTS before I got frustrated with DBPro's types, and here's how I did the main loop


Note: A lot of this code is specific to my game and how I set it up, but you should be able to see that I only used function calls when they were absolutely needed. With that main loop, I got ~500 fps.


swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 9th Aug 2010 20:19 Edited at: 9th Aug 2010 20:20
Oh, I guess I never though of that as light. You could have a black transparent plain in darker areas, but you would have to work out where to put it in relative to the camera.

swis
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Aug 2010 21:02
Nice demo! For some reason when I right-click to move one of the units to that point, it doesn't always do it... It gets quite annoying when it needs around 3-4 clicks before the program accepts my click. This only occurs when I move a unit, and then decide quickly after to move it somewhere else.

Anyway, I hope you two get this done, I LOVE RTS!

TheComet

TheComet

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 9th Aug 2010 21:52
@Dar13, thanks for the advice, but I assign the variables to a temporary variable before i check if it's in the box

@swissolo + Nabz
Thanks for sharing your ideas, when I get to that, i'll try and use what you've suggested

@TheComet - Occasionally I find one unit seems to be left behind, but I've not had anything similar to what you're describing, non the less, I'll look into it. Thanks for hoping! We're both quite ambitious and have big plans for this game, lol.

I've fixed my blitzterrain now xD So i'll upload that once i've reinstalled darkbasic.

Thanks

Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 10th Aug 2010 13:03 Edited at: 10th Aug 2010 13:03
Nice demo, I'll be watching this project closely, because I love RTS games.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Aug 2010 18:26 Edited at: 11th Aug 2010 00:55
Thankyou!

I'm currently rewriting, because I somehow exposed a bug or something in blitzterrain, kaedroho wasn't very clear on what was going on :p But i'm half done, performance is improved already xD

I'll have a blitz demo up by 9 tonight

So maybe I lied, i'm running behind :p

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Aug 2010 01:50
I've tried doing image manipulation for the FOW before, speed-wise it wasn't bad but it didn't look that great either. I had a textured plane above the matrix, each pixel in the image matched to a tile on the matrix. The stretched out image would naturally give the holes in the image smoother blurred edges. It was a start, I might play with the idea again as I've learned new tricks over the past 5 years.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 06:23 Edited at: 11th Aug 2010 17:08
Latest version is up!( on first post )

It's been completely rewritten, I've changed the way the objects are drawn, the way units are selected, I've upgraded the terrain system from Advanced Terrain to BlitzTerrain, I've implemented anisoptropic filtering to the terrain, and a few other things.

There are NO known bugs, so if you find any, tell me so I can get it fixed for the next build.

For those of you who had problems with selection boxes last time, I have timed this one and it takes less than 1ms, so it shouldn't be a problem.

I hope you enjoy moving 100 units around, tell me what you think!

Thanks

swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 11th Aug 2010 18:02
I figured you would add anisotropic filtering.

Well, I started the game and it instantly crashed , no idea why.

swis
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 18:05 Edited at: 11th Aug 2010 18:35
Swiss, if you can, add me on msn.

if you're having problems, run this special debug version :p

copy and paste the results of the debug.txt, preferably in a code box

Thanks!

Attachments

Login to view attachments
Nabz_32x
16
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 11th Aug 2010 18:55 Edited at: 11th Aug 2010 18:56
tried the new build, got 188 FPS on the mentioned Laptop. No breakdown when drawing the selection box. 175 FPS when all units of the map where together on the screen, 165 when they all where selected.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 19:17 Edited at: 11th Aug 2010 19:26
I'm glad the performance has improved!

Unfortunately, swissolo is a jinx :p BlitzTerrain seems to be the cause of the problems, and upon adding in those debug functions, broke it :S it now won't even work in a seperate project... so... time to hurt kaedroho :p

I'm planning to add structures in tonight, assuming these problems are solved.

EDIT: Realised i've just ripped my code apart to find it needs to be run in compatibility mode. If you're running windows 7 and have problems, run it in compatibility for windows service pack 3.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Aug 2010 20:27
all players selected gives me an fps of 267, deselected 368. I have an issue with the bottom corner of the map, where the game seems to lag whenever I am there. I also found that if I slide down to the bottom of the map on one of the edges, the polygons of the level do weird things, seen here : http://i254.photobucket.com/albums/hh100/TheComet92/error-1.jpg

A nice addition would be a parallel shift of the players like in StarCraft. What I mean is if two or more players are close enough together and you move them to another area, they don't all move to the one spot you told them to, but they group together and move in parallel next to each other. If you don't know what I mean, try moving a group of Zealots in StarCraft.

I have no doubt you will add collision so the players don't all heap up on one spot.

Nice progress, eager to see more

TheComet

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 20:42
Glad the performance is good.
The reason the performance drops when they are all selected is because it has to scale and draw all the sprites for their health. I'll add a timer at some point so that they don't get drawn every single loop.

As for the bottom corner, I think that's something to do with the way Blitz is rendered, I couldn't tell you, I'll nag kaedroho again lol. I'm sure the polygons disappearing is something to do with blitz too, i don't know, i'll get investigating xD

I plan to include parallel shift and separation of the units once I have pathfinding implemented, I don't see the point in working on a system that's only temporary.

Thanks for the feedback man xD

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 11th Aug 2010 22:07
Does it crash on BT BuildTerrain?

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 22:25
Sorry, just saw this yeah

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 11th Aug 2010 22:35 Edited at: 11th Aug 2010 22:35
Then the crash is a rare heap error. Something is overwriting some important control structures and causing windows to stop allocating memory. It only happens to a very few projects on very few computers. All computers so far which have the problem are windows 7.

For some reason, all my projects that got the error, have now started working again. Maybe I did something which made it work or the bug just fixed itself.

I'm emailing you the latest beta of BlitzTerrain 2.00 R2.

swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 11th Aug 2010 22:57

That's all in debug.
Oh, and XP serv3 compadability mode works! (above not in compadability mode) I get about 2000 fps

swis
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 23:15
The debug shows that Blitzterrain was the problem

The latest version I've just been sent fixes it, so i'll upload that soon, so that you don't have to use compatibility. I'm glad you get a good framerate.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 11th Aug 2010 23:34
Quote: "The latest version I've just been sent fixes it"


Excellent! I thought that was the worst bug ever. But it turned out to be the best bug ever as it fixed itself!

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Aug 2010 00:41
Just my feedback on the older version. Frame rates were around 360 and dropped to about 50 when selecting units. Moving units didn't always go where selected. Moving multiple units would eventually overlap to the point where you couldn't select individual units. Must implement some kind of grouping method!

I'll try the new demo tonight


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Aug 2010 02:05 Edited at: 12th Aug 2010 18:25
Phaelax, the engine has been completely rewritten, I think you'll find the most of the issues with the old one have been fixed, except the grouping, which as i've said, will be implemented with pathfinding.

Thanks for your feedback, i hope you enjoy the latest demo.

Newest Version Attached to this post, I'm in love, gunna get some screenshots up.

Click a unit, then click the gui and it will create a structure( would have a real model, but shaun messed up :p ) but it's looking great if i'm allowed to say that myself lol

Attachments

Login to view attachments
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 12th Aug 2010 19:19 Edited at: 12th Aug 2010 19:20
Seems to work. You probably should start the camera in the middle of the "world", I was a little thrown off when it was all black. But of course, now I'm getting holes


swis

Attachments

Login to view attachments
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Aug 2010 19:24
Sorry about that, I was excited to get it up

Hmmm I'm pretty sure that's got to be blitz, I'll try and get that fixed if i can :/

prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 12th Aug 2010 22:00
Here on win 7 64-bit I'm just seeing... black. No terrain, units, etc. :\ Just the FPS counter and the logo (which is black so I cant see it fully)

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Aug 2010 23:11 Edited at: 13th Aug 2010 02:29
Sorry, i'm such an idiot, just hold the up key for a couple of seconds... I really should've centered the camera.

new Version attached to first post.

Sorry for all the updates, just makes it feel more worth it if everythings up.

In the assets folder there are more terrains, you can use these terrains by changing the path in the config.ini file, currently it is Creepy\, but you can change it to arctic, desert, tropical or coastal. You can also change the resolution. I hope the problems with holes are fixed in this version.

Cormorant5
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location: Gotham City
Posted: 13th Aug 2010 03:59
Sounds interesting. I only skimmed the comments, do you have a beta out? And I will help if you wish, I am "skilled" in the arts of Sound FX making, but my music comes out as crap.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 13th Aug 2010 04:06
First post mate

Thanks for the offer, I'll bare it in mind x'D

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 13th Aug 2010 13:02 Edited at: 13th Aug 2010 15:20
Just found swissolos problem. It is caused by the exclusion mapping system randomly enabling and excluding tiles that shouldnt be excluded. This can be temporarily solved by setting a blank exclusion map.


This code solves it for me:




EDIT: Fixed in code now. Emailing latest version to you.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 13th Aug 2010 15:31
If you want some futuristic style RTS models, heres a goldmine!

http://forum.thegamecreators.com/?m=forum_view&t=151473&b=3&msg=1791311#m1791311

Starting from that post onwards.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 13th Aug 2010 19:14 Edited at: 13th Aug 2010 19:14
I suggest downloading the updated versions here:
http://newsfiles.thegamecreators.com/issue90/Models_Redux.rar

Would be nice to see my RTS models used in a game.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 17th Aug 2010 04:52
Just a quick update, I've started work on a level editor so i can add trees and foilage and a variable sea level. That's in the final stages really ( add trees still to be done ). I'm currently implementing pathfinding, but development might crawl to a stop due to my laptop is not exactly suited to development, and i can't get any better hardware soon.

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 8th Oct 2010 03:00
Hey guys,

I like what you're doing here. So far looking good, but I have a couple of problems for you. First, why was the last post here nearly 2 months ago? Second, on Arctic, over to the left there are some seriously flickering polys; I put it down to BlitzTerrain. Third, why is there no gui? I downloaded the version that's on the first post so it should be the latest, right?

Anyway I hope this project doesn't die (I also hope it's not dead already).

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Oct 2010 00:44 Edited at: 2nd Jul 2014 04:21
Hey thanks! I Didn't expect this thread to get revived...

Well, for the first problem, I guess thats my fault. I got slightly unmotivated by the daunting task that is pathfinding.

Secondly, yes, I imagine that is BlitzTerrain, at some point I will compile with the latest version and see if the problem is fixed.

Thirdly... There is one button to create a box lol, there will eventually be gui.

You've downloaded the latest, yes.

I wouldn't say the project is dead, just on a break

Thanks for taking the time to read this. Cya dude
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 12th Oct 2010 08:48
Hmm...I hate maths so I don't think I could manage pathfinding....you should look in the codebase. It has stuff about pathfinding there. Actually I will attach a file (I only downloaded it today and haven't looked at it yet) that has stuff about pathfinding...something about A* as well.

What is the button to create the box?

I am in the process of creating a very cool and very easy-to-use GUI system atm. It supports buttons (clickable with highlighting when mouse-over), and I have just finished (about 30 mins ago) adding support for text boxes. It will work somewhat like NGC in the way you include a file and just run custom functions. No-one seems to be able to tell me how to write DLLs for DBPro in VS C++ 2008 Express, so I haven't even tried doing it in C++ yet. I am going to experiment with C++ again today, so I might end up with a complete DLL.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.

Attachments

Login to view attachments
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Oct 2010 19:22
Quote: "Hmm...I hate maths so I don't think I could manage pathfinding....you should look in the codebase. "


If you read up, I think i've posted a link to IanM's library, if you ever want to check it out It's there, but i need to implement it. I'm even thinking of learning to write my own pathfinding functions.

Quote: "What is the button to create the box?"

If you select a unit( or more ) there should be a little picture appearing at the left side.

Good luck with your Dll, I think you should ask IanM about that too, i'm sure he'd be happy to help.

I've started to rewrite this again, with bigger maps and big armies in mind. I have plans for this, i'll keep you updated, whoever follows this thread!

Thanks

Login to post a reply

Server time is: 2024-11-24 14:40:02
Your offset time is: 2024-11-24 14:40:02