Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

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.

Show posts Menu

Messages - Snektron

#31
When i designed that CSE font i made a quick custom editor for it since the font format in the CSE is really weird.
I dont know if its the same on the CE, and i also dont know if i still have the source for that editor.
#32
Hardware / Re: RPN-Calculator
February 27, 2017, 09:52:13 PM
Cool! Will you also add graphing functionality?
#33
Quote from: E37 on February 20, 2017, 05:58:05 PM
Quote from: DJ Omnimaga on February 20, 2017, 05:54:40 PM
Ah I didn't know that pageswap existed for Axe. The DrDnar utility (I think) basically used both a 8xp and an app
That is RunPrgm.
https://www.omnimaga.org/the-axe-parser-project/(axiom)-run-(unarchived)-external-assembly-programs/
It has its own special uses besides running programs. The other things it can do are REALLY awesome in some special cases.

You didn't even link my runprgm axiom :(
#34
You dont even need ti-basic. You just need a few appvars with relocatable code. If that is not possible, you can just launch one program from another which results in tios copying the program to the code area and running it from there. Or you could make an app like everybody else but who does that anyway.
#35
Isnt processingjs the same syntax? (I haven't done processing in a while so i wouldnt know)
#36
Processing eh? You can put it online at openprocessing.org and send us the link :)
#37
The difference is that check checks only a singular point. But my routine checks every tile (until one is found)  within the square.
If you only want to check a singular point you can use this:


char map_collision_point(int x, int y)
{
    int map_x = PIX_TO_MAP(x);
    int map_y = PIX_TO_MAP(y);
    int tile = MAP_TO_INDEX(map_x, map_y);
    return !!map[tile];
}
#38
Hardware / Re: RPN-Calculator
February 03, 2017, 10:48:23 PM
Looks pretty impressive :o nice job
#39
The idea is to only traverse the tiles which are currently inside the rectangle you want to check.


#define MAP_WIDTH 40
#define MAP_HEIGHT 15
#define TILE_SIZE 16

// we can convert a pixel-coordinate to map-coordinates by
// dividing by the tile's size in pixels.
// because the tiles are square we can use the same function for x and y coordinates.
#define PIX_TO_MAP(x) ((x) / TILE_SIZE)

// this converts a map-coordinate to an index of the map array.
#define MAP_TO_INDEX(x, y) ((y) * MAP_WIDTH + (x))

// check wether a rectangle defined by a position and a size collides with a tile
char map_collision_check(int x, int y, int w, int h)
{
int start_x = PIX_TO_MAP(x); // which tile does the hit rectangle start at?
int end_x = PIX_TO_MAP(x + w); // which tile does it end at?
int start_y = PIX_TO_MAP(y);
int end_y = PIX_TO_MAP(y + h);

for (int i = start_x; i <= end_x; i++)
{
for (int j = start_y; j <= end_y; j++)
{
int tile = MAP_TO_INDEX(i, j);
if (map[tile]) // this actually checks whether a tile collides.
return 1;
}
}

return 0;
}


edit: please note that this function is un tested and does not check map bounds. If you want to do that you should limit
start_x and start_y to be >= 0, limit end_x to be < MAP_WIDTH and end_y to be < MAP_HEIGHT.

edit 2: altered to fix small mistakes gameblabla noticed
#40
Neat. Does this generate terrains too or just convert hight maps?
#41
I think the clickbait titles are pretty funny
#42
General Music Talk / Re: What are you listening to?
January 28, 2017, 01:06:33 PM
#43

Im finished with most of the main program, and im now developing the knightos aimed emulator.
As you can see Z80e's (very weirdly made) debugger can be used from the built-in console :)
Also there are tooltips and there is a file picker for flashing roms. A problem (in qt i think) is that the filepicker takes 2-3 seconds to load when you start the program
(even though its not even opened yet).
#44
Looks really cool :) You should ad a freeplay mode too. What kind of building blocks are implemented/planned btw?
#45
Ive actually decided to change it. The first plugin i will make will uze z80e to emulate ti hardware, and thus should be able to run knightos.
I will then make a seperate plugin for the pico-8 like idea, still in Z80. The difference is this emulator will have different "hardware", for example a color screen.
Powered by EzPortal