1. Sub Commander Project (Don)
Hi Don,
I am just wondering when can we expect to see something that is
say the first draft of the program?
I was thinking that if you want you can include a location matrix
that can be used to tell where the Sub(s) and ships are located
on the globe, or even just start with a fictitious flat playing field
with 'longitude' and 'latitude' as x and y coord's.
Take care,
Al
E boa sorte com sua programacao Euphoria!
My bumper sticker: "I brake for LED's"
From "Black Knight":
"I can live with losing the good fight,
but i can not live without fighting it".
"Well on second thought, maybe not."
2. Re: Sub Commander Project (Don)
- Posted by don cole <doncole at pacb?ll.?et>
Dec 12, 2007
-
Last edited Dec 13, 2007
Al Getz wrote:
>
> Hi Don,
>
>
> I am just wondering when can we expect to see something that is
> say the first draft of the program?
>
> I was thinking that if you want you can include a location matrix
> that can be used to tell where the Sub(s) and ships are located
> on the globe, or even just start with a fictitious flat playing field
> with 'longitude' and 'latitude' as x and y coord's.
>
>
> Al
>
> E boa sorte com sua programacao Euphoria!
>
>
> My bumper sticker: "I brake for LED's"
>
-- with trace
include Win32Lib.ew
--include mywin.ew
sequence s,cen,fin,ship,stuff
integer left,top,box_width,box_height,screen_width,
screen_height,remain_width,A,B,r,bot,right,step,
ship_dir,ship_loc,yy
atom start
step=16
start=time()
s=getRect(1)
screen_width=s[3]-s[1]
screen_height=s[4]-s[2]
box_height=screen_height-54--for tab bar at bottom
box_width=box_height
remain_width=screen_width-box_width
left=remain_width/2
right=left+box_width
top=1
bot=box_height
A=floor(box_width/2)+left--x
B=floor(box_height/2) --y
cen={A,B}
r=B
constant Window1 = createEx( Window, "Window1", 0, s[1],s[2], s[3], s[4], 0, 0 )
constant Pix=createEx(Pixmap,"", 0, box_height,bot,s[3],bot,0,0 )
constant ButtonFace= rgb( #D4, #CF, #C6 )
procedure mPuts(integer id,integer col,integer row,sequence text)
setPenPos(id,col,row)
wPuts(id,text)
end procedure
function p2xy(atom r, atom a) -- polar to xy
return {r*sin(a),-r*cos(a)}
end function
function vector(sequence pt1,sequence pt2)--distance and angle from pt1 to pt2
integer dx,dy
atom r,a
dx=floor(pt2[1]-pt1[1])
dy=floor(pt2[2]-pt1[2])
r=sqrt(dx*dx+dy*dy)
if r=0 then
return {0,0}
end if
if dy<0 then
if dx<0 then
a=2*PI-arctan(dx/dy)
else
a=-arctan(dx/dy)
end if
elsif dy>0 then
a=PI-arctan(dx/dy)
else --dy=0 (one point above the other); can't use arctan formula
if dx<0 then
a=3*PI/2
else
a=PI/2
end if
end if
return {r,1800*a/PI} --convert radians to decidegrees
end function
function get_ship_dir(sequence shp)
stuff=vector(cen,shp)
return floor(stuff[2])
end function
function get_ship_dist(sequence shp)
stuff=vector(cen,shp)
return floor(stuff[1])
end function
----------------------------setup ship--------------------------------
--sub is heading do North and not moving
ship_loc=rand(r)
ship_dir=rand(3600)
ship=cen+p2xy(ship_loc,ship_dir/1800*PI) -- this the beging ship location
ship_dir=rand(3600)--the direction the ship will travel
----------------------------------------------------------------------
procedure print_info1()
mPuts(Pix,1,1,sprintf("screen_width=%d",screen_width))
mPuts(Pix,1,12,sprintf("box_width=%d",box_width))
mPuts(Pix,1,24,sprintf("remain=%d",remain_width))
mPuts(Pix,1,36,sprintf("used=%d",box_width+remain_width))
mPuts(Pix,1,48,sprintf("left=%d",left*2))
end procedure
procedure print_info2()
mPuts(Pix,1,58,sprintf("A=%d",A))
mPuts(Pix,1,70,sprintf("B=%d",B))
mPuts(Pix,1,90,sprintf("12 o'clk=%d,%d,%d,%d",{A,B,A,top}))
mPuts(Pix,1,110,sprintf("3 o'clk=%d,%d,%d,%d",{A,B,right,B}))
mPuts(Pix,1,130,sprintf("6 o'clk=%d,%d,%d,%d",{A,B,A,bot}))
mPuts(Pix,1,150,sprintf("9 o'clk=%d,%d,%d,%d",{A,B,left,B}))
mPuts(Pix,1,170,sprintf(" radius=%d",A))
-- mPuts(Pix,1,190,sprintf("circum=%d",pi*r*pi*r))
end procedure
procedure print_time()
setPenColor(Pix,ButtonFace)
drawRectangle(Pix,1,31,210,120,230)
setPenColor(Pix,Black)
mPuts(Pix,1,210,sprintf("Time=%.2f",time()-start))
end procedure
procedure print_ship_info()
setPenColor(Pix,ButtonFace)
drawRectangle(Pix,1,1,210,100,260)
setPenColor(Pix,Black)
mPuts(Pix,1,236,sprintf("s[1]=%d s[2]=%d",{ship[1],ship[2]}))
mPuts(Pix,1,246,sprintf("deg=%d
rad=%d",{get_ship_dir(ship),get_ship_dist(ship)}))
end procedure
procedure move_dot()
ship=ship+p2xy(9,ship_dir/1800*PI)
end procedure
procedure print_dot()
setPenColor(Pix,BrightWhite)
ship=floor(ship)
drawEllipse(Pix,1,ship[1]-5,ship[2]-5,ship[1]+5,ship[2]+5)
end procedure
procedure clear_dot()
if get_ship_dist(ship) < r then
setPenColor(Pix,Black)
ship=floor(ship)
drawEllipse(Pix,1,ship[1]-5,ship[2]-5,ship[1]+5,ship[2]+5)
end if
end procedure
procedure stall(atom limit)
atom stall_time,stall_start
stall_start=time()
stall_time=0
while stall_time<limit do
stall_time=time()-stall_start
end while
end procedure
procedure paint()
setPenColor( Pix, Black )
print_info1()
drawEllipse( Pix,1 ,left,0,box_width+left,box_height)
setPenColor(Pix,Red)
setPenWidth(Pix,4)
drawEllipse( Pix,0 ,left,0,box_width+left,box_height)
setPenWidth(Pix,1)
setPenColor(Pix,Yellow)
print_info2()
fin=cen+p2xy(r,3600/1800*PI)--=pre loop
while 1 do
print_ship_info()
for x=1 to 3600 by step do---- clock loop----------
setPenColor(Pix,Black)
drawLine(Pix,cen[1],cen[2],floor(fin[1]),floor(fin[2])) --1st line
fin=cen+p2xy(r,x/1800*PI)
print_ship_info()
yy=get_ship_dir(ship)
if get_ship_dist(ship)<r and yy<x+step and yy>x-step then
print_dot()
end if
setPenColor(Pix,Yellow)
drawLine(Pix,cen[1],cen[2],floor(fin[1]),floor(fin[2])) --2nd line
copyBlt(Window1,0,0,Pix)
stall(.01)
clear_dot()
end for--------------------end clock------------------------
move_dot()
print_ship_info()
end while
end procedure
procedure Window1_onPaint(integer self,integer event,sequence parms)
paint()
end procedure
setHandler( Window1, w32HPaint, routine_id("Window1_onPaint"))
setHandler( Window1, w32HOpen,routine_id("setup"))
WinMain( Window1,Normal )
Don Cole
3. Re: Sub Commander Project (Don)
Hi Don
That looks great. However, if I may up the specification stakes, could I ask
that you create a function, that takes a list of ship positions, and returns
a bitmap of the sonar with the ship positions on.
You could use a global sonar position angle to retain the sonar position
relative to the ship between one function call and the next.
A global buffer would be permissible, so the sonar could be drawn onto it, then
the display module could display it.
eg
global atom sonar_buffer, angle sonar
global function sonar(sequence ship_list)
return 0
end function
--call sonar from main game loop
sonar(ship_position_list)
--draw sonar
The media is taking longer to create - because my wife has commandeered my
computer for her business in the evening, and my children suddenly have a lot
more homework. However, in the periscope, I now have moving waves, and am
working on a view rotation effect.
Chris
4. Re: Sub Commander Project (Don)
Hi again,
I guess what i am waiting for is a full program, even a simple one,
that works at least to some degree, and uploaded to the archives.
I'll need to know what else to download to use it too, and where
to find the version needed to run with it.
When do you think this will be available?
Take care,
Al
E boa sorte com sua programacao Euphoria!
My bumper sticker: "I brake for LED's"
From "Black Knight":
"I can live with losing the good fight,
but i can not live without fighting it".
"Well on second thought, maybe not."
5. Re: Sub Commander Project (Don)
Hi
Cheez Al, patience!
Besides, I'm going to take you up on your offer of help - you can do the ship
AI (Al's AI - geddit) - evasion / fleeing, and aggression when we get to that
stage.
I'm also pondering the use of Michael Sabal's EuNet for a multiplayer
'experience' - but thats a way down the road yet.
Chris
6. Re: Sub Commander Project (Don)
- Posted by don cole <doncole at pac??ll.net>
Dec 13, 2007
-
Last edited Dec 14, 2007
Al Getz wrote:
>
> Hi again,
>
>
> I guess what i am waiting for is a full program, even a simple one,
> that works at least to some degree, and uploaded to the archives.
> I'll need to know what else to download to use it too, and where
> to find the version needed to run with it.
>
> When do you think this will be available?
>
>
> Al
>
> E boa sorte com sua programacao Euphoria!
>
>
> My bumper sticker: "I brake for LED's"
>
Hello Al,
I don't know I'm just doing the sonar part.
Don Cole
7. Re: Sub Commander Project (Don)
- Posted by don cole <doncole at pac?e?l.net>
Dec 13, 2007
-
Last edited Dec 14, 2007
ChrisBurch2 wrote:
>
> Hi Don
>
> That looks great. However, if I may up the specification stakes, could I ask
> that you create a function, that takes a list of ship positions, and returns
>
> a bitmap of the sonar with the ship positions on.
>
> You could use a global sonar position angle to retain the sonar position
> relative to the ship between one function call and the next.
>
> A global buffer would be permissible, so the sonar could be drawn onto it,
> then
> the display module could display it.
>
> eg
> }}}
<eucode>
> global atom sonar_buffer, angle sonar
>
> global function sonar(sequence ship_list)
>
> return 0
> end function
>
>
> --call sonar from main game loop
> sonar(ship_position_list)
>
> --draw sonar
>
> </eucode>
{{{
>
> The media is taking longer to create - because my wife has commandeered my
> computer for her business in the evening, and my children suddenly have a lot
> more homework. However, in the periscope, I now have moving waves, and am
> working on a view rotation effect.
>
> Chris
Hello Chris.
Looks like you need one or two more computers.
I know my little woman wants to use the computer to look-up debate results.
I say, "Debate Results" , "the election isn't till next year"!!!
I can make a function to return multiple ship positions.
As I remember the game there are only 3 windows. Keyboard: [p]-pariscope,
[s]-sonar and [m]-map. Only one screen can be shown at once. I belive the
sunmarine compass can be seen on all screens (common).
I don't understand what you mean by module?
Don Cole
8. Re: Sub Commander Project (Don)
- Posted by ChrisBurch3 <crylex at gmail?com>
Dec 13, 2007
-
Last edited Dec 14, 2007
Hi
For some reason I can't quote the reply.
But we're making it better - download what's in the archives so for, you will
see
its a re-imagining (like Battlestar Galactica), so I'm making some deviations
from the originals.
I'm using bitmap, pictures, to create the look. (sort of a Jules Verney woodeny
type aluminiumish appearence)
The modules are a core concept, so that different people can code independently
- however in order for me to gel them together, I need to specify what I want
the modules to feed to me, so that I can display / act on them - you are
doing the sonar module - so you take some ship positions and feed back a
picture of the sonar to me. CK feeds back a map to me with depths so that
the submarine has an environment to hunt in. Al, if he's interested, takes
some ship objects, does some calculations, and feeds back to me their new
positions - and so on. The modules are held in separate include files for
ease of cataloging and access.
These modules are _fairly_ independent of the graphics library, and I am
choosing to use the allegro library for the display functions. I'll upload
the most recent iteration here (at some point), because as I said before
sourceforge is a pig to use.
Chris
9. Re: Sub Commander Project (Don)
Don,
I did a little reworking on your example code.
The main change was to separate painting the screen from the updating of the
pixmap. They should be indepenant in order to process Windows messages properly.
You should only paint the screen when Windows or your program needs to. The
pixmap updating happens outside of that event. To demostrate this you can now use
the Numpad + and - keys to speed up and slow down the speed of the radar sweep.
Another change you need to do is to make the ship's movement independant of the
radar speed. In fact, to 'move the dot' you need to calculate the position of the
submarine and the position of the ship(s) based on their individual vectors and
speed then translate the difference between the vectors onto the radar scope.
Also, I've added a cheesy effect of having the 'dot' fade after the sweep.
You cold also add a grid or vector lines onto the scope's screen to aid the
player.
-- with trace
include Win32Lib.ew
--include mywin.ew
sequence s,cen,fin,ship,stuff
integer left,top,box_width,box_height,screen_width,
screen_height,remain_width,A,B,r,bot,right,step,
ship_dir,ship_loc,yy,dot_showing,ship_speed
atom start
atom pifac
sequence dot_color, dot_pos
integer radarpos radarpos = 0
atom timedelta
integer radarspeed
pifac = PI/1800
step=16
start=time()
s=getRect(Screen)
screen_width=s[3]-s[1]
screen_height=s[4]-s[2]
box_height=screen_height-54--for tab bar at bottom
box_width=box_height
remain_width=screen_width-box_width
left=remain_width/2
right=left+box_width
top=1
bot=box_height
A=floor(box_width/2)+left--x
B=floor(box_height/2) --y
cen={A,B}
r=B
dot_showing = 0
dot_color = {#000000, #001100, #002200, #003300, #004400, #005500, #006600,
#007700,
#008800, #009900, #00AA00, #00BB00, #00CC00, #00DD00, #00EE00,
#00FF00}
constant Window1 = createEx( Window, "Window1", 0, s[1],s[2], s[3], s[4], 0, 0 )
constant Pix=createEx(Pixmap,"", 0, box_height,bot,s[3],bot,0,0 )
constant ButtonFace= rgb( #D4, #CF, #C6 )
procedure mPuts(integer id,integer col,integer row,sequence text)
setPenPos(id,col,row)
wPuts(id,text)
end procedure
function p2xy(atom r, atom a) -- polar to xy
return {r*sin(a),-r*cos(a)}
end function
function vector(sequence pt1,sequence pt2)--distance and angle from pt1 to pt2
integer dx,dy
atom r,a
dx=floor(pt2[1]-pt1[1])
dy=floor(pt2[2]-pt1[2])
r=sqrt(dx*dx+dy*dy)
if r=0 then
return {0,0}
end if
if dy<0 then
if dx<0 then
a=2*PI-arctan(dx/dy)
else
a=-arctan(dx/dy)
end if
elsif dy>0 then
a=PI-arctan(dx/dy)
else --dy=0 (one point above the other); can't use arctan formula
if dx<0 then
a=3*PI/2
else
a=PI/2
end if
end if
return {r,1800*a/PI} --convert radians to decidegrees
end function
function get_ship_dir(sequence shp)
stuff=vector(cen,shp)
return floor(stuff[2])
end function
function get_ship_dist(sequence shp)
stuff=vector(cen,shp)
return floor(stuff[1])
end function
----------------------------setup ship--------------------------------
--sub is heading do North and not moving
ship_loc=rand(r)
ship_dir=rand(3600)
ship=cen+p2xy(ship_loc,ship_dir * pifac) -- this the beging ship location
ship_dir=rand(3600)--the direction the ship will travel
ship_speed=40 + rand(20)
----------------------------------------------------------------------
procedure print_info1()
mPuts(Pix,1,1,sprintf("screen_width=%d",screen_width))
mPuts(Pix,1,12,sprintf("box_width=%d",box_width))
mPuts(Pix,1,24,sprintf("remain=%d",remain_width))
mPuts(Pix,1,36,sprintf("used=%d",box_width+remain_width))
mPuts(Pix,1,48,sprintf("left=%d",left*2))
end procedure
procedure print_info2()
mPuts(Pix,1,58,sprintf("A=%d",A))
mPuts(Pix,1,70,sprintf("B=%d",B))
mPuts(Pix,1,90,sprintf("12 o'clk=%d,%d,%d,%d",{A,B,A,top}))
mPuts(Pix,1,110,sprintf("3 o'clk=%d,%d,%d,%d",{A,B,right,B}))
mPuts(Pix,1,130,sprintf("6 o'clk=%d,%d,%d,%d",{A,B,A,bot}))
mPuts(Pix,1,150,sprintf("9 o'clk=%d,%d,%d,%d",{A,B,left,B}))
mPuts(Pix,1,170,sprintf(" radius=%d",A))
-- mPuts(Pix,1,190,sprintf("circum=%d",pi*r*pi*r))
end procedure
procedure print_time()
setPenColor(Pix,ButtonFace)
drawRectangle(Pix,1,31,210,120,230)
setPenColor(Pix,Black)
mPuts(Pix,1,210,sprintf("Time=%.2f",time()-start))
end procedure
procedure print_ship_info()
sequence lTextA, lTextB
sequence lTextASize, lTextBSize
integer lTX, lTY, lTW, lTH
lTextA = sprintf("s[1]=%d s[2]=%d",{ship[1],ship[2]})
lTextASize = getTextExtent(Pix, lTextA)
lTextB = sprintf("deg=%d rad=%d,
spd=%d",{get_ship_dir(ship),get_ship_dist(ship), ship_speed})
lTextBSize = getTextExtent(Pix, lTextB)
lTX = 1
lTY = 236
if lTextASize[1] > lTextBSize[1] then
lTW = lTextASize[1]
else
lTW = lTextBSize[1]
end if
lTH = lTextASize[2] * 2
setPenColor(Pix,ButtonFace)
drawRectangle(Pix,1, lTX, lTY - lTextASize[2], lTX + lTW + 10 , lTY + lTH * 2)
setPenColor(Pix,Black)
mPuts(Pix,lTX, lTY, lTextA)
mPuts(Pix,lTX, lTY + lTH, lTextB)
end procedure
procedure move_dot()
ship=ship+p2xy(9,ship_dir * pifac)
end procedure
procedure clear_dot()
if dot_showing > 1 then
dot_showing -= 1
setPenColor(Pix, dot_color[dot_showing])
ship=floor(ship)
drawEllipse(Pix,1,dot_pos[1], dot_pos[2], dot_pos[3],dot_pos[4])
end if
end procedure
with trace
procedure print_dot()
integer prob
if dot_showing > 1 then
dot_showing = 2
clear_dot()
end if
-- Calculate probabilty of seeing ship depending on radar speed.
-- The faster the radar the less likely to see the ship.
-- Speed 1 (slowest) --> probability: 105%
-- Speed 300 (fastest) --> probability: 10%
prob = 301 - radarspeed
prob = floor(power(prob,3)/200000-(power(prob,2))/416+prob/1.7+10)
if rand(100) >= prob then
return
end if
setPenColor(Pix, dot_color[$])
ship=floor(ship)
dot_pos = {ship[1]-5,ship[2]-5,ship[1]+5,ship[2]+5}
drawEllipse(Pix, 1, dot_pos[1], dot_pos[2], dot_pos[3],dot_pos[4])
dot_showing = length(dot_color) + 1
end procedure
procedure UpdateRadar()
sequence lNewFin
atom lNewTime
-- Only update the screen every 100th of a second.
lNewTime = time()
if lNewTime - timedelta < 0.01
then return
end if
timedelta = lNewTime
if dot_showing > 0 then
clear_dot()
end if
lNewFin = floor(cen+p2xy(r,radarpos * pifac) )
radarpos += radarspeed
if compare(lNewFin, fin) = 0 then
return
end if
if radarpos <= radarspeed then
print_ship_info()
end if
setPenColor(Pix,Black)
drawLine(Pix,cen[1],cen[2], fin[1], fin[2]) --1st line
print_ship_info()
fin = lNewFin
if get_ship_dist(ship) < r then
yy = get_ship_dir(ship)
if yy <= radarpos + radarspeed then
if yy >= radarpos - radarspeed then
print_dot()
end if
end if
end if
setPenColor(Pix,Yellow)
drawLine(Pix, cen[1], cen[2], fin[1], fin[2]) --2nd line
repaintFG(Window1)
if radarpos >= 3600 then
move_dot()
radarpos = 0
end if
end procedure
setHandler( Window1, w32HTimer, routine_id("Window1_onTimer"))
procedure Window1_onPaint(integer self,integer event,sequence parms)
copyBlt(Window1,0,0,Pix)
end procedure
setHandler( Window1, w32HPaint, routine_id("Window1_onPaint"))
procedure Window1_onKeyDown(integer self,integer event,sequence parms)
if parms[1] = VK_ADD then -- Numpad +
-- Increase radar speed by 25%
radarspeed += floor(radarspeed * 0.25) + 1
if radarspeed > 300 then
radarspeed = 300
end if
elsif parms[1] = VK_SUBTRACT then -- Numpad -
-- Decrease radar speed by 25%
radarspeed -= floor(radarspeed * 0.25) + 1
if radarspeed < 1 then
radarspeed = 1
end if
end if
end procedure
setHandler( Window1, w32HKeyDown, routine_id("Window1_onKeyDown"))
procedure setup(integer self,integer event,sequence parms)
setPenColor( Pix, Black )
print_info1()
drawEllipse( Pix,1 ,left,0,box_width+left,box_height)
setPenColor(Pix,Red)
setPenWidth(Pix,4)
drawEllipse( Pix,0 ,left,0,box_width+left,box_height)
setPenWidth(Pix,1)
setPenColor(Pix,Yellow)
print_info2()
fin = floor(cen+p2xy(r,3600 * pifac))--=pre loop
timedelta = time()
radarspeed = 40
while getControlInfo(self, CONTROLINFO_closed) != 1 do
doEvents(0)
UpdateRadar()
end while
end procedure
setHandler( Window1, w32HActivate,routine_id("setup"))
WinMain( Window1,Normal )
--
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell
10. Re: Sub Commander Project (Don)
Derek Parnell wrote:
>
> Don,
> I did a little reworking on your example code.
>
> The main change was to separate painting the screen from the updating of the
> pixmap. They should be indepenant in order to process Windows messages
> properly.
> You should only paint the screen when Windows or your program needs to. The
> pixmap updating happens outside of that event. To demostrate this you can now
> use the Numpad + and - keys to speed up and slow down the speed of the radar
> sweep.
>
> Another change you need to do is to make the ship's movement independant of
> the radar speed. In fact, to 'move the dot' you need to calculate the position
> of the submarine and the position of the ship(s) based on their individual
> vectors
> and speed then translate the difference between the vectors onto the radar
> scope.
>
>
> Also, I've added a cheesy effect of having the 'dot' fade after the sweep.
>
> You cold also add a grid or vector lines onto the scope's screen to aid the
> player.
><snip>
> --
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell
You've just been added to The Sub Commander Project's list of contributors
Chris
11. Re: Sub Commander Project (Don)
Derek Parnell wrote:
>
> Don,
> I did a little reworking on your example code.
>
> The main change was to separate painting the screen from the updating of the
> pixmap. They should be indepenant in order to process Windows messages
> properly.
> You should only paint the screen when Windows or your program needs to. The
> pixmap updating happens outside of that event. To demostrate this you can now
> use the Numpad + and - keys to speed up and slow down the speed of the radar
> sweep.
>
> Another change you need to do is to make the ship's movement independant of
> the radar speed. In fact, to 'move the dot' you need to calculate the position
> of the submarine and the position of the ship(s) based on their individual
> vectors
> and speed then translate the difference between the vectors onto the radar
> scope.
>
>
> Also, I've added a cheesy effect of having the 'dot' fade after the sweep.
>
Actually I did that with 8 shades of gray, but took it out as it seemed to be to
much.
I haven't tried you upgraded code yet, but will.
Thanks Derek.
> You cold also add a grid or vector lines onto the scope's screen to aid the
> player.
>
[snip]
12. Re: Sub Commander Project (Don)
ChrisBurch3 wrote:
>
>
> Hi
>
> For some reason I can't quote the reply.
>
> But we're making it better - download what's in the archives so for, you will
> see
> its a re-imagining (like Battlestar Galactica), so I'm making some deviations
> from the originals.
>
> I'm using bitmap, pictures, to create the look. (sort of a Jules Verney
> woodeny
> type aluminiumish appearence)
>
> The modules are a core concept, so that different people can code
> independently
> - however in order for me to gel them together, I need to specify what I want
>
> the modules to feed to me, so that I can display / act on them - you are
> doing the sonar module - so you take some ship positions and feed back a
> picture of the sonar to me. CK feeds back a map to me with depths so that
> the submarine has an environment to hunt in. Al, if he's interested, takes
> some ship objects, does some calculations, and feeds back to me their new
> positions - and so on. The modules are held in separate include files for
> ease of cataloging and access.
>
> These modules are _fairly_ independent of the graphics library, and I am
> choosing to use the allegro library for the display functions. I'll upload
> the most recent iteration here (at some point), because as I said before
> sourceforge is a pig to use.
>
> Chris
Hello Chris,
Looks like I have to download Allegro and euallegro ffor study.
Don Cole
13. Re: Sub Commander Project (Don)
Derek Parnell wrote:
>
> Don,
> I did a little reworking on your example code.
>
Thank again Derek,
I was looking for this kind of feedback because I thought there must be a better
way. I did this in a hurry for Al.
Don Cole
14. Re: Sub Commander Project (Don)
ChrisBurch3 wrote:
>
> Hi
>
> Cheez Al, patience!
>
> Besides, I'm going to take you up on your offer of help - you can do the ship
> AI (Al's AI - geddit) - evasion / fleeing, and aggression when we get to that
> stage.
>
> I'm also pondering the use of Michael Sabal's EuNet for a multiplayer
> 'experience' - but thats a way down the road yet.
>
> Chris
Hi Chris,
I guess you missed my post where i stated that i would work as a
debugger and not really anymore as a code contributor, but if it
goes well and i see something that i think i can add that doesnt
take too long i'll surely add it in.
What i need though is a list of required support programs/source code
and where to download the correct version(s) for the Sub Commander
project files to run. As of now i still dont have that list so if
you could provide that that would be nice. I'd like to try to run
the code posted so far and i guess i can do that as soon as i know
what i need to go with it. I guess it requires WinLib for example?
What version and where to get the required source code?
Take care,
Al
E boa sorte com sua programacao Euphoria!
My bumper sticker: "I brake for LED's"
From "Black Knight":
"I can live with losing the good fight,
but i can not live without fighting it".
"Well on second thought, maybe not."
15. Re: Sub Commander Project (Don)
- Posted by don cole <doncole at pacb?l?.net>
Dec 14, 2007
-
Last edited Dec 15, 2007
ChrisBurch3 wrote:
>
>
> Hi
>
> For some reason I can't quote the reply.
>
> But we're making it better - download what's in the archives so for, you will
> see
> its a re-imagining (like Battlestar Galactica), so I'm making some deviations
> from the originals.
>
> I'm using bitmap, pictures, to create the look. (sort of a Jules Verney
> woodeny
> type aluminiumish appearence)
>
> The modules are a core concept, so that different people can code
> independently
> - however in order for me to gel them together, I need to specify what I want
>
> the modules to feed to me, so that I can display / act on them - you are
> doing the sonar module - so you take some ship positions and feed back a
> picture of the sonar to me. CK feeds back a map to me with depths so that
> the submarine has an environment to hunt in. Al, if he's interested, takes
> some ship objects, does some calculations, and feeds back to me their new
> positions - and so on. The modules are held in separate include files for
> ease of cataloging and access.
>
> These modules are _fairly_ independent of the graphics library, and I am
> choosing to use the allegro library for the display functions. I'll upload
> the most recent iteration here (at some point), because as I said before
> sourceforge is a pig to use.
>
> Chris
Hello again Chris.
When I run your SubmaineCommader Program from the archives I get "can't find
euallegro.ew". And I can't, not in the archives anyway.
Don Cole
16. Re: Sub Commander Project (Don)
- Posted by ChrisBurch3 <crylex at gma?l.?om>
Dec 14, 2007
-
Last edited Dec 15, 2007
Al Getz wrote:
>
> ChrisBurch3 wrote:
> >
> > Hi
> >
> > Cheez Al, patience!
> >
> > Besides, I'm going to take you up on your offer of help - you can do the
> > ship
> > AI (Al's AI - geddit) - evasion / fleeing, and aggression when we get to
> > that
> > stage.
> >
> > I'm also pondering the use of Michael Sabal's EuNet for a multiplayer
> > 'experience' - but thats a way down the road yet.
> >
> > Chris
>
>
> Hi Chris,
>
>
> I guess you missed my post where i stated that i would work as a
> debugger and not really anymore as a code contributor, but if it
> goes well and i see something that i think i can add that doesnt
> take too long i'll surely add it in.
>
Chicken! (heh heh) Actually, no I didn't miss the post - just teasing.
Contribute as much as you feel able to. No pressure here, but equally, it
shall be done when its done!
> What i need though is a list of required support programs/source code
> and where to download the correct version(s) for the Sub Commander
> project files to run. As of now i still dont have that list so if
> you could provide that that would be nice. I'd like to try to run
> the code posted so far and i guess i can do that as soon as i know
> what i need to go with it. I guess it requires WinLib for example?
> What version and where to get the required source code?
>
Doesn't use win32lib. Using the euallegro 0.3 library, all courtesy
of Ray Smith (sadly departed from the eu community).
I'm going to re upload the package, including an allegro help file (very
useful), all the demos, and the example games. Because I don't like
sourceforge (too stupid to use it). Anyone who wants to write quick and simple
games should look no further than euallegro, or the sdl libraries. (personal
opinion - euallegro is the simpler of the two)
euallegro is not complete, but complete enough to do everything most people
would need it to do.
Chris
>
> Al
>
> E boa sorte com sua programacao Euphoria!
>
>
> My bumper sticker: "I brake for LED's"
>
17. Re: Sub Commander Project (Don)
- Posted by ChrisBurch3 <crylex at gma?l?com>
Dec 14, 2007
-
Last edited Dec 15, 2007
don cole wrote:
>
> ChrisBurch3 wrote:
> >
> >
> > Hi
> >
> > For some reason I can't quote the reply.
> >
> > But we're making it better - download what's in the archives so for, you
> > will
> > see
> > its a re-imagining (like Battlestar Galactica), so I'm making some
> > deviations
> > from the originals.
> >
> > I'm using bitmap, pictures, to create the look. (sort of a Jules Verney
> > woodeny
> > type aluminiumish appearence)
> >
> > The modules are a core concept, so that different people can code
> > independently
> > - however in order for me to gel them together, I need to specify what I
> > want
> >
> > the modules to feed to me, so that I can display / act on them - you are
> > doing the sonar module - so you take some ship positions and feed back a
> > picture of the sonar to me. CK feeds back a map to me with depths so that
> > the submarine has an environment to hunt in. Al, if he's interested, takes
> > some ship objects, does some calculations, and feeds back to me their new
> > positions - and so on. The modules are held in separate include files for
> > ease of cataloging and access.
> >
> > These modules are _fairly_ independent of the graphics library, and I am
> > choosing to use the allegro library for the display functions. I'll upload
> > the most recent iteration here (at some point), because as I said before
> > sourceforge is a pig to use.
> >
> > Chris
>
> Hello again Chris.
>
> When I run your SubmaineCommader Program from the archives I get "can't find
> euallegro.ew". And I can't, not in the archives anyway.
>
>
> Don Cole
Hi Don
See last reply
Chris
18. Re: Sub Commander Project (Don)
ChrisBurch3 wrote:
>
> Al Getz wrote:
> >
> > ChrisBurch3 wrote:
> > >
> > > Hi
> > >
> > > Cheez Al, patience!
> > >
> > > Besides, I'm going to take you up on your offer of help - you can do the
> > > ship
> > > AI (Al's AI - geddit) - evasion / fleeing, and aggression when we get to
> > > that
> > > stage.
> > >
> > > I'm also pondering the use of Michael Sabal's EuNet for a multiplayer
> > > 'experience' - but thats a way down the road yet.
> > >
> > > Chris
> >
> >
> > Hi Chris,
> >
> >
> > I guess you missed my post where i stated that i would work as a
> > debugger and not really anymore as a code contributor, but if it
> > goes well and i see something that i think i can add that doesnt
> > take too long i'll surely add it in.
> >
> Chicken! (heh heh) Actually, no I didn't miss the post - just teasing.
> Contribute as much as you feel able to. No pressure here, but equally, it
> shall be done when its done!
>
> > What i need though is a list of required support programs/source code
> > and where to download the correct version(s) for the Sub Commander
> > project files to run. As of now i still dont have that list so if
> > you could provide that that would be nice. I'd like to try to run
> > the code posted so far and i guess i can do that as soon as i know
> > what i need to go with it. I guess it requires WinLib for example?
> > What version and where to get the required source code?
> >
>
> Doesn't use win32lib. Using the euallegro 0.3 library, all courtesy
> of Ray Smith (sadly departed from the eu community).
>
> I'm going to re upload the package, including an allegro help file (very
> useful), all the demos, and the example games. Because I don't like
> sourceforge (too stupid to use it). Anyone who wants to write quick and simple
> games should look no further than euallegro, or the sdl libraries. (personal
> opinion - euallegro is the simpler of the two)
>
> euallegro is not complete, but complete enough to do everything most people
>
> would need it to do.
>
> Chris
>
> >
> > Al
> >
> > E boa sorte com sua programacao Euphoria!
> >
> >
> > My bumper sticker: "I brake for LED's"
> >
Hi again,
Doesnt use WinLib? Well Don's code seems to use it right?
Take care,
Al
E boa sorte com sua programacao Euphoria!
My bumper sticker: "I brake for LED's"
From "Black Knight":
"I can live with losing the good fight,
but i can not live without fighting it".
"Well on second thought, maybe not."
19. Re: Sub Commander Project (Don)
ChrisBurch3 wrote:
>
> Doesn't use win32lib. Using the euallegro 0.3 library, all courtesy
> of Ray Smith (sadly departed from the eu community).
You should use Mark Akita's SDL package. AWESOME!
20. Re: Sub Commander Project (Don)
Al Getz wrote:
> Hi again,
>
> Doesnt use WinLib? Well Don's code seems to use it right?
>
>
> Al
>
> E boa sorte com sua programacao Euphoria!
>
>
> My bumper sticker: "I brake for LED's"
>
And
ChrisBurch3 wrote:
>
> Doesn't use win32lib. Using the euallegro 0.3 library, all courtesy
> of Ray Smith (sadly departed from the eu community).
>You should use Mark Akita's SDL package. AWESOME!
Heh heh - I knew this would happen!
I've set the specs back at the beginning. No one else needs to handle any
display issues. You can use your own display handling libs to test your
code, but what I want back is clearly defined - I'll do the rest. (which I'm
quite happy to do)
Yes Mark's SDL lib is awesome - but I'm more familiar with allegro, and I
wanted to explore it further - it's a very capable library.
Yes, Don's code uses win32 lib - but allegro doesn't need to, and I'm
not using win32 lib (nothing against it - it also is awesome).
So by all means use win32lib to test your algorithms,
as long as I can have the modules feed back what I want, then thats the specs
fulfilled.
This is beginning to sound like some commercial boss manager thing - its meant
to be a bit of spare cycle fun (honest, I'm writing this with a big smile
on my face)
So, to re iterate, the game is not, at the moment, going to use win32lib, or
SDL. And we are going to have fun.
Chris
21. Re: Sub Commander Project (Don)
ChrisBurch3 wrote:
>
> And we are going to have fun.
Or else.
Matt