Author Topic: Level creating?  (Read 10945 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Level creating?
« Reply #15 on: November 12, 2010, 05:02:45 pm »
I think SourceCoder can also convert images, now.

Oh, yeah, that too. It's the same uploader. It converts an image file into a calc version, which you can view as .dbs, as hex (for Axe), and as Pic2.8xi.




Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Level creating?
« Reply #16 on: November 27, 2010, 01:40:16 pm »
*bump*
« Last Edit: November 27, 2010, 01:40:51 pm by aeTIos »
I'm not a nerd but I pretend:

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Level creating?
« Reply #17 on: November 27, 2010, 03:42:59 pm »
alright well.. i read through this topic but i still don't know what you're trying to do, besides create a level (which is too general).

-what's its height?
-what's its width?
-how many tiles are there?
-is this a level editor?
-does it need to smoothscroll, or can it scroll by tiles?
-are there any "special" tiles that correspond with each other?

or am i completely off base?

« Last Edit: November 27, 2010, 03:46:31 pm by nemo »


Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Level creating?
« Reply #18 on: November 28, 2010, 12:09:45 am »
the code is not complete, there is a part missing that:
-has to let the object being disappeared if x<3 so X=1,2
-it should make that the other objects stay displayed, and the data position of their data in L1 should be moved forward if a object disappears, such as
Code: [Select]
For(A,1,{L1+0}
{L1+1+A+2}=>{L1+1+A}
A+1=>A
End
But that doesnt work, then all objects disappear :(

If you know a solution, plz post the code





Hmm, what's this line for?

Code: (Axe) [Select]
{L1+1+A+2}=>{L1+1+A}

It doesn't seem to do anything... Unless that => is a STO→ symbol?

I'll test the code later.




Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Level creating?
« Reply #19 on: November 28, 2010, 09:28:15 am »
Given how he used it again in the line "A+1=>A", I think he means the store arrow.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Level creating?
« Reply #20 on: November 29, 2010, 07:57:50 am »
alright well.. i read through this topic but i still don't know what you're trying to do, besides create a level (which is too general).

-what's its height?
-what's its width?
-how many tiles are there?
-is this a level editor?
-does it need to smoothscroll, or can it scroll by tiles?
-are there any "special" tiles that correspond with each other?

or am i completely off base?


Its side-scrolling, so smooth, and there are no tiles, only objects and backgrounds
I'm not a nerd but I pretend:

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Level creating?
« Reply #21 on: November 29, 2010, 12:28:00 pm »
*bump*

anyone wanting to help me out ??? ???
I'm not a nerd but I pretend:

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Level creating?
« Reply #22 on: November 29, 2010, 02:17:23 pm »
aeTIos, all I've been able to draw from what you've said is that you want code to randomly generate levels for a sidescroller. I believe I speak for all of us when I say that this is too vague to understand what exactly you want. Despite how much we may want to help, we really can't help you until we have a better idea of what you want.
« Last Edit: November 29, 2010, 02:18:40 pm by Runer112 »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Level creating?
« Reply #23 on: November 29, 2010, 03:07:43 pm »
aeTIos, all I've been able to draw from what you've said is that you want code to randomly generate levels for a sidescroller. I believe I speak for all of us when I say that this is too vague to understand what exactly you want. Despite how much we may want to help, we really can't help you until we have a better idea of what you want.
okay, i'm sorry to all of you if I maybe sounded a little uncomprehensive.(sorry if that is spelled wrong)
what I exactly want to do is this:

put the level code in str1, like as {1} in str1 should be (for example) a meteor, etc. I tried it in the form "object-when to occur", then in str2 where to occur, in Y-position. then, i have the routine for the falling meteorite, else the code is not complete. then, there is a part of the code that i dont know how to code:
Code: [Select]
if X<3
For(A,0,10)
{L1+A+3}→{L1+A+1}
A+1→A
End
this code does not work, it is the reason I created this topic.
Copy( does not work as far I know.

I hope that now all is clear ??? ???


I'm not a nerd but I pretend:

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Level creating?
« Reply #24 on: November 29, 2010, 03:42:33 pm »
From what I can tell, that code will shift every other byte, starting at L1+3, backwards 2 bytes in memory. A total of 6 bytes of data will be moved. I may be wrong, but I'm guessing that this is not the effect you wanted to achieve?

Before:

Address:   L1   +1   +2   +3   +4   +5   +6   +7   +8   +9   +10   +11   +12   +13
Data:   A   B   C   D   E   F   G   H   I   J   K   L   M   N


After (changes in bold):

Address:   L1   +1   +2   +3   +4   +5   +6   +7   +8   +9   +10   +11   +12   +13
Data:   A   D   C   F   E   H   G   J   I   L   K   N   M   N

« Last Edit: November 29, 2010, 03:45:37 pm by Runer112 »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Level creating?
« Reply #25 on: November 29, 2010, 04:30:25 pm »
this is still difficult to grasp. does this description summarize what you want?
a string of bytes which each correspond to a sprite.
there is another string of bytes corresponding with the first string of bytes. this string says "after X pixels scrolled, draw the object on the screen"
there is a third string telling the routine where to place the sprite.
for example, considering 1 is a meteor sprite and 2 is a tree sprite:
Code: [Select]
Data(1,2)->Str1     // what object 1 = meteor, 2 = tree
Data(50,30)->Str2 // every 50 pixels scrolled, display a meteor. every 30 pixels scrolled, display a tree.
Data(0,45)->Str3 // when you display a meteor, display it at (88,0). when you display a tree, display it at (88,45)

am i right?
if so, here's some code assuming the above declarations:
Code: [Select]
[meteor_sprite_hex]->Pic1
[tree_sprite_hex]
Repeat getKey(15)
   ...
   For(Z,0,length(Str1)-1
      !If pixelsScrolled^{Str2+Z}
         Pt-Off(88,{Str3+Z},{Str1+Z}-1*8+Pic1
      End
   End
   ...
End

edit: and runer, i know it can be heavily optimized. but i just tried to make an example obvious to what i am doing
« Last Edit: November 29, 2010, 04:32:19 pm by nemo »


Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Level creating?
« Reply #26 on: November 29, 2010, 04:52:03 pm »
From what I can tell, that code will shift every other byte, starting at L1+3, backwards 2 bytes in memory. A total of 6 bytes of data will be moved. I may be wrong, but I'm guessing that this is not the effect you wanted to achieve?

Before:

Address:   L1   +1   +2   +3   +4   +5   +6   +7   +8   +9   +10   +11   +12   +13
Data:   A   B   C   D   E   F   G   H   I   J   K   L   M   N


After (changes in bold):

Address:   L1   +1   +2   +3   +4   +5   +6   +7   +8   +9   +10   +11   +12   +13
Data:   A   D   C   F   E   H   G   J   I   L   K   N   M   N


I want every byte starting at {L1+3} 2 bytes to the beginning of L1 moved. so {L1+3}->{L1+1} and so on

And nemo, no, the objects should be moving.

thanks already guys, plz hold on
I'm not a nerd but I pretend:

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Level creating?
« Reply #27 on: November 29, 2010, 05:00:05 pm »
how bout this?

Code: [Select]
[meteor_sprite_hex]->Pic1
[tree_sprite_hex]
0->C
Repeat getKey(15)
   ...
   C+1->C
   For(Z,0,length(Str1)-1
      !If pixelsScrolled^{Str2+Z}
         Pt-Off(88,sin(C)//4+{Str3+Z},{Str1+Z}-1*8+Pic1
      End
   End
   ...
End
[/code