Author Topic: Crimson warfare the ti game  (Read 50639 times)

0 Members and 1 Guest are viewing this topic.

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #30 on: July 07, 2009, 02:35:52 pm »
yea summer school stinks

currently ive decided to work on the battle engine i figure once that is close to done ill start everything else again
im just having trouble (im really bad at like large equation writing) writing the equation that will check all of the units on the field that are enimies for locstion and probability of hitting them (like accuracy)

any help / ideas on how to do this would be nice

one thing i think would work is to use a list for the troops kind of built like this

L1(1) # of units on field
L1(2) unit type
L1(3) x pos
L1(4) row
L1(5) # team   (start of unit one)
L1(6) continue with L1(2) here   (start of unit 2)
L1(3) L1(3) here
and so on and so forth

what do you think
oh and
im not going to be on irc untill school next year :(
« Last Edit: July 08, 2009, 02:34:45 pm by Geekboy1011 »

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #31 on: July 07, 2009, 02:39:21 pm »
looks good, I don't really know how to help with the equation but the List setup looks great
/e

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #32 on: July 07, 2009, 02:43:00 pm »
ok thanks that means im not totally screwed up in the head

oh what would be more effective for the loop (not optiminzation wise speed wise)

while <var> <not equal to > L1(1)

or

for <var>,0,L1(1)


im having trouble figuring out wbhich would be faster?

i love the photos in the sig eeems  Gimp?
« Last Edit: July 07, 2009, 02:51:14 pm by Eeems »

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #33 on: July 07, 2009, 02:53:17 pm »
I think a while statment would make for a better loop...
and two of the photos I made with GIMP, but one {AP} made with Photoshop, thanks btw
/e

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #34 on: July 08, 2009, 02:30:55 pm »
for(n,0,L1(1)-1  ; sets troop that is being checked
3+4N ->a ;sets its xpos to a 
for(b,0,L1(1)-1 cycles through all troops
3+4b -> c stores the troops xpos in to c
if L1(5+4n)=1 ;if troop is on team 1
then
if L1(c) <= L1(a)+(L1(a-1)*4)  and L1(c) >= L1(a); if xpos less than or equal to and xpos doen not equal less than the troops location
then
if L1(c+2) = 2 ;if on the opposite team
randint(1,3
if ans=2 ; accuracy
3 -> L1(a-1+4B) ; put 3 in unit slot to signify dead/ no troop
end
end
if L1(5+4n) = 2
then
if L1(c) >= L1(a) - (L1(a-1)*4) and L1 (c) <= L1(a)
then
if L1(c+2) =1
randint(1,3
if ans = 2
3 -> L1(a-1+4B)
end
end
end
end



what do you think it is the check code for crimson
well part of it
« Last Edit: July 08, 2009, 03:06:15 pm by Geekboy1011 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Crimson warfare the ti game
« Reply #35 on: July 08, 2009, 02:46:17 pm »
mhmm I don't understand stuff like "3 -> L1(a-1)+4B". Doesn't that give an error?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Crimson warfare the ti game
« Reply #36 on: July 08, 2009, 03:00:28 pm »
Unfortunately I have trouble understanding people code and what it does, since I am more visual (screenshots) but I did some small optimizing through the code (maybe some other people could spot more advanced optimizations) and saved half a dozen of bytes:

Code: [Select]
For(n,0,L1(1)-1
3+4N ->a
for(b,0,L1(1)-1
3+4b -> c
if 1=L1(5+4n
then
if L1(c) >= L1(a) and L1(c) <= L1(a)+(4L1(a-1
then
if 2=L1(c+2
randint(1,3
if ans=2
3 -> L1(a-1+4B
end
end
if 2=L1(5+4n
then
if L1 (c) <= L1(a) and L1(c) >= L1(a) - (4L1(a-1
then
if 1=L1(c+2
randint(1,3
if ans = 2
3 -> L1(a-1+4B
end
end
end
end

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #37 on: July 08, 2009, 04:52:58 pm »
thank you dj im hope fully going to work on the rest of it tonight

still looking for suggestions on sprites and stuffs so if ur in the mood to try to draw them
post them
and if there liked or give an idea for another it will probaly get used

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Crimson warfare the ti game
« Reply #38 on: July 08, 2009, 08:20:13 pm »

L1(1) # of units on field
L1(2) unit type
L1(3) x pos
L1(4) row
L1(5) # team   (start of unit one)
L1(6) continue with L1(2) here   (start of unit 2)
L1(3) L1(3) here
and so on and so forth

what if you did this?

N : Number of troops
L1: Unit Type
L2: Row
L3: Col
L4: #team

and then each troop would be represented by a single number, and their data would be in the element corresponding to that number.

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Crimson warfare the ti game
« Reply #39 on: July 10, 2009, 01:28:13 pm »
thank you dj im hope fully going to work on the rest of it tonight

still looking for suggestions on sprites and stuffs so if ur in the mood to try to draw them
post them
and if there liked or give an idea for another it will probaly get used


what size an which objects? :o

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Crimson warfare the ti game
« Reply #40 on: July 11, 2009, 10:49:56 am »
ooops
troops are 8*8 (the tank can be longer so can planes)
buildings are 8*16  (8 high 16 long)

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Crimson warfare the ti game
« Reply #41 on: July 11, 2009, 05:33:50 pm »
I think i made some?
plane
tank
troops
sniper troops

EDIT:
how the hell can I upload pictures?

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: Crimson warfare the ti game
« Reply #42 on: July 11, 2009, 05:35:52 pm »
Use something like imageshack or some other hosting provider.
That's what she said!!!

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Crimson warfare the ti game
« Reply #43 on: July 11, 2009, 05:59:48 pm »
you can also attach them to the post...
it's under the additional options
/e

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Crimson warfare the ti game
« Reply #44 on: July 11, 2009, 06:14:52 pm »
transferred to next post
« Last Edit: July 11, 2009, 07:21:57 pm by NecroF-_-ckk »