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

E37's projects

Started by E37, December 05, 2016, 08:11:21 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

E37

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.

[spoiler=cavegame]
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.
[/spoiler]
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.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

I will try this when I have a chance. You should post a screenshot :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

I have been working on a game recently. It is a caving game where you can place buildings, teleport in 'miners' and drilling units. You start out with a small area discovered and can uncover more caves.
Right now, I just use the cursor to destroy walls, but eventually the units will. The game looks a lot better on an actual calc. I used the A* pathfinding algorithm (the only good example in the screenshot is when the unit went around some rubble which would have been a slower path)

I am debating whether to make it turn based because the whenever a unit pathfinds, it can lag up to a second.

After the program exits, pressing the ON key shows "X=7.2E-128 Y=7.2E-128" in small font at the bottom left corner of the screen. It doesn't appear to be harmful but I can't figure what is causing it. I am sure the program causes it.

Any thoughts?
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

p4nix

Looks very good, too bad I don't have a TI calculator. Maybe you can only calculate a few parts of the A* algorithm using something like interrupts or polling...
In which language did you program this?
  • Calculators owned: fx9860GII (SH4)

E37

Quote from: p4nix on January 07, 2017, 06:20:49 PM
Looks very good, too bad I don't have a TI calculator. Maybe you can only calculate a few parts of the A* algorithm using something like interrupts or polling...
In which language did you program this?

That might be possible, but The trouble starts when there are 5+ of them all wanting to pathfind.
It is in Axe.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

E37

#5
[spoiler=Oops]
Yah... the download I had on the thread on oops was bad... I'll fix it eventually (The donwload here is good)
Here is a copy of that post:


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 and its current number is r2.
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.



[/spoiler]

[spoiler=Erosion]
This is less of a game and more of a simulation. When you run it it shows a number on the screen. Use the arrow keys to change its size. It is how big the squares on the screen are. The bigger the number the shorter the game - it can last anywhere from less than a second to more than an hour! Hit enter to start.
Once it starts, all user interaction is done. That's it. All you get to do is watch as 4 'colors' battle to spread across the entire screen. Hitting ON turns off the screen but contiues to run the simulation. Clear quits the game.
It is kinda fun to watch or just check every little while. This was a huge optimization challenge for me, as I started with a 4000b program that used a huge external program to keep track of the tiles to this 1100b program that uses no external data and runs a lot faster!

[/spoiler]

[spoiler=AxeDoc]
This program (and its two appvars) contains the entire Axe Parser command list! It is pretty self- explanitory. Super useful if you need to check the syntax of a command.
[/spoiler]

[spoiler=Spiral]
This one is in basic!
Another optimisation challenge, this program draws 2 different spirals depending on whether you are in degrees or radians. It is less than 100b so you might as well check it out.
[/spoiler]

[spoiler=Cave]
This is my Axe remake of the classic cave game! You have to safely fly through the cave avoiding the walls! It has my highscore in it, so you can see if you can beat it.
Press the up arrow to move up...
[/spoiler]

I will add more when I feel like typing out how to use them.

I am too lazy to make screenshots. If you want one, ask me.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

p4nix

Feels bad not having a calculator which can run Axe ;) Keep your good work up tho, from the descriptions it sounds very interesting. Could you still add some eyecandy (screenshots)?
  • Calculators owned: fx9860GII (SH4)

p2

Quote from: E37 on January 07, 2017, 06:01:48 PMAfter the program exits, pressing the ON key shows "X=7.2E-128 Y=7.2E-128" in small font at the bottom left corner of the screen. It doesn't appear to be harmful but I can't figure what is causing it. I am sure the program causes it.

Any thoughts?
sounds like its displaying (or at least trying to) the cursor position. That means you have to reset the game from graph screen to main text screen (don't ask me how).
Still you should get a problem as it seems you have altered the part of memory where the cursor position is saved. The address for that should be somewhere in TI Wiki.
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

E37

#8
That makes sense!  :D
I'm testing it now. There is no point in the os that does it normally that I can think of though...

I have fixed it!
It turns out that if you use L2 (statVars) as a 756b buffer, you need to 0 it before you quit.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

p2

Glad to hear :)
Was that already your last known bug, or are there others? ^^
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

E37

They are always more. Killing one causes 3 more to pop up each more bizarre than the last.  ;)

I hope to upload some more screenies later today,.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

kotu

you'll have to research learning magic spells
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

p2

Quote from: E37 on January 12, 2017, 06:22:26 PM
They are always more. Killing one causes 3 more to pop up each more bizarre than the last.  ;)

I hope to upload some more screenies later today,.
* p2 is waiting for his eye candy

sorry if I'm being pushy >.<
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

E37

Quote from: p2 on January 13, 2017, 08:45:29 AM
Quote from: E37 on January 12, 2017, 06:22:26 PM
They are always more. Killing one causes 3 more to pop up each more bizarre than the last.  ;)

I hope to upload some more screenies later today,.
* p2 is waiting for his eye candy

sorry if I'm being pushy >.<
Not at all  ;)
I tried to introduce more features and seriously broke things...
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

E37

#14
Well... I finally got it working! (and added a load of new things)
I increased the map size, made it turn based, cut the average pathfinding time in half, vastly improved the greyscale (greylib), improved the worker's ai, added 2 new vehicles, made it so the units (not the user) have to drill walls, fixed all the memory leaks and completed some general optimizations!
Don't worry, there will be screenshots!

Planned features:
4 more vehicles
a way to remove units once they have been created
the ability to create buildings
some enemies
better control options
more buildings (all the buildings that currently exist are in the screenshot)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Powered by EzPortal