Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 10, 2010 14:34:51 GMT -5
I noticed at least 2 scrolling engine examples while scrounging the forums. Even the Grand Creator couldn't get normal scrolling speed out of interpreted code. One concept I had was to use PRINT statements and use a custom font for tiles. 1. Print a screen full of tiles. 2. Scroll the plane with the printed "text" 3. Return plane to origin and print yet another screen full of "text" Special blocks and objects could use real sprites of course. I'm working my way towards seeing if this would work but I'm still stuck on my limited skills. I can't even get the scrolling functions to work yet Any thoughts on this method fellas?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 10, 2010 15:06:05 GMT -5
I'm pretty sure the print function is slower then drawtile(s). And what makes you think BASIC wouldn't be fast enough for scrolling? Did you try this file ( 2048.bin )?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 10, 2010 15:13:05 GMT -5
Thanks for the quick reply moon!
Well, the 2 examples I cited mentioned the code was slow. Also, I compiled the examples and they were slow.
Could you post the source for that .bin? If yours is truly BASIC - and the fastest example out there - I'm sure it'd give us newbies hope! The more examples that show BasiEgaXorz can do more than one screen games the better. (Although Yie Ar Kung Fu rocked!)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 10, 2010 16:28:53 GMT -5
@theloon Good to see that you've edited your post ( you know what I'm talking about ) Anyway, I never actually saved the source of that example, but it only took a few minutes to re-create ( see attached ). Like the original, it is highly unoptimized* .. but that also means it should be allot easier to understand. *For example, you should only draw tiles when necessary. Attachments:
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 10, 2010 16:46:45 GMT -5
Never let it be said that the moon is not wise and magnanimous! Thank you for the excellent example. The scrolling works so well I have a hard time seeing if it's actually pixel by pixel scrolling. I've got much studying to do
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jun 11, 2010 1:00:03 GMT -5
good example I think it looks speedy because you're scrolling 12 pixels . There's an example I had with dynamic tile drawing, but it's pretty slow. I haven't had time to further develop the Blast Processing routines either - but I'll have them ready one day
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 11, 2010 7:51:10 GMT -5
Well, the required scroll speed of a project does influence both the amount of data being pushed around, as well as the overhead of the routines .. so it's not only a matter of simply increasing the displacement quantity. Besides, I wasn't the one that said it was difficult nor that BEX's build-in scrolling functionality was slow In fact, the ASM compiled from those BASIC functions is quite lean & clean. @oompa - Still waiting for those sprite-sorting functions
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jun 11, 2010 12:58:05 GMT -5
Well, the required scroll speed of a project does influence both the amount of data being pushed around, as well as the overhead of the routines .. so it's not only a matter of simply increasing the displacement quantity. Besides, I wasn't the one that said it was difficult nor that BEX's build-in scrolling functionality was slow In fact, the ASM compiled from those BASIC functions is quite lean & clean. @oompa - Still waiting for those sprite-sorting functions It's good to hear that the BASIC functions get translated into ASM lean and clean What sprite sorting functions? Like, functions to change the drawing order?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 11, 2010 16:03:58 GMT -5
Yea, the sprite z-axis / priority "thing" we talked about in this thread
|
|
|
Post by theelf on Jun 11, 2010 16:07:21 GMT -5
Hi, first free day i have from two weeks of much work, to write...
I like the Soleil example, im making a RPG, but the code is a lot simpler, i only use "IF" and "LOOP" to make all....jaja
I have a question, when you write
joypad.3-joypad.2
What is? i dont understand this..
thanxs
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 11, 2010 16:21:12 GMT -5
Not sure what part you don't understand .. I'm guessing the variable suffix which DevSter refers to as Argunerics ( search for it in the BEX documentation )? Anyway, normally you don't want to use that approach .. there are more optimized methods ( since the Megadrive D-Pad can never be left AND right ). I'm just being lazy when writing examples
|
|
|
Post by theelf on Jun 11, 2010 16:50:24 GMT -5
Hi, thanks for the reply
I make a question, to not start a new thread
If i want to assign a value to variable, i write this
variable=value
But, i cant find a way to assign more than one value to a variable..
i like something like
variable= value1 value2 value3...etc
There is a way?
thanxs
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 11, 2010 17:02:13 GMT -5
Ehm, I'm going to assume you're asking how to assign values to individual bits? Unfortunately you can only use Argunerics for reading values ( not writing ) at the moment. So this will not work .. a.1 = 1 ' Doesn't Work a.2 = 1 ' Doesn't Work But you can always write your own function
|
|
|
Post by theelf on Jun 11, 2010 17:16:48 GMT -5
Thanxs, but sorry, i don't understand your reply, i write another example to explain better my need...
For example, i have to check some numbers are the corrects
correct_number=30
number1=1 number2=30 number3=122
if correct_number=number1 or number2 or number3 then print "Good luck!!" end if
I like to make some like this
correct_number=30
numbers=1 30 122
if correct_number=numbers then print "Good luck!!" end if
hope i can explain well
Thanxs!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 11, 2010 17:34:59 GMT -5
Why? The only correct answer is because you want dynamic conditions .. please describe your exact situation so I can give a appropriate solution. And you should have started a new thread
|
|