Jump to content

Photo

Zelda Classic is Open Source


  • Please log in to reply
101 replies to this topic

#91 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 12 February 2016 - 08:14 PM

I have a better idea. Why don't we just add a Screen->InvertedCircle(layer, x, y, radius, color, trans); ..?

#92 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 12 February 2016 - 08:47 PM

I have a better idea. Why don't we just add a Screen->InvertedCircle(layer, x, y, radius, color, trans); ..?

 

I was saying that, but people told me they'd rather have better bitmap functonality. Me, I'd rather inverted circle, and allow it to stack, or better yet, have an "erase" command that erases drawtiles and script drawing on that layer, in the specified area, in either a circle or square area.


Edited by Dimentio, 12 February 2016 - 08:48 PM.


#93 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 12 February 2016 - 10:40 PM

I have a better idea. Why don't we just add a Screen->InvertedCircle(layer, x, y, radius, color, trans); ..?

 

I had considered this, at one point, as an OP_ setting for all drawing commands. I don't think it would be ultimately practical, nor do I think it'll play well with the trans table. I certainly welcome any model that works.

 

When I do some more reading on Ag4 blitting, I might be able to come up with a way to blit with transparency. If not, then inverted drawing might be the only option, but it has more limitations than I like, particularly when stacked. 

 

I think it should be possible to commit the sub_bitmap with transparency to the mains screen bitmap, so that it is rendered with the screen, instead of releasing it via a direct blit; but there may be a way to blit with effects. I'm unsure.

 

Rather, I'm unsure in 8-bit drawing mode.

 

 

[...] But I guess I just have zero tolerance for Microsoft shenanigans these days.

 

Wait, you had tolerance for them at some point?! I never did. :P

 

 

Sometime this month or next, I'll tackle this and get back to you.  The algorithm should be pretty darn simple.  Each frame, check for the location of certain combos or the player.  Then, identify the combo numbers around that location.  Next, draw an all-black tile to Layer 6 on all locations of the screen except for those nearby an identified light source, where tiles with a transparent circle get drawn.

 

This will result in a "jerky" light source around the player, kind of like how Dragon Warrior I does it, but this could be overcome using either lots of tile space (draw the open circle in all possible positions and choose the one appropriate for the player's position) or drawing some number of black, unfilled circles around the player necessary to fill up the space between the edge of the player and the first black tile.  Probably no more than 16 circles would be necessary.

 

So, we're talking about a few hundred drawTiles per frame, and that shouldn't be too bad, I don't think.

 

I'm not sure how you would handle overlapping sources. It'll be extremely tedious, and using 'a few hundred DrawTiles' will also severely limit other drawing: Remember that max draws per frame, from all sources is 1,000. (It shouldn't affect capped FPS though.)

 

It would still be better to fix this internally, so that you can do it with one draw. Workarounds like that are just a lot of effort for limited returns. They are a stopgap measure, that allows people to do things, while a better solution is devised.


Edited by ZoriaRPG, 12 February 2016 - 10:48 PM.


#94 C-Dawg

C-Dawg

    Magus

  • Members

Posted 13 February 2016 - 11:15 PM

Whoa, there is a hard cap for drawtiles? Well! Never mind, then. I had no idea such a thing existed. I don't like the idea of using up a third or more of the available draws on a black screen... looks like I need to revise the algorithm to use rectangles and some tricky logic, or not do it at all...

#95 grayswandir

grayswandir

    semi-genius

  • Members

Posted 15 February 2016 - 09:27 AM

So, I've been trying to build a 64-bit version. I've gotten it to compile, but it crashes on startup. I think the reason is that it can't read the quest files properly. Can anybody who is familiar with allegro confirm whether or not the read/write quest stuff works differently per size. Or even if anyone has ever build 64 bit?

Otherwise, I guess I'll have to break out a vm or something.

#96 Surreal Canine

Surreal Canine

    Master of Disaster

  • Members
  • Real Name:Brian
  • Location:Somewhere

Posted 15 February 2016 - 10:10 AM

Oh man, I love you guys and everything this stands for.

While I am a programmer by trade, I'm not nearly confident enough in my C++ skills to contribute any meaningful code. This codebase is huge!

Is there some other way I can show my support?



#97 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 15 February 2016 - 07:34 PM

So, I've been trying to build a 64-bit version. I've gotten it to compile, but it crashes on startup. I think the reason is that it can't read the quest files properly. Can anybody who is familiar with allegro confirm whether or not the read/write quest stuff works differently per size. Or even if anyone has ever build 64 bit?

Otherwise, I guess I'll have to break out a vm or something.

You might need to break out the debugger though.


You're like the first astronaut on Venus. There's no one else around to hear you scream. :)

Godspeed grayswandir, godspeed.

#98 grayswandir

grayswandir

    semi-genius

  • Members

Posted 15 February 2016 - 08:48 PM

You might need to break out the debugger though.

I already have, though. :P

#99 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 15 February 2016 - 09:25 PM

Looks as if my ideas on how to implement transparency in DrawBitmap() hold water. I put together a temp patch file for script_drawing.cpp, that we can use to test it.

if it works, we'll need to add overloads for DrawBitmap() to add in the extra params, without breaking any scripts that reply on it.

Although, I suppose it isn't asking too much to make people update a few lines, here and there, as happened between 2.11b and 2.50.0 final, when expanding script functions with more args.
 
Another nice thing, is that I will be able to add in a slew of allegro effects into DrawBitmap(). Some are more useful than others though, and alas there's no pinch/warp type of effect, that would work directly, to map a bitmap as a scaled polygon.

I'll need to see about making bitmaps valid textures for 3D drawing.

@Grayswandir: I sent you the file over Skype (as a link and a drop), so if you are going to do a 32b Linux compilation, try using that one instead of the default script_drawing.cpp.

@Gleeok: Thanks for the spiritual support. One day we'll need to sit down over a bottle of single malt; and that's a promise (unless you hate whiskey, for some reason). You also have some PMs on AGN.

 

@Saffith: I sent the script_drawing.cpp update file to you that has all the changes. In fact, i sent both the one with only the DrawBitmap() changes, and the one with the additional bitmap textures for draws, so that you could try incorporating it into 2.50.3, or whatever.

Edit: Looks like I'll be able to make bitmaps textures for 3D drawing easily, without needing to change any args. I need to define using tiles > 65520 as bitmap targets for textures, and add a function to use the bitmap as 'tex'.
 
If any of you want to follow the changes that we implement, here is where we're going to be putting them:
ZC [2.future] Change Log

...at least for the present. Adding them on shardstorm.com will also likely to be a thing.

Howzat?!
 
Update: Added support for transparent bitmaps, with and without rotation; and added support for using bitmaps as textures for drawing ( e.g. Quad() ). This is implemented, but untested.
 

Whoa, there is a hard cap for drawtiles? Well! Never mind, then. I had no idea such a thing existed. I don't like the idea of using up a third or more of the available draws on a black screen... looks like I need to revise the algorithm to use rectangles and some tricky logic, or not do it at all...

 
http://www.shardstor...#Script_Drawing


Pretty much why I said it'd be silly. :D
 
My changes should solve this issue, although until we test them, it's all theory. If it does work, then I see no reason not to include it in the next build.


Edited by ZoriaRPG, 16 February 2016 - 12:13 PM.


#100 SyrianBallaS

SyrianBallaS

    Defender

  • Members
  • Real Name:Samer
  • Location:Detroit, Michigan

Posted 17 February 2016 - 06:19 PM

I'm gonna get on this later, but I cannot get the Linux version of ZC 2.5.2 to run. It's missing a library that's been deprecated. I have libgtk3 but ZC wants libgtk2.

 

I use Ubuntu 15.10

 

Edit: It still won't start, here's a screen.

 

c3CxDd4.png

 

I'm sorry if this is in the wrong thread.

 

Edit 2: I'm not sure if this will work since I'm not home right now but I found this page for help installing Zelda Classic on Ubuntu.

 

Edit 3: That link helped, I'm getting failures and warnings though. I'm probably gonna make a thread here and on AGN how to install on Linux.

 

Edit 4: YES! I finally got it run without errors and warnings. It lags like a bitch though, and the full screen is funky. Thank god this is open source.


Edited by SyrianBallaS, 17 February 2016 - 11:44 PM.


#101 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 February 2016 - 11:56 PM

I'm gonna get on this later, but I cannot get the Linux version of ZC 2.5.2 to run. It's missing a library that's been deprecated. I have libgtk3 but ZC wants libgtk2.
 
I use Ubuntu 15.10
 
Edit: It still won't start, here's a screen.
 
c3CxDd4.png
 
I'm sorry if this is in the wrong thread.
 
Edit 2: I'm not sure if this will work since I'm not home right now but I found this page for help installing Zelda Classic on Ubuntu.
 
Edit 3: That link helped, I'm getting failures and warnings though. I'm probably gonna make a thread here and on AGN how to install on Linux.
 
Edit 4: YES! I finally got it run without errors and warnings. It lags like a bitch though, and the full screen is funky. Thank god this is open source.


That post belongs in the 2.50.2 thread. Was your solution any more involved than grabbing the libgtk-2-0.deb file? The latest Debian that I run is 12.04 LTS, and I personally prefer 10.04 or 10.10; so I'ven't run into this problem.

It would be nice if you document what you had to do, to get it running.

Edited by ZoriaRPG, 18 February 2016 - 12:04 AM.


#102 SyrianBallaS

SyrianBallaS

    Defender

  • Members
  • Real Name:Samer
  • Location:Detroit, Michigan

Posted 18 February 2016 - 12:13 AM

I don't use Debian, it was pretty involved. My distro is Ubuntu 15.10.

Had to get a crap load of different packages and specify each one for i386,

even though my architecture is amd64.

 

It lags REALLY badly though.

 

Edit: Found a temporary solution, make the res extremely small.

 

Also it seems that zlaunch-l terminates abnormally.


Edited by SyrianBallaS, 18 February 2016 - 12:28 AM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users