March 06, 2021, 05:21:25 AM

News:

The account sign-up bug has been fixed.


+-Discord Shoutbox


Alternatively, join us on Discord directly.
You can help CodeWalrus stay online by donating here.

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.

Topics - E37

1
Hey, I'm still working on this game for some reason.

It has been a while and I haven't had much time to work on Driller kNight since I have been away at college but here is an update anyway.

I am planning to release updates to the game on the first of every month to help boost the site and to give myself a deadline to work toward. Since I have a limited time to test, there is a chance I missed some bug. I would be very suprised if the game crashes but you shouldn't leave important things in RAM anyway.

Some unrelated things about the size of the game:
To recompile the whole game takes over 6 minutes. The game is broken up into 8 seperate files and each takes anywhere from 90 seconds (the App) to 15 seconds (the file that creates the saves)
The file dedicated to holding constants and variable locations is over 6k

Changelog:: ShowHide


New Features:
The game can now be saved in the middle of a level. Be warned that the save file will be >10k and archived.
The player can now view some stats such as kills and loot collected
Added 1 new unit

Changes:
The godmode and random level add-ons are no longer optional
Removed the intro scroll when the game first starts
The invert screen option no longer does anything although the user's preference is still saved
The game now requires 20k of free RAM to run (Was 16k before)

Improvements:
Opening / closing menus is now twice as fast
Rewrote the Refiner Ai to not be so over powered / RNG based
Rewrote the Clearer Ai not to get stuck if there was no rubble nearby
Units no longer sit still and wait to die if they have low health and are being attacked
Upgrade menu is easier to use and upgrade costs are now clearer
The framerate no longer drops by 10% for each repair node built
The game now runs ~15% faster in general
Fixed the game crashing when revealing very large caverns
Roads no longer appear unpowered for a second when a building or road is removed
As a result of the previous fix the game now crashes when more than 60 power plants are built. (I could fix this but I thought it was funny)
Various parts of the game have been moved around to begin working toward 83+ support
Large amounts of the game's internals have been gutted and reworked to make expansion much easier

Outstandng bugs:
I beleive that the game will crash if the user doesn't have the 10k-13k needed to create the save file but I haven't tested it.
If the game reveals a cavern over 2/3 the size of the largest map it will still crash (Up from crashing on caverns over 1/8 the size previously)
The user can save the game right before they finish a level, gain the stats from winning, load the save, finish it to gain the stats again, load the save...
On one of the last levels the game states that the user needs to build a Hover Refiner to win even thought the pre-level story clearly states that a Doom Platform is the object.


I would post some screenshots but very few of the visuals have changed.
2
PC, Mac & Vintage Computers / Driller kNight [pc]
September 25, 2017, 08:55:38 PM
So... I have been working on porting Driller kNight to the pc. It is going pretty well so far. I even have a screen shot of it running.
The graphics are not final. They will probably change a bunch.
3
I have become pretty adept at creating and managing hooks. For those who don't know what a hook is, it allows the programmer to modify the OS's behavior on certain events such as modifying or cancelling key presses, creating custom menus, among other things. If you haven't tried zStart yet, you really should. I won't give an advertisement for something I didn't make, but it does do some really cool things almost all of which are hooks.

So let me explain why I created this post. My calc's trace key is broken. I can press it but it won't register any key press. I would like the function of that key back - without getting a new calc. So, I make a key hook. It allows me to press ON and GRAPH at the same time and the calc to think that the trace key is being pressed. Awesome right? But what about 2nd - trace? I can make it so that when I go to to the catalog and select ZoomRcl it instead presses 2nd - trace. I can go on swapping keys all day long... But, what if I want to do something else? Say, when I press ON+X it runs a program, changes a setting or opens a custom menu. That is some of the power of hooks.

I would be happy to teach anyone who knows the basics of assembly how to use hooks or to write a custom one for someone since I don't have a project to work on right now. Any suggestions on what to create?
4
Ok, I'm heading off to college soon and am thinking of buying a new calc. I will probably get some version of the nSpire or ti89. I am looking for a good balance between math functions and programming abilities. It would be nice to know if some professors ban a certain calc. Speed doesn't play a big role but any programming restrictions would be nice. (I won't consider a calc that has only basic)
Does anyone have any comments on what I should choose?
5
Here is the newest release of Driller kNight!
I have added a huge amount of content since my last release. Eight new units and several new buildings have been added. Combat has been added to the game and giant monsters made of rock have come to destroy your base and slugs are sliding in to drain power from buildings! A story has been added to the beginning of each level and a conclusion at the end of each level. Each unit and building has a range of tasks and many have special abilities. The settings menu is well developed and allows frameskip for faster games, greyscale tuning, difficulty adjustment and more. The game takes about 10 hours to complete, but 100% completion takes more than 40 hours. It still will not run on an 83+ however.  :-\
There are 2 addons, Godmode and RandomLevels which I will release on August 19 and September 2. These add on to the original game and allow for many fun new games but aren't required to play.


Old Version: ShowHide

After several months of long programming sessions I have finished Driller kNight, a full length overhead mining strategy game.
It has 20 levels. Unlike most games, the levels can be chosen. You can choose between 1-3 levels to beat in order to progress deeper. The only exception is that the first 11 must all be beaten to unlock the last 9. There are 15 units and 6 buildings. It will not run on an 83+ due to lack of memory.

It may not be an on the edge of your seat excitement, but it is a fun way to pass some time.
I believe that the screenshots speak for themselves, so... here is the download.

[spoiler=more detailed overview]
   Driller kNight - Release

The controls are pretty simple. 2nd is always the select key. Press and hold it to create the drag box. Alpha selects or unselects a tile. Stat opens the menu for a unit. Pressing left or right changes the current job. (if it is a job the unit cannot have, it will change to one it can have once the menu is closed) Some units can only have one job, while others can change it. XTOn places a road on the selected tile. Delete kills the unit or building selected giving a refund if needed (select buildings by selecting their tile) The building menu only opens if you have selected a tile. Clear is always quit. Be careful not to press it too long since it will quit the level. Press mode to end the level when you have completed the goal. Pressing ON+stat pauses the game and turns the screen off. Pressing ON will resume. (If you don't press it, you can keep playing after the goal has been completed)
Once the first 11 levels have been completed, the last 9 will unlock.

Tech tree:
   Storage: recruits workers and is where resources are deposited
   Small teleport: recruits everything below Loader dozer
   Power plant: powers nearby roads
   Support station: adds 10 air a tick (almost every unit uses 1 per tick) assuming it is next to a powered road
   Large teleport: recruits every unit from Loader dozer up
   Refinement station: Generates ore and crystals
   Buildings that need to be powered must have a powered road next to their main tile (the one you selected when you built them if they have multiple)

Units: Each unit can hold one of three jobs - Driller, clearer, or collector. Drillers mine the wall they are currently on and move to a nearby one if there is one. Walls will collapse (basically mined for free) if they are not next to two other walls. Clearers act just like drillers but they target the rubble left behind after the wall is drilled. Collectors collect the ore and crystals that are left behind by the clearers and drillers. They target crystals before ore and bring them to the nearest storage.
It is your job to figure out what all the units do. Be warned that the infinity ship is huge drain on resources.

[/spoiler]
6
General Help & Troubleshooting / Pathfinding
January 03, 2017, 07:22:36 PM
Hey!

I am working on a game and in my general worry-about-the-details-later programming style I ignored the fact that I was going to need to make a pathfinding algorithm. I have a couple ideas, but was wondering if there was any better ways of doing it. I am using a grid based world. It is never more than 50x50 tiles.

I could just brute force the best path, but I don't have a good way to check if the found path is the best one. Also storing the path once found could get large.

I may add waypoints so that the object can just move in a line form one to the next. This would be much smaller to store if the path has few turns but gets large if it winds.
I may add global waypoints to the map to help with navigation, especially with tricky areas.

Any thoughts?
7
Calc Projects, Programming & Tutorials / E37's projects
December 05, 2016, 08:11:21 PM
I tend to make little projects every now and then, and none of them really deserve their own thread. I guess I'll put them all here.
They aren't usually much, so feel free to ignore this thread unless you are really bored and want some dumb distraction for a little while.

cavegame: ShowHide

This was going to be my entry for the canceled game competition a while ago. I added some more stuff onto it since then.
It is a sandbox game in basic (so the framerate is pretty bad) Its only real plus is that it has 3 types of randomly generated worlds and (partly due to the lag) it took me about 30 minutes to fully explore one of each kind of world.
[spoiler=how to play]
you use the arrow keys to move the little x around. The map expands as you move around. The goal is to find the nodes (they look like pluses) as they increase your jump height by 1 for each one you find.
If you find a node without a center (just 4 dots like a plus missing the middle) that is the map node and pressing second reveals a mini-map and how many nodes total there are and how many have been found.
Pressing a key centered at '5' will delete a block at that respective place around the player. (pressing '8' will delete the block directly above you)
Doing the same thing but centered around 'cos(' will place a block.
Each of the 3 types of worlds has a special block. Cave has an upsides down 'U' that when you press 'alpha' you are teleported to a random spot on the map.
Random has an 'I' that makes you jump when you are near it.
Expansion has something that looks like an inverse node that stops you jump when nearby.

That's it.

If you take the time to play it, tell me. Maybe you will even like it.
[/spoiler]

I will add more when I feel like typing out how to use them.
8
Contests / Game competition
November 29, 2016, 08:09:29 PM
Ok. I decided to do a 2 hour game creation challenge.
The goal is to win a popular vote. The only prize is bragging rights.  8)
Post your results here.
Vote for the best after all submissions are in.
Don't vote for yourself.  :P
9
So... I was discussing map compression with p2, and figured it was worthy of a topic to explain it.
Let's pretend you are making a game. Most games have multiple maps, it takes up a lot of space to have multiple arrays to hold all your maps.
Here is how to make all your maps (with in reason) take up the space of one!
First you need to know the number of tile types. If your game just has air, grass, and stone, then there is 2 (assuming that the first tile type is 0)
You need 2 maps. They must be the same size!
I want to edit the slot. I will set the slot on the compressed matrix equal to: (valueOfFirstMap) + (valueOfSecondMap*Prime)
What? Where did that prime come from? That is what lets me compress the map. The prime must be bigger that the amount of types.
In my example, I had 3 different types. I will pick 5 since it is the first prime greater than 3.
If you do mod (prime), then the remainder will have to be the first map's entry because the second entry will be some multiple of the prime and come out evenly. Divided by the prime will ignore the remainder (the first layer) and only give the second map.

Want more maps?
lets pretend that you have a total of 3 types of tiles for each layer
How to add / get from any of the layers (Let's pretend there are 3):
The first prime will be 5. that is the smallest prime that is greater than 3 (the supposed total number of tiles for the first layer)
If there are 3 types on the next, here is how to get the next prime. 3*5 +3 is 18. That is the highest number that the the first 2 layers combined can be right?
Well, for the third layer, we need a prime bigger than 18. let's use 19. You add the third layer to the total of the previous two.
To get layer 1 and 2 it is the same as above. To get the third, just divide by the second prime (19 in the example)


You can continue this pattern until it overflows. (if the max you can hold in one entry is 2^16, then the highest possible entry must be less than that)

It works well for multilayer maps, but it will work for any sets of data that are the same size.
10
I am a firm believer that if it fits, then it should work! (I don't know how to say that without sounding wierd)
So, I bought a mini usb to USB converter. (read ti84 to flashdrive)
I was dumb and bought the wrong type! (It still fits but won't connect)
I was wondering if any hardware geeks could help my poor state. (I'm unwilling to but another $1.50 cord) I essentially have the newer version of the usb. (It has an extra pin or something)
I can't see how having too much of something is a bad thing...
So... now I'm convinced that I'll make it work. Don't worry, I have no clue what I'm doing.
Who knows? Maybe I'll fulfill my delusions of grandeur! So... I all I need to do is figure out how FAT16 is formatted and how to read and write to it! Any ideas/ suggestions? (Or don't post at all - just to show how bad an idea this really is)
I'll report back when I realize that I can't do this!
11
I suppose I need to go on a general overview of what the heck Oops is.
I call it Oops for "Object Oriented Program(s)" - It is the closest (I think) to an OOP you are going to get in Axe.
Oops is really good at managing large amounts of "objects" - like the 20 fighters you need in your game that each need a different amount of ram and need to be run, added and deleted.
Maybe explaining the functions will make it a little clearer.
1. SSet( PointerToListOfLabels, PointerToListOfSizes)
This creates a stack and initializes the pointers.
Example of use:

:Data(lPlayer^r,lShip1^r,lShip2^r)->labelPointer
:Data(15^r,5^r,40^r)-> sizePointer
:SSet(labelPointer,sizePointer)

In this example, the player would get 15 bytes of memory, ship1 would get 5 and ship2 would get 40. There can be up to 256 different types declared here. (Why would anyone need that many?)
Returns 0 if failed. Returns some other number if succeed.

2. SAdd(Type,Position)
Adds an object. It will be type specified. 0 is the first object, 1 is the second ect. It is in the order declared in SSet(). It will be added in the index specified. 0 is first ect. A negative number here will be the end of the stack.
... And an example:

:SAdd(0,0)
:SAdd(2,-1)

Using the declarations from above, this will add a player at slot 0 (the beginning) and a Ship2 at the end of the stack.
It returns a pointer to the start of the object's data. (use this to initialize it's variables if needed) The object's data will be filled with zeros. Returns 0 if failed.

3. SDelete(Position)
It deletes the object at the specified position. A negative number is the last object on the stack.
Example:

:SDelete(0)

Would delete the first object on the stack.
Returns 0 if failed (if there aren't any objects on the stack)

4. SRun()
There is no arguments for this command. It runs all the objects on the stack. Each object is passed a pointer to its memory in r1.
Example (on how the object should be structured)

:Lbl Player
:r1->A
:Output(0,0,{A}>Dec
:Return

Player would simply display the value of its first byte. {r1-1} is the object's type.
Note that StkNum is the current number. SDelete(StkNum) would delete the current object.
Returns: none

That's all! The library (when compiled) is less than 500 bytes!
It can be added anywhere inside the program.
The program automatically deletes stack upon exiting. (no need to clean up)
If you need to read the stack yourself, the variable Stack holds the pointer to the start of the stack.
12
Programs and Utilities / [ti-83+/84+] Hex unsquisher
September 24, 2016, 10:58:57 PM
I spent a half hour a couple days ago and made an assembly to hex opcodes converter.
Actually there is no magic involved in converting a runnable file into hex. Like really simple. If a byte of the program holds 255 the "unsquisher" places FF in the output program. Get it?
That's really all it does. You run the program, type the program's name in, (in ram) and it creates an unsquished copy of the program with theta as its first letter.

Here is the Axe source code. Unsquish is the source code and Opcodes is the executable.
13
General question: Does anyone know how to use the Menu hook? (and be willing to teach me how to use it)
I am familiar with how to use other hooks (home screen and key)
My current attempts have lead to some screwed up menus. (At least that much of the hook works)
I mainly use Axe, but can easily enough hash out a solution to a problem in assembly.
(I'm really just looking for some example code - I don't care if it is Axe or assembly and it doesn't even need to be commented!)
Thanks for any help!  :)
14
After a crash I decided to reinstall my 84's OS since it wouldn't get past the ram cleared screen.
Now it will install the OS but fail the validation after 3 seconds and ask for it to be reinstalled again.
I've tried 5 times...
I have unsigned installed, and can't get past the "Waiting... Please install operating system now."
Any suggestions?
15
Programs and Utilities / [ti-83+/84+] Solver
July 28, 2016, 02:37:56 PM
I made Solver to help with math. Duh.
It can, in reality do a lot of other things.

It allows the user to type in commands in the homescreen of the calc.
Here is a complete (I think) list of the functions:

Command - function - comments
PING - Displays "PONG!" - not really useful but can be used to check if it is installed
XON - none - turns the axes on
XOFF - none - what do you think?
TRACE - uses the Trace command - my calc's trace key broke so I added this to help
RAD - none - sets the mode to radians
DEG - none - what do you think?
*something*=*somethingElse* - solutions - solves the equation for the first variable (from the left) returns up to 999 solutions. See below for more detailed description.
*something*==*somethingElse* - 1 or 0 - tests for equality (one if *something* = *somethingElse* zero if not) this is the same as the standard single = test
Y=*equ* - "Sent" if sent and "Failed!" if none are free -sends *equ* to the first empty Y= space. See below

KILL - none - crashes the calc, resets the RAM, and turns the calc off
prgm*programName* - runs the program - if basic runs normally, if ASM runs it without the need of the "Asm(" command. Only runs NoShell

Details on a couple commands
*something*=*somethingElse* - it will solve for any variable. It looks for the first variable and turns all instances of in the equation into 'X'. Basically only use 'X' on its own. "5A=X" would be turned into "5X=X" and return 0. But, if B=3, and the equation "6A=B" was entered it would return the correct solution for A and treat B as a constant. X does work correctly on its own! "X^2=9" would return 3 and -3! The list of solutions is in Ans. If the solutions of the equation are 1,5,9,8 and 2, Ans would be the list {1,5,9,8,2}

Y=*equ* - If "Y=X" was entered and Y1 and Y2 had an equation then Y3 would = "X". If Y1 and Y3 had an equation, then it would be entered in Y2. It will never enter equations in Y0 for reasons explained later.

What it affects:
It does use several variables. It destroys the equation Y0, the Lists ASM and L1. Note that L1 is 2 separate tokens and NOT TO BE CONFUSED with the default list L1 that is available with 2nd,1.

Sound cool? The download is below. I would be happy to add a command for you, even if it is really simple. (Like *yourname* - returns "IS COOL")

Extras!!!
Want to make your own sets of commands or think mine are lame? Here is the instructions to make your own. It is really easy, all you need to know is how to program basic. (no Axe or ASM!)

Solver is really a basic program in a wrapper that runs it and gives it the last entry in Str0. Here are the Variables you can use without affecting any user variables:
Y0 - This gets cleared after every time the program runs so you are free to use it.
Str0 - the entry the user typed in is passed in Str0. There are a couple special things about it though. If the program ends with Str0 in any state (but deleted) it will assume that the program has run successfully and will disable the OS's evaluation of the entry. So if Str0 has been deleted it tells the OS that it doesn't need to do anything and to evaluate it. If "5+9" is entered and Str0 is deleted when the basic program returns, the OS will return 14. If Str0 is still intact, Solver will tell the OS that it took care of it, and nothing will be displayed. (Don't worry if you are confused, I will provide an example)
List ASM - This is a list to be declared by the basic program and I use it to save the Letter Variables I use and restore them when the program returns. The Basic program handles this completely and Solver only deletes it once the Basic program quits.
List L1 - Pretty much the same as ASM. Use it for whatever you want. It also gets cleared upon exit.
Str9 - Solver saves it and restores its correct value upon exit. Use it for whatever you want.
If the program throws an error it won't show up. Instead the Basic program exits quietly and the Solver code still runs. My equation solver is designed to error, continually checking for solutions until it errors at which point it quits.

Here is an example program:
PRGM:SOMENAME
:If Str0="E37"      //tests to see if the user entered E37
:Then:Disp "Is Cool!"   //function
:Return:End      //return with Str0 intact (so the OS doesn't try to calculate E*37 and show that result)
:
:If Str0="5+5"
:Then:Disp "Do it yourself!"
:Return:End
:
:If InString(Str0,"*")            //If the entry has a times sign in it
:Then:Disp expr(Str0)+randInt(-1,1)      //and or subtract one and display the result
:Return:End               //Stop OS evaluation and return
:
:1->dim(lASM)            //Setup a variable (I don't really need one)
:Expr(Str0)->lASM(1)         //Saves the value to the variable
:Disp Str0,"="            //Displays *the entry* = *what the OS evaluates the entry to be*
:DelVar Str0            //Tells the OS to evaluate the entry and display the result

If you have a custom Basic Program you made, post it and I will compile it and give you the download with your custom command set.

I hope this helps! (or at least was interesting)
16
I have several projects I have been working on and finished. (Although I am always looking for ways to improve them)
Here is a list of my best, which should I show first?
Editor: A small font program editor, and my proudest creation. I have implemented many features already, and am always open to adding new features.
Oops: Oops is a Axe library designed for combat games. It can handle huge amounts of "objects" and its only purpose is to handle a stack of them. (no collisions or anything fancy like that)
Solver: It adds a hook onto the standard screen letting you type in equations like "5+8A=94A^2" and spit out the answers for A (or any other variable) along with some other fancy features.
Staxm: a simple axiom that allows you to pop and push variables in Axe.
I'll probably go over one every couple weeks. (To give them time to shine or crash)
What order should I go over them?
Powered by EzPortal