Author Topic: The resistance  (Read 5021 times)

0 Members and 1 Guest are viewing this topic.

Offline MSR5

  • LV3 Member (Next: 100)
  • ***
  • Posts: 56
  • Rating: +0/-1
    • View Profile
The resistance
« on: November 29, 2007, 04:18:00 pm »
I am (after learning how to use xlib) making a RPG.  It is based in the year 2132, 5 years after Earth is invaded and humanity is enslave.  This RPG circles around 3 people in the underground revolution trying to free humanity. It will be like ROL3 but much faster, no magic, non-liner plot, and futuristic wepons. Right now I have 10% of the battle engin, but I am having troble with the menu(not the one using the menu function) :banghead:banghead.gif , is it posible that I can get some help for the possible programing of it.  Otherwise I will have a thermal nuclear meltdown in my head at my frusteration of trying to program it. :grr:mad.gif:flame:tresfache.gif
if everything goes ok I will be able to get pictures uploaded of the game play, but no promises
Shinism shall dominate modern day society.  With your support the Shinist revolution can happen.  PM me for information.

Offline Speler

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 857
  • Rating: +6/-2
    • View Profile
The resistance
« Reply #1 on: November 29, 2007, 04:23:00 pm »
This can help you with your menus: http://tibasicdev.wikidot.com/custommenus

Sounds like a great project, I hope you have fun!

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
The resistance
« Reply #2 on: November 29, 2007, 04:57:00 pm »
I wouldn't mind helping since it's basic + xLIB. Just let me know what to do.
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Offline nitacku

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 300
  • Rating: +30/-1
  • ni-ta-ku ^_^
    • View Profile
The resistance
« Reply #3 on: November 29, 2007, 05:11:00 pm »
I'm pretty good at graphics using xLIB, so just let me know what you need ;)wink.gif

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
The resistance
« Reply #4 on: November 29, 2007, 06:27:00 pm »
wow I don't see nitacku much anymore those days o.oblink.gif.

ANyway this will be kinda sci-fi like ROL3, right? I am curious about what you will come up with :)smile.gif

Offline MSR5

  • LV3 Member (Next: 100)
  • ***
  • Posts: 56
  • Rating: +0/-1
    • View Profile
The resistance
« Reply #5 on: November 30, 2007, 12:49:00 pm »
yes this will be like a sci-fi ROL3
anyway
how do you post images?
and after working for an hour i came up with this as the first part of the menu

also if part of the program has (...)* it means that i could not use or mimic the right symble

:real(0
:real(1,1,0,4,15,1,0,45,3,0,0,1
:real(1,1,16,4,11,1,0,34,3,0,0,1
:real(1,0,32,4,11,1,4,45,3,0,0,1
:real(1,0,48,4,12,1,4,33,3,0,0,1
:-11->X
:25->Y
:Lbl 1
:->A
Pt-on(X,Y,2
:If A (not equal)* 34
:Then
:Goto 2
:Else
:Y-16->Y
:If  Y<-23
:Then
:25->Y
Pt-Off(-54125+11,-23,2
:Goto 1
:Else
Pt-Off(x,(y+16),2
:Goto 1
:Lbl 2
:If A(does not equal) 25
:Then
:Goto 3
:Else
:Y+16->Y
:If Y>25
:Then
:-23->Y
Pt-Off(-54125+11,25,2
:Goto 1
:Else
Pt-Off(X,(Y-16),2
:Goto 1
:Lbl 3
:If A(does not equal)*105
:Then
:Goto 1
:Else
:prgmAA2

please if posible optimize theis since my brain is not working at the moment  :???:confus.gif
Shinism shall dominate modern day society.  With your support the Shinist revolution can happen.  PM me for information.

vuurrobin

  • Guest
The resistance
« Reply #6 on: November 30, 2007, 01:38:00 pm »
there are a lot of if-then statements, but no ends O_Oshocked2.gif

don't put goto inside a if-then statement, they cause memory leaks.

Offline MSR5

  • LV3 Member (Next: 100)
  • ***
  • Posts: 56
  • Rating: +0/-1
    • View Profile
The resistance
« Reply #7 on: November 30, 2007, 01:41:00 pm »
any other ideas?
Shinism shall dominate modern day society.  With your support the Shinist revolution can happen.  PM me for information.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
The resistance
« Reply #8 on: November 30, 2007, 04:13:00 pm »
QuoteBegin-MSR5+30 Nov, 2007, 18:49-->
QUOTE (MSR5 @ 30 Nov, 2007, 18:49)
how do you post images?

QuoteBegin-MSR5+30 Nov, 2007, 18:49
-->
QUOTE (MSR5 @ 30 Nov, 2007, 18:49)
how do you post images?

Upload your image to a host (I like http://imageshack.us, but others like photobucket), after uploading you can make a post containing the following:
c1
-->
CODE
ec1
also imageshack will have other options to post larger images as thumbnails that will show full if clicked on.c2
ec2

vuurrobin

  • Guest
The resistance
« Reply #9 on: December 01, 2007, 03:01:00 am »
QUOTE
:->A


I asume that should be getkey->A

second, look http://tibasicdev.wikidot.com/controlflow#toc7 and learn how to use loops like while and repeat. also learn how to use boolean logic, you are going to need them.


since there isn't an animation or grayscale picture or anything when you wait for the user to press a key, you can put that in a loop so key detection will be faster.

:repeat ans
:getkey->A
:end


instead of checking if the user didn't press a key, you should check if he/she did press that key.

so this:

c1
-->
CODE
ec1:If A (not equal)* 34
:Then
:Goto 2
:Else
:Y-16->Y
:If Y<-23
:Then
:25->Y
Pt-Off(-54125+11,-23,2
:Goto 1
:Else
Pt-Off(x,(y+16),2
:Goto 1c2
ec2

can become this

c1
-->
CODE
ec1if A=34
then
Y-16->Y
If ans<-23
Then
25->Y
Pt-Off(-54125+11,-23,2
Else
Pt-Off(x,y+16,2
end
endc2
ec2

you can do the same for when the user presses up.


since you want the menu to keep running until the user presses [enter], you can use a repeat loop for that.


c1
-->
CODE
ec1
repeat A=105

menu code

end

code for if the user has pressed [enter]c2
ec2


since repeat will always be executed at least once, we don't have to worry about what value A is when it enters the loop.


so the code currently looks like this:

c1
-->
CODE
ec1
real(0
real(1,1,0,4,15,1,0,45,3,0,0,1
real(1,1,16,4,11,1,0,34,3,0,0,1
real(1,0,32,4,11,1,4,45,3,0,0,1
real(1,0,48,4,12,1,4,33,3,0,0,1
-11->X
25->Y
repeat A=105
Pt-on(X,Y,2
repeat ans
getkey->A
end
if A=34
then
Y-16->Y
If ans<-23
Then
25->Y
Pt-Off(-54125+11,-23,2
Else
Pt-Off(x,y+16,2
end
end
if A=25
then
Y+16->Y
If ans>25
Then
-23->Y
Pt-Off(-54125+11,25,2
Else
Pt-Off(x,y-16,2
end
end
end
prgmAA2c2
ec2

it can still be optimised some more (mainly using boolean logic) but make sure that you understand this and that you can use it. there is no need to rush it ;)wink.gif

good luck with this  :)smile.gif



Offline MSR5

  • LV3 Member (Next: 100)
  • ***
  • Posts: 56
  • Rating: +0/-1
    • View Profile
The resistance
« Reply #10 on: December 01, 2007, 03:17:00 am »
Thanks this helps with some of the problems
Shinism shall dominate modern day society.  With your support the Shinist revolution can happen.  PM me for information.

Liazon

  • Guest
The resistance
« Reply #11 on: December 01, 2007, 11:04:00 am »
yay for more RPGs!

Offline MSR5

  • LV3 Member (Next: 100)
  • ***
  • Posts: 56
  • Rating: +0/-1
    • View Profile
The resistance
« Reply #12 on: December 01, 2007, 02:41:00 pm »
thanks for the enthusiasm, but it would be nice if everyone could contribute also like vuurrobin did
Shinism shall dominate modern day society.  With your support the Shinist revolution can happen.  PM me for information.

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
The resistance
« Reply #13 on: December 01, 2007, 06:51:00 pm »
well I try to contribute whenever I can or have the time, but when I can I at least give some feedback  

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
The resistance
« Reply #14 on: December 01, 2007, 06:53:00 pm »
You could also give us some more code to try to optimize..

EDIT: Here is vuurrobin's code a little more optimized.

c1-->
CODE
ec1real(0
real(1,1,0,4,15,1,0,45,3,0,0,1
real(1,1,16,4,11,1,0,34,3,0,0,1
real(1,0,32,4,11,1,4,45,3,0,0,1
real(1,0,48,4,12,1,4,33,3,0,0,1
-11->X
25->Y
Repeat A=105
Pt-on(X,Ans,2
repeat max(Ans={25,34,105
getkey->A
End
Pt-Off(X,Y,2
Y-16(A=34)+16(A=25
Ans+32(Ans<23)-32(Ans>25->Y
End
prgmAA2c2
ec2
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)