Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
Other languages / Re: [JavaScript] Rock N' Roll Racing
« Last post by combatking0 on May 15, 2013 »
I'll give it a go - since this is a JavaScript project, it could go into Other Languages.
42
Other languages / Re: [JavaScript] Rock N' Roll Racing
« Last post by Yaloopy on May 15, 2013 »
No worries. Maybe you could move the thread to a search engine -indexable forum? It might help somebody somewhere sometime and that's what we're all about, I guess.
43
Purebasic / Re: Nfo Scroller
« Last post by dev0 on May 15, 2013 »
Yup it seems to work in some way but there are a lot of problems to solve...

First of all I've no idea how to display the nfo correctly, it looks horrible strange.
My idea was just setting terminal as font for the scroller like you can do in notepad to display it nice but sure enough that does not work at least it seems thats not enough. When I load the nfo it just shows crap...

My bad it works partly!
The problem is this I think:


Code: [Select]
If CreateSprite(1, 640, 1020)
  If StartDrawing(SpriteOutput(1))
    DrawingMode(1)
      DrawingFont(Font)  ;terminal
      FrontColor(RGB(255,255,255))
      DrawText(0, 12, "ÛÛÛ ßÛß ÛÛÛ  ÜÛÛ²²ÛÛÜ  ÜÛÛÛ²ÛÛÜ ÛÛÛÛ²ÛÛÜ ÞÛ²²ÛÛÛ²ÛÝ ÛÛÛ ßÛß ÛÛÛ")           
    StopDrawing()
  EndIf
EndIf

From the above code first problem is the dimension (height) of the Sprite I think because that depends of the length of text in the nfo file So I must set it dynamically?

Second problem should be drawtext? The nfo looks just crappy if I add more lines to it so i guess drawtext has problem with line breaks?

No clue in the moment how to load the nfo and iterate over it and then make the drawtext stuff work  ???



Any ideas?

Whooho  ;D
It seems I''m getting clother now...

Parts left:
1. Procedure to read the nfo instead of hardcoding with multiline support for Drawtext.
2. Automatic scrolling must be stopped when hitting cursor key so that indicates the user scrolls up / down himself.
3. Scroller direction from top to down when the last line of text is reached.
4. Sprite height must be dynamically calculated I guess...
5 Design adjustments
44
Purebasic / Re: Nfo Scroller
« Last post by dev0 on May 15, 2013 »
I'll see thank you for all the suggestions...
Got another idea here maybe its possible to fade out / in the text not using additional png's (size matters  ;D)
While reading the manual it might be possible while using DisplaySprite3D to modify the transparency param from within in a loop? Need to try it out  :P
45
Freebasic / Re: bumpmapping
« Last post by hellfire on May 15, 2013 »
does your code wait on the threads finishing before updating the frame or does it just unlock them and let them run
I don't really know how to determine that a frame has finished without waiting on the threads to finish.
At the moment I don't really do anything at all - all the multi-threading is handled by the open-mp macro automatically.
It behaves just like running without multiple threads, so the loop finishes as soon as all threads are done.
As open-mp provides a thread-id for every iteration of the parallel loop, I figured it processes continuous blocks with each thread.
That's probably not the best possible solution for all scenarios but good enough to not think about a better way for now.
If each block requires very different processing time, it probably makes sense to work on a smaller granularity to minimize thread sync time.
I haven't checked the processing time for each thread yet, but I guess it should be quite constant as the amount of source data is equal and accessed strictly linear.
46
Purebasic / Re: Nfo Scroller
« Last post by Raizor on May 15, 2013 »
Yes, probably not the easiest of first projects, but do-able with a little time I'm sure. And will be pretty cool when it's working :)

I'd attack it in stages:

1. Have a background image to represent your text (can be anything, just mock up a image with some text in photoshop or whatever).
2. Get the transparent gradient overlay stuff working, so it sits over the dummy background image.
3. Make the background image taller than the view area, so you can work on the scrolling.
4. Add the text rendering stuff to replace the dummy background image.

It's been a while since I've been anywhere near Purebasic/Freebasic, but I'd be inclined to use a TTF font rather than a bitmap font. That way you can let the user choose a different font more easily. I'd probably also stick with using a background image for the text and just render the text directly onto the background image. As the text doesn't need to change once it's rendered, this would probably be easier (IMHO). It would also give you the advantage of being able to use the code you write for steps 1 and 3.
47
Purebasic / Re: Nfo Scroller
« Last post by dev0 on May 15, 2013 »
Do you mean having the text fading towards being totally transparent at the top and bottom of the view area? If so, I'd be inclined to use an overlayed PNG image that is totally opaque at the top and bottom, the middle would be totally transparent and the transparency value would reduce as your neared the top/bottom. You could then just draw the PNG over the top of the view area. Not sure if this would work for you, but it's what I'd try first.

Correct! So I guess I was right here for the first problem if you suggest it too.
Just wonder how to handle the other stuff this seems kinda complicated for a beginner  :o
48
C / C++ /C# / Re: [C++][OpenGL] Sine Scroller
« Last post by Raizor on May 15, 2013 »
You're most welcome lucastar, good luck :)
49
C / C++ /C# / Re: [C++][OpenGL] Sine Scroller
« Last post by lucastar on May 15, 2013 »
Thanks Raizor! this is very helpful!!
As soon as i get the results i want i will upload the code.

Thanks again!!!
50
Purebasic / Re: Nfo Scroller
« Last post by Raizor on May 15, 2013 »
Do you mean having the text fading towards being totally transparent at the top and bottom of the view area? If so, I'd be inclined to use an overlayed PNG image that is totally opaque at the top and bottom, the middle would be totally transparent and the transparency value would reduce as your neared the top/bottom. You could then just draw the PNG over the top of the view area. Not sure if this would work for you, but it's what I'd try first.
Pages: 1 2 3 4 [5] 6 7 8 9 10