r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

Vladimir
16-Feb-2009
[2078]
its rough code.... map for level should be made from tiles, and the 
moving should be twice smoother.... than it would be same as on atari....

And it uses atari resolution.... and I did scaling in software... 
each atari pixel is actually 4x4 pixels in image....
Is there a way to scale image using hardware in rebol?
Henrik
16-Feb-2009
[2079]
no, but you can smooth image scaling
Steeve
16-Feb-2009
[2080]
yes Vlad, your code is clean, i see the inheritance of a good asm 
coder
Vladimir
16-Feb-2009
[2081x2]
hehehe :) thanks.... it could be cleaner :)
maybe I didn't need that much parenthesis but thats just to be sure.... 
:)
Henrik
16-Feb-2009
[2083]
there are probably optimizations that can be made there.
Steeve
16-Feb-2009
[2084]
hmm, i coold try to port your code in R3 if you want
Anton
16-Feb-2009
[2085]
img: make image! 4x4
poke img 1x1 red
poke img 2x2 white
view layout [image img (img/size * 8)]
Vladimir
16-Feb-2009
[2086]
Just remember, this was just made to find out if  calculations made 
on a napkin in a restaurant were correct :)

This script proved my math skills are still valid and now I need 
to implement them in 6510 asm... :)
Would be nice to see it in R3..... How is vid advancing in R3 ?
Steeve
16-Feb-2009
[2087x2]
it's advancing...
Acutally, it's enough to handle drawings at bitmaps level
no need of Vid for your purpose
Vladimir
16-Feb-2009
[2089]
why? is there some other way of displaying pictures in R3...?
Steeve
16-Feb-2009
[2090]
sure, you have to use gobs, wait a minute i rewrite your code....
Vladimir
16-Feb-2009
[2091]
ok.... Ill go make coffee.... looks like coding time :)
Steeve
16-Feb-2009
[2092]
beer for me, please
Henrik
16-Feb-2009
[2093x4]
probably get rid of FOR. it's a heavy mezzanine.
BTW, there are bugs in image! in R3, so colors might be wrong.
vladimir, GOBs are graphical objects blocks, light weight constructs 
that are the foundations of all graphics in R3.
a FACE in R2 would almost be the equivalent, although faces are more 
complex and heavier.
Anton
16-Feb-2009
[2097]
Another way to make tunnel effects.
do http://anton.wildit.net.au/rebol/demo/rebol-stargate1.0.2.r
Vladimir
16-Feb-2009
[2098]
I knew about gobs, I just thought you need vid for them.... :)
Pekr
16-Feb-2009
[2099]
Vladimir - actually no - gob! is very low level, structure. Demos 
of former alpha, e.g. 1000cows, proved that R3 engine is much faster. 
Sometimes 10-20 times. Whole rendering back-end was switched to AGG 
renderer. So - still not HW accelerated, but decently fast.
Vladimir
16-Feb-2009
[2100]
Anton, impressive!
BrianH
16-Feb-2009
[2101]
In theory, it would be easier to hardware accellerate AGG than the 
old View.
Vladimir
16-Feb-2009
[2102]
I'll wait to see what will Steeve write and than it will be clearer 
:)
Henrik
16-Feb-2009
[2103]
I think the point of GOBs was both to be lightweight and fast and 
also to be hardware acceleratable (if that's a word :-))
BrianH
16-Feb-2009
[2104]
accelerable
Henrik
16-Feb-2009
[2105]
hmm :-)
Steeve
16-Feb-2009
[2106]
guys, can you check that in R3, it's crashing here:
>>make image! 640x400
Anton
16-Feb-2009
[2107]
All the heavy work is done using face/effect/draw dialect.
BrianH
16-Feb-2009
[2108]
That's a known bug, in CureCode already.
Steeve
16-Feb-2009
[2109x2]
*hmmm...
sorry Vlad, i'm afraid, i can't port your demo in R3 with this bug
Henrik
16-Feb-2009
[2111]
image! is broken in multiple places
Anton
16-Feb-2009
[2112]
It crashes for me when image height is > ~175
BrianH
16-Feb-2009
[2113]
Btw, here are the reasons there won't be a compatible rebcode forr 
R3:

- R3 function parameter and local word references are 28% slower 
because of new function word model.

- R3 function calls are much faster because of typesets and the new 
function word model.

- There's a *lot* more natives, including all of the loop functions, 
iirc.

That first one would slow down rebcode even more than functions because 
even more of its overhead is word references. The last two mean that 
REBOL code will be a *lot* faster, so the relative speedup of rebcode 
is less.
Pekr
16-Feb-2009
[2114]
Vladimir - I wonder if you checked demos in Desktop section of Viewtop? 
Go to rebol.com and then Contest folder. Look e.g. at Cyphre's demo 
called Quick Hack ...
BrianH
16-Feb-2009
[2115]
Those reasons are why R2-style rebcode isn't worth the trouble to 
make in R3. What *would* be worth making would be a *different* rebcode 
that would be even faster :)
Henrik
16-Feb-2009
[2116]
Anton, it crashes under R2?
Anton
16-Feb-2009
[2117]
no no, under R3, of course.
Henrik
16-Feb-2009
[2118]
ah, good. I mean, bad. :-)
Anton
16-Feb-2009
[2119]
We can still play with R2 graphics until R3 stabilizes.
Pekr
16-Feb-2009
[2120]
BrianH: could that work as a plug-in for e.g.? Or - do you think 
it is possible to have even several VMs that way? Simply a compiler? 
Maybe we could even find some small C compiler to be included with 
REBOL? (if that would make sense)
BrianH
16-Feb-2009
[2121]
Right. Wait, it's up to 175? When last I checkede it was 89.
Pekr
16-Feb-2009
[2122]
Maybe it is an easy fix? Well, I think that Cyphre is back to project, 
after Carl syncs his sources with him ....
Henrik
16-Feb-2009
[2123]
last I checked, I needed only about 5x5 pixels.
BrianH
16-Feb-2009
[2124]
Pekr, with plugins and utype! you should be able to use TCC to complile 
functions :)
Vladimir
16-Feb-2009
[2125]
I have my coffe and code now runs twice smoothly than first version 
:)
www.visaprom.com/tunel.r

And I tried that size trick:   view layout [image img (img/size * 
8)]
and speed is the same.....
Pekr
16-Feb-2009
[2126]
what is TCC?
BrianH
16-Feb-2009
[2127]
Tiny C Compiler. I don't have the link handy on this computer, but 
google it.