Good vs. Evil

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
50. Oof. Yeah that's not ideal. Its the sort of thing you wish they'd refund you the days where your internet wasn't working, because they clearly aren't providing the service you're paying for.
 

duckfan77

Popular Member
Mar 18, 2013
80
683
118
51 It wasn't a full day. At least an hour though, dropped out around midnight and was up by 9 the next morning
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
52 I worked some more on arena_keeper. This time I started work on canvas integration which ended up being kind of an hell. Because, in short: parameter lifetimes can be a pain, I didn't know a certain thing about the canvas element, causing a bug and a little improvement that stdweb did over the normal JS api caused a red haring as to what may have caused this bug.

But... it all works now. And pretty much by accident my canvas only renders a new frame whenever something changed. So... thats good :)
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
52 yep, things will be a bit more complicated once I actually start the game logic but at the very least if I decrease the tps the minimum fps also goes down yet as user input still causes new frames to be rendered at the same speed the game won't start to feel sluggish. :)

Oh, the reason why things start to get more complicated is because the map is bigger than your screen, meaning that if I want the same thing to happen I need code to discover if an update happened ONLY in the part that you actually see.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
52 maybe, but maybe not, considering I'm not exactly using a low level api here and that code like that may make it easier to only draw the parts of the screen that actually changed......

On another note: I now have a simple grid class that I can use to "snap" things onto it and a way to draw lines that follow said grid. They don't go diagonal but instead first go horizontal from where you clicked to where your mouse is and then go vertically, which seems the most logical for what I'm going to use it for.

Also, this class makes it easy to get the size of a cell in various formats, because apparently someone decided that some things need a 64 bit float, while others work with a signed 32 bit integer and yet another thing work with an unsigned integer of "native" size. And this means that I actually need to store my cell size as a signed 8 bit integer, because that is one of the few things that can be casted to all of them.

Hooray!

I guess the next part is create the internal structure of the map and get it to render that.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
50. Of ice? I don't know about that - but when ember is flying around between emitters and receptors you get these fiery bolts that curve - and ember repeaters make them boing!
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
50. It is quite cool! A bit tricky to get the hang of - the in game manual is very flavourful but not actually all that useful.