Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jens_K

Pages: [1] 2 3 ... 13
1
TI-Nspire / Re: Minecraft 2D for TI-Nspire
« on: September 28, 2020, 11:01:07 am »

!!! New Preview Version: v1.0 Pre 2 !!!

While I'm still working on some features like nether mobs and world importing, I fixed some of the most annoying problems of Pre 1 to make it actually playable:

Fixes:
- fixed furnace save/load
- world seeds are working again
- fixed door not being craftable
- fixed sheeps not dropping wool

Optimization:
- optimized RAM usage for traveling far
- dungeon chests now don't create a chest inventory until opened for the first time

Other improvements:
- leaves now decay without wood nearby
- adjusted the menu for infinite worlds


As always, feel free to report any bugs and issues you find here!

2
TI-Nspire / Re: Minecraft 2D for TI-Nspire
« on: May 06, 2019, 04:29:42 pm »
I created this account just to say please keep updating this game as I love it and would hate to see such a great game go to waste
Hi!
To be honest, I guess I moved on from programming calculators as I got into university and I'm now involved in other projects. Turns out, programming calculators is apparently an excellent entry to programming and a great preparation for studying computer science!


Anyways, i had planned to release version v1.0 some day, but never got to finish it. But reading through the changelog, I did apparently put a lot of work into that update so it would be a shame to never release it. So I guess I'll just attach it here.


It has infinite worlds, 3D clouds and some kind of nether which is actually pretty cool.


Spoiler For Changelog:

infinite worlds:
- implemented a new chunk system that generates the world procedually
- chunks are generated


spawneggs:
- spawn mob with [(-)]
- only 1 texture is needed; the individual textures are created via image manipulation


the underworld/nether
- starts at -50 blocks height under a 3 block obsidian layer
=> to get there you'll need a diamond pickaxe (or very some time and dedication)
- generated out of netherrack, lava and fire
- ghasts
  - fly around, follow you, shoot you with explosive fireballs
  - only spawn using a spawn egg at the moment
- as useless as the minecraft beta nether used to be


optimizations:
- faster way to draw shadows on "fast" graphics (flickers on color displays for some reason)


code cleanup:
- rewritten crafting implementation (easily moddable now)
- rewritten block updating (easily moddable now)
  - every block can register own updating functions now
  - world updates are now temporarily written into a buffer (using a fancy, metatable-driven catcher/distributor table (not the best way to implement this buffer, but I didn't have to rewrite everything that way :P ))
- rewritten water/lava behavior implementation (actually kind of understandable now)
- rewritten whole block/item system:
  - implemented Block/Item classes, which instantiate all various blocks/items and contain all properties of it
  - game now handles pointers to the block/item objects instead of id numbers (which isn't as memory extensive as i thought)
  - all block/item-related handlers (like "use", "update", etc.) are now owned by the item/block classes
  ==> actually extensible code!


other improvements:
- graphics menu
- improved sky visuals
  - clouds (which are somewhat 3D rendered with light shading (I spend way more time on this than I should have :P ))
  - day sky color is now a bit darker but more blue
  - bright stars
- slightly improved inventory navigation on clickpad models
- new splash texts


fixes:
- fixed all sorts of saving/loading issues that came with OS updates
- fixed an issue that crashed the game when generating a random world on a calculator that were on standby for a long time


It still has some bugs, feel free to post them here, I might even get around to fix them  ;)


Edit: I remember putting a lot of time and effort into the 3D clouds, so please enjoy them!

3
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: January 25, 2017, 10:14:58 am »
Hi Jens, another issue I'm having: I'm trying to run a script with several parts. I can't seem to run this code, it always takes extremely long, presumably forever, to load page 1.2:
Code: [Select]
while true do
  function on.paint(gc)
    function textDisp(x,y,str)
      gc:drawString(str,x,y)
    end
  end
  platform.window.invalidate()
end
I've tested that whole code block without the while block, yet it doesn't work with the while. Is there a problem with my code? Or could it be the editor?
Nspire Lua programs have a different structure, they are event based; code outside of event handlers is usually only executed at the programs start and only for initialisation, which in your case takes an infinite amount of time due to your while loop, which is why your program doesn't respond.
You can see the available events in the Nspire API guide (on page 2.1).
To do what you wanted to do, you could use the timer to refresh the screen repeatingly:
Code: [Select]
x = 0
timer.start(0.01)
function on.timer()
  x = x + 1
  --update screen
  platform.window:invalidate()
end


function on.paint(gc)
  gc:drawString("hi", x % 300, 20)
end
But you don't have to update the screen repeatingly, whenever the Nspire forgets the screens content, it asks for an update by calling on.paint.
If you have further questions, you can ask here: https://www.omnimaga.org/lua-language/ or send me a PM  ;)

4
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: January 23, 2017, 06:38:14 pm »
Hi Jens_K! You've made a really great script editor! Everything that I needed to know was either in the readme, self-explanatory, or understood through trial-and-error. I just can't figure out one thing; How do you run a script? I get that you have to press MENU > Code > Run, but I switch to the Run page and can't figure out what I'm doing! It says Click to run, but I click the center button, and nothing happens. Sometimes it returns an error that won't solve (even when pressing Menu and trying to let the editor solve the error). I'm on a Clickpad running OS 3.6, if that makes any difference at all.

Hey, thanks for your feedback!
Seems like on the execution page (usually 1.2), you're focusing the console, but the script executor waits with execution until it has the focus itself. To change focus you can press ctrl + tab. The script executor should then have a black outline instead of a grey one.


I hope that helped. If it didn't, please send me your JSE file and some more infos about those errors! ;)


5
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: January 12, 2017, 11:25:42 am »
Version 2.2.1 is now attached to the first post!

As said, it fixes problems on newer OS versions and a problem with the arrow keys on OS3.1, so you won't miss anything if you don't update if everything still works for you.  ;)
It's built now with the recent version of the student software, which somehow saves ~10KB; I hope OS3.1 still accepts it. Please report if it doesn't, then I'll do it with the student software 3.2 again.




@mdr1: Yes, indeed! Seems like I wasn't able to figure what the problem was, since the error occured outside of my program and no line number was given. Sorry that I forgot about it, it should be fixed now!

6
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: January 08, 2017, 08:17:19 pm »
I just discovered this amazing editor! ;D But on on OS 3.1 pressing an arrow key on the editor page causes it to crash with error, "attempt to call a boolean value." I was able to fix it by deleting this part:
Code: [Select]
--disable specific arrow key events (to trigger the on.arrowKey(direction) event)
on.arrowUp=false
on.arrowDown=false
on.arrowRight=false
on.arrowLeft=false


Hey, thanks for pointing that out!
And that's great timing because I was about to release v2.2.1 this week, which also fixes some problems on the newer OS, so I'll also include a fix for that problem! Seems like the event caller was a bit dumb on OS 3.1  ;D  While your fix may work on OS3.1 (can't test it my self), it doesn't work on OS3.2+, but I found a different solution (make the event distributor (on's metatable) return nil when the event is one of the arrow key events)
But I'm wondering how nobody pointed this out yet; those lines have been there since v2.0A4!

Also: Thanks everyone for voting for POTY 2016! That's my 3rd win in a row, and I'm not even active anymore :w00t: Are there no Lua programmers anymore?! But I'm really glad that this project finally got the POTY, because I didn't make this editor just for fun (well at first I did), but as soon as I noticed that people are actually using it (some even bought a Nspire because of it), I really invested quite some work and time to polish it, so that it becomes a proper, polished on-calc editor as it is today. Sorry for leaving it in this now broken state for so long, I'll fix it soon!

7
TI-Nspire / Re: Minecraft 2D for TI-Nspire
« on: April 22, 2016, 09:07:03 pm »
Jens_K are you working on it right now ?  ???
Yep, I was just recently contacted by my former alpha-tester again, who got me to do a major rewrite on the awfully written old code, to make it readable and modifyable. I'm also experimenting with some cool stuff like perlin noise generation and chunk management, to make infinite worlds possible. But I'm not sure about how much time I can invest in this project, as I'm now studying on a university and doing serious business  :P

So just out of interest: Who's still around here and freaking hyped for a possible new update?! No one? Huh... well then who's still around here anyways?

8
TI-Nspire / Re: Minecraft 2D for TI-Nspire
« on: September 11, 2015, 08:49:07 am »
Could you please post, create and/or link some sort of list of mods for the game? Thanks :D And btw I love the game, it has almost all of the regular features of minecraft, even with texture packs and mods, and reminds me of the good old days (Minecraft Alpha-Beta)
Hi, well since I haven't implemented the planned modding API yet, it would be pretty exhausting to make a mod that actually modifies game mechanics, which is why there aren't any really any mods for MC2D other than the included ocdpack and CinusMinus' resourcepack converter.
I don't know if I'll do another update for MC2D, but since people seem to still have interest in it (even with Crafti as "competitor") and I still have some free time left until study, it's not even that unlikely that I'll finish v0.14/v1.0 some day.  ::)

9
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: June 24, 2015, 09:37:08 am »
Hello again!
I said v2.1 was probably the last update, but it just had too many bugs I wanted to get fixed and I also wanted to implement the autorun feature, so here it is: version 2.2, the second final update :P

New:
- Autorun-option: Script now automatically runs when switching to the user script page (can be disabled in the settings menu)
- Revised autocompletion: Autocompletion now immediately inserts completions
- New double-size character handling for chinese characters (and unintentionally some other adjacent characters)
- New key combination: ctrl + ^ acts like the Pos1-Button; it sets the cursor to the left-most position
- You can now add custom highlighting-start/end flags by placing empty captures in your pattern:
  - E.g.: The pattern "%a()%d+()%a" on the line "foo42bar" will only highlight "42"
- Updated API Reference Guide's content to apilevel 2.4
- The "Change Indentaion"-tool can now also change the indentation of only the selected code
- Added a 'Help' button and corresponding message for the "Custom Highlightig" dialogue
- You can now use the [×] and [÷] buttons to scroll through the guides' articles

Fixed and improved other minor stuff:
- Reordered graphical functions in the autocompletion menu to fit the (subjective) average amount of usage
- "Find..."-Dialogue now keeps its settings
- Color-adjustments for grayscale displays
- Fixed a lot of interface problems on desktop mode
- on.create and on.construction are now only called on their associated apiLevel
- Editor now checks for and denies 0 character matching patterns (which would freeze the editor)
- Pressing "enter" on a console line while entering a line to execute adds that line to your input
- Editor now warns you if you select "Emulator" on the initial device query dialogue (special keys are then disabled which would be a problem when sent to a handheld afterwards)
- shift+'+' and shift+'-' switched scrolling direction to fit the clickpad layout properly
- Fixed a frame-update problem when using ctrl+x
- Made keywords appear slightly darker by default
- Fixed possible lock-ups when using the menu during a dialogue
- Numbers are not highlited in identifiers anymore (using the new pattern flag feature
- Execution Page script clean-up
- Fixed some errors in the guides due to parsing-errors and typos

The updated file is attached to the first post.
So this is it, I probably won't bother you anymore with any further updates, I had my fun with this project  ;)

PS: wtof1996 from cncalc.org is has currently started working on a chinese translation of JSE2.2, so if you're chinese maybe you should keep an eye on that.


EDIT: Reuploaded a slightly updated file: Fixed a timer-freeze problem after restarting a script on OS 3.2

10
Lua / Re: Greyscale on Nspire/CAS
« on: May 06, 2015, 07:37:27 pm »
Well I think you got me wrong here; the best way to get certain shades of gray is to set R,G and B to the same value. The formula would just explain how the Nspire transforms colors to gray shades. E.g. if you'd gc:setColorRGB(150,100,255), then, according to the formula,
Code: [Select]
floor((0.299*150+0.587*100+0.114*255)/16)=8the Nspire would display the 8th shade.

11
Lua / Re: Greyscale on Nspire/CAS
« on: May 06, 2015, 03:19:04 pm »
Hi,
even though it seems like your problem was solved, I think I can still give some more useful information about this topic:
I messed around with the grayscaling of the emulator and found out that the Nspire (at least the emulator) apparently uses the commonly used RGB-channel weighting of 0.299*R + 0.587*G + 0.114*B. You can see that on the attached screenshot (even though the emulator seems to mess up certain RGB-values like 0,129,0). Based on this and the fact that the Nspire can display 16 different shades of gray, I assume that the Nspire calculates the displayed shade like this:
Code: [Select]
shade = floor((0.299 * R + 0.587 * G + 0.114 * B) / 16)I can't test if that's the case myself because I don't own a grayscale Nspire, but this would explain your confusion with single colors of r/g/b.  ;)

12
TI-Nspire / Re: [Lua] Worms Clone
« on: May 04, 2015, 12:38:47 pm »
*Bump* Has there been any progress on this?
Not much yet and since I finished school and I don't use my calculator regulary anymore, I kind of lost interest in calculator programming  :/
But until I go to university this fall I don't have much to do anyways, so maybe I'll continue some of my projects but don't expect too much! This project is extra laborious to develop on though, because it all bases on the idea of updating the screen only partially to update those parts much faster. Therefore I have to take care of that system whenever I want to create new interfaces like an inventory and stuff.
So if I work on this project again, it probably won't be as extensive as initially planned!

13
TI-Nspire / Re: [lua] fractal zoomer
« on: March 31, 2015, 10:53:08 am »
Hello again!
I had noticed that I haven't uploaded this program to ticalc yet, so in order do to that I wanted to fix a few things and polish it a bit and the inevitable happened: I became addicted to fractals again  :P  But at least this fractal renderer now has some cool new features:

- Smooth rendering (see attached screenshot) is now selectable:
  - Full color scale on emulator
  - Dithering on handheld to prevent color-banding (using a 4x4 Bayermatrix)
- Support for custom fractal functions (as suggested by Eiyeron)
  - Switch to page 1.2 to enter a custom function
  - Uses the CAS functions of the Nspire to "extract" the required algorithms and then parses them to Lua code
  - Therefore is only available on OS>3.1
  - The Handheld Lua is too slow for most fractals  :P
- Improved rendering speed, especially on emulator
- New color-set (see attached screenshots)
- Settings are now saved
- Julia sets are not rendered upside-down anymore
- Minor bug-fixes and improvements

And for the sake of the awesomeness of fractals I attached some screenshots of some nice fractals and smooth rendering  ;)

14
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: February 12, 2015, 01:35:28 pm »
It seem really great !  ;D
Just one thing, I remember we talked about a system of priorities for the syntax highliting, would it be possible to add it or is it to long ? :)
Anyway, good job  :thumbsup:
It's already implemented, just press/click on + or - on the "Patterns" list  ;)

15
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: February 11, 2015, 10:14:27 am »
Hi again! I'm back to programming after a longer break for the A-level and stuff. So here's version 2.1 of JSE (New Version is attached to first post):

New:
- Status Bar
  - enable/disable in "General Settings" Menu
  - displays current name of the script and status of the editor

Improvements:
- Completed Physic API Guide (I had to shorten it a bit)
- Revised Console:
  - You can now copy lines from the console to the clipboard
  - Console now supports line-breaks
  - Console now always remembers the last 100 lines and monitoring-settings
  - Console now scrolls automatically through long lines
- Keywords like "function" or "for" come with a space after inserting from the acutocompletion menu

Fixes:
- Menu should now be available on OS 3.1
- Fixed some minor bugs

Other Changes:
- Console now doesn't log status logs by default


If everything works, this will probably the last update of JSE! Thanks for all of your support so far; without it I probably wouldn't have finished it, or at least not in this polished state!
I tried to make the best possible on-calc Lua Editor and now it fits my needs perfectly, and I hope it is and will be useful to other Lua programmers too!  :)

Pages: [1] 2 3 ... 13