freebasic.net Forum Index
FreeBASIC's Official Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in

rts: The Fallen Lands of Old
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    freebasic.net Forum Index -> Projects
View previous topic :: View next topic  
Author Message
inded005

PostPosted: Feb 15, 2007 11:52    Post subject: rts: The Fallen Lands of Old Reply with quote

Hey everyone, just bumping my thread again, letting
you know this project is still going, looking for help / interest,
that's what the Projects section is for right?

Anyway, I've added network gaming, fog-of-war, mini-map, an AI framework,
cache system, scripting language for mission files, myriad of
bug fixes along with new bugs, UI improvements, ... artwork
the list continues... have a look over at sourceforge
https://sourceforge.net/projects/fbtfloo/
Post any feedback either in this thread, the project forums at sf,
or email me. (You'll find my email in the readme.txt when you
download version 0.4, which is about 3 MB -- sorry people on dialup.)


original first post:
Quote:

This is the fruit of my labour for the uni holidays... sadly it has nothing on Dr_D's kart game :S
The thing i'm most proud of is the unit pathfinding...
check it out...
http://sourceforge.net/projects/fbtfloo/
The download does not include sounds... It's not really even beta-stage yet.
It only includes a little source code too
feedback is encouraged (i guess thats the whole reason i posted this ey?)


I'm using BASS for sound, fbgfx for ... graphics. um, WIN32
Supports 3 different resolutions.
Testing on XPsp2
Written using fbEdit (which rocks)
EDIT: now hosted at sf


Last edited by inded005 on Oct 07, 2007 11:55; edited 3 times in total
 
Back to top
View user's profile Visit poster's website MSN Messenger
Deleter
Master
PostPosted: Feb 15, 2007 22:51    Post subject: Reply with quote

very nice start =). Only thing i noticed was that the units dont unselect when you unselect them ;). Keep up the good work!
 
Back to top
View user's profile
Eclipzer
Sr. Member
PostPosted: Feb 16, 2007 4:22    Post subject: Reply with quote

Mind posting some screen shots?

-Eclipzer
www.eclipzer.com
 
Back to top
View user's profile Send e-mail Visit poster's website AIM Address
inded005

PostPosted: Feb 16, 2007 12:28    Post subject: Reply with quote

yep that selection thing was just a minor hack; i've done it properly now.
EDIT:
Click the thumbnail on this page for more Screenshots:
http://sourceforge.net/projects/fbtfloo/


Last edited by inded005 on Jul 25, 2007 23:52; edited 1 time in total
 
Back to top
View user's profile Visit poster's website MSN Messenger
inded005

PostPosted: Feb 19, 2007 7:48    Post subject: Reply with quote

Hi,
i'm wondering what you people reckon the most efficient way of checking if one unit is in range of another would be? I need this to allow archers/towers/etc to fire automatically whenever an enemy comes in their range.
The obvious way is to check the distance between the current unit and every other enemy unit, but that would get very,extremely slow, especially if using the distance formula... (and esp considering max units is ~250 atm.)
The list of units is resorted (by Y value) about every second, if that helps?

also added:
flexible animation system (need sprites :( !!)
garrisoning
unit-to-unit training
skill crowns
 
Back to top
View user's profile Visit poster's website MSN Messenger
arenth
Sr. Member
PostPosted: Feb 19, 2007 9:20    Post subject: Reply with quote

divide your map into a grid, whenever you update unit location, update their position in the grid, check all units within a segment against each other.
 
Back to top
View user's profile
thesanman112
Sr. Member
PostPosted: Feb 19, 2007 16:15    Post subject: hmmm Reply with quote

the most accurate way is to use a distance calculation with the sqr function..

distance=Sqr((x-playerx)^2+(y-playery)^2)

if you want to speed things up.. only check the ones that are either -20 or +20 in grid terms around a specific point or player...so do a quick sort or check and weed out others,, OR....at draw time, flag items that are within the - and + scope of grid.
 
Back to top
View user's profile
Dr_D
Hero
PostPosted: Feb 19, 2007 23:08    Post subject: Reply with quote

Sometimes people forget that you can check for proximity without taking the square root. It just becomes a habit after a while, I think. I made a little demo that's kinda like what I use it for stuff that needs to be fast. If you need more advanced calculations, just take the square root after you have determined that they are within range of each other. Looks like this should be a really fun game, btw. ;)

Code:
#include "fbgfx.bi"

ScreenRes 640,480,8,2
ScreenSet(0,1)

Type Vector2D
     x As Single
     y As Single
End Type

Type Chars
    position    As vector2d
    radius      As Single
End Type

Dim As Chars p, c
c.position = Type<Vector2D>(320,240)
c.radius = 75
p.position = Type<Vector2D>(320,154)
p.radius = 10


Do
    If Multikey(FB.SC_UP) Then
        p.position.y-=1
    End If
   
    If Multikey(FB.SC_DOWN) Then
        p.position.y+=1
    End If
   
    If Multikey(FB.SC_LEFT) Then
        p.position.x-=1
    End If
   
    If Multikey(FB.SC_RIGHT) Then
        p.position.x+=1
    End If
   
    Cls
    Circle(p.position.x, p.position.y),p.radius,14
    Circle(c.position.x, c.position.y),c.radius,31
    If (p.position.y - c.position.y)^2 + (p.position.x - c.position.x)^2 <= (c.radius + p.radius)^2 Then
        Locate 1,1
        Print "Circles are intersecting."
    End If 
       
    screensync
    Sleep 1
    Flip
Loop Until multikey(FB.SC_ESCAPE)
 
Back to top
View user's profile Visit poster's website
relsoft
Master
PostPosted: Feb 20, 2007 3:02    Post subject: Reply with quote

Looks ace!!!

Yeah, what DR.D zed.
 
Back to top
View user's profile Visit poster's website Yahoo Messenger
inded005

PostPosted: Feb 20, 2007 7:43    Post subject: Reply with quote

thanks people
(esp. Dr_d)
ah yes, I'm beginning to recall gr10 maths!! :o
and, i didn't know about THIS....
c.position = Type<Vector2D>(320,240)
that trick will prove useful
*Unlpugs dialup, curses it to hell, trudges off to work on arrow trajectory*
 
Back to top
View user's profile Visit poster's website MSN Messenger
inded005

PostPosted: Feb 21, 2007 10:35    Post subject: Reply with quote

* buildings can be built, requires different materials to be dropped off
* bow + arrows. no false trajectory though. archery skill + crown
* xp/skill levels affect most tasks
* individual inventories have smaller icons and different slot types
* units take paths around buildings, but they aren't solid
* heaps of bug fixes
* uploaded entire source code to ....
[url]http://members.dodo.com.au/pklanham/src.zip [/url]

- cant work out why unit sprites don't draw when near edge of the screen
 
Back to top
View user's profile Visit poster's website MSN Messenger
inded005

PostPosted: Jul 24, 2007 13:05    Post subject: Reply with quote

This project is now listed at
http://sourceforge.net/projects/fbtfloo/
Download the game, the code, join the project...
 
Back to top
View user's profile Visit poster's website MSN Messenger
badmrbox
Sr. Member
PostPosted: Jul 24, 2007 18:25    Post subject: Reply with quote

Hm, I downloaded it and hoped to be able to see something ingame. Yet the only thing I saw was some bmp's loading and the main screen. When I clicked any key the whole thing shut down.
 
Back to top
View user's profile Visit poster's website
Lachie Dazdarian
Master
PostPosted: Jul 24, 2007 21:44    Post subject: Reply with quote

7 MB?!? Gah, this will take a while.

I'm glad you are using fbgfx, which means I'll be able to play the game on my ancient machine from the lands of old. :P

BTW, what happened to Cadisman?

EDIT: The game shut down/crashed with me too, after the main menu. I can't tell you what error message I get, since all windows close. It takes ages for the game to initiate on my PC. I doubt this is really necessary, but what do I know?
 
Back to top
View user's profile Send e-mail Visit poster's website
notthecheatr
Master
PostPosted: Jul 24, 2007 22:37    Post subject: Reply with quote

I'll take a look at it...
 
Back to top
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    freebasic.net Forum Index -> Projects All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



sf.net phatcode