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 1 Guest are viewing this topic.

p2

Well THHAT'S what I call an update! :D Really nice work, @E37  :thumbsup:
You should probably write a separate post about your path finding algorithm as others may find that useful :)
  • 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

#16
Subroutine: AStar
CALL   PushNode(OpenStack,StartingX,StartingY,0,0,0)   // this sets the starting node and sets it's distance to the goal to 0. (that value doesn't matter it can really be anything since the x and y cords. determine if the goal has been found) I set its parent's x and y to 0 so when I am calculating the path at the end, I know that it is the starting node.

While ("tmpOpen" is not empty){
    If (!PathFound){
    CALL    Calc1Node       //this doesn't really need to be a subroutine but it makes it easier to read
    }Else{
    Return    //Sucess! Each node points to the previous one in the path so all you need to do is return up the stack starting with the node on the goal
    }
}
Return          //Fail! no paths exist to the target!

Subroutine: Calc1Node
Find the node that is the closest to the target on the open stack and pop it off the stack. You should ignore the node if it is on an impassible tile or already exists - It is perfectly fine to only add a couple nodes. You will only add 8 nodes on the first tile as every other tile will be adjacent to the tile that called it.
Calculate the 8 nodes nearest to it and their distance from the target (I used sqrt(abs(Y-TargetX)2+abs(Y-TargetY)2)+ValueOfTile  ValueOfTile is how much movement is needed to cross this tile - higher numbers are harder to cross!)
Push each of the nodes onto the open stack. Make sure to have them include their parent node's location! However if the node is on the goal tile, push it to the closed stack and set PathFound to true.
Push the node that was evaluated (the one that was popped off when this was called) onto the closed stack
Return

PushNode
/*
Node Structure
Toal: 6 bytes
1b: NodeX
1b: NodeY
2b: Distance to goal
1b: parentX
1b: parentY
*/
Pushes the node to either the open or closed stack. I inserted memory on the end of the appv to do the least amout of shifting. I also refound the pointers for both stacks in case they moved.
Return

PopNode
//pops a 6 byte node off the open stack. See node structure...
I used deleteMem once the data was retrieved.
I also refound the pointers for both stacks in case they moved.
Return

Define: "tmpOpen"       //list of nodes left to be checked
Define: "tmpClosed"    //list of nodes that have already been checked

Note: this returns the path form finish to start. You will want to make the goal pathfind to the unit!



I also tacked it onto the end of my huge Axe post!
  • 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

Darn this mining/drilling game looks very nice! I hope you can keep the speed as high as you can. Will there be specific objectives for each stage, such as having to finish mining a cave in a certain amount of time, then a different objective for the next stage and so on, or will the difficulty increase be mostly based on the complexity of each map?

Also your above post about pathfinding could definitively be a nice new topic.
  • 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'm a bit embarrassed, but I don't have a specific goal in mind. It may be on a timer (due to air consumption) or be against enemies like rock creatures. It could be something totally different.

Any suggestions?
  • 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!    <(^.^)>

123outerme

Quote from: E37 on January 17, 2017, 01:21:16 AM
I'm a bit embarrassed, but I don't have a specific goal in mind. It may be on a timer (due to air consumption) or be against enemies like rock creatures. It could be something totally different.

Any suggestions?
Maybe a meter like "fuel" or "fatigue"? When you do something extremely taxing, the meter goes down more than it usually does, or something along those lines.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

SiphonicSugar

E37, how do you get the will, inspiration, and motivation to do this? :P
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

E37

Quote from: 123outerme on January 17, 2017, 01:22:40 AM
Quote from: E37 on January 17, 2017, 01:21:16 AM
I'm a bit embarrassed, but I don't have a specific goal in mind. It may be on a timer (due to air consumption) or be against enemies like rock creatures. It could be something totally different.

Any suggestions?
Maybe a meter like "fuel" or "fatigue"? When you do something extremely taxing, the meter goes down more than it usually does, or something along those lines.
Sounds interesting. I may have the crystals expendable for something like to refresh air or something.  I still haven't made up my mind.

Quote from: SiphonicSugar on January 17, 2017, 01:24:48 AM
E37, how do you get the will, inspiration, and motivation to do this? :P
Pretty simple. I program mostly for myself. I don't worry about creating a presentable project, and make whatever comes to my mind. If I am tired of a project, I stop working on it and start another. Inspiration? Whatever comes to mind. I never plan a program out. It evolves as I work on it.
  • 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

Well... I am running out of ram. :P
Some of it needs to be in an app...
On the bright side, I added 2 new vehicles - Hover Scout and Loader Dozer!
I kicked it up to 15MHz so the framerate is much nicer. I also limited the framerate so that the game always runs smoothly.
You can also make buildings! I added a couple new buildings as well.
Added a new class of vehicle - lazer drill. (my other 2 were collector and drill)
Minor improvements to ai.
I will be approaching a beta release soon.

Sound cool?
  • 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

Quote from: E37 on January 18, 2017, 09:06:27 PMSound cool?
:walrii:  :thumbsup:

maybe you could move parts like the map into appvars to reduce the size...? (ever map except the one that is currently in use - probably split the map for that purpose)
buuut in your project map size will change almost nothing... :/
  • 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 19, 2017, 09:35:38 AM
Quote from: E37 on January 18, 2017, 09:06:27 PMSound cool?
:walrii:  :thumbsup:

maybe you could move parts like the map into appvars to reduce the size...? (ever map except the one that is currently in use - probably split the map for that purpose)
buuut in your project map size will change almost nothing... :/
I already did that. It saved 1000b. I also set it up to allow easy loading of different maps.
I am moving all the really heavy Ai to a separate appv. The main program will be an app, and it will run the appv which will save 6000b!

Any ideas for new units/ mechanics?
  • 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

it's about drilling a huge cave, right?
do you know the old bomberman games...? ;D
add bombs (one kind that is falling down, one kind that sticks to its pos) a well as lava explosive blocks in the wall that go off and kill you if you drill into them (traps) :)
  • 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 20, 2017, 09:10:19 AM
it's about drilling a huge cave, right?
do you know the old bomberman games...? ;D
add bombs (one kind that is falling down, one kind that sticks to its pos) a well as lava explosive blocks in the wall that go off and kill you if you drill into them (traps) :)
Oops... Looks like I wasn't clear on the purpose of the game. It is a top-down strategy game. You don't have a specific character. It is more about building a base, controlling workers and getting bigger and better vehicles to drill with.
  • 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

Update:
Added 3 new vehicles (they don't do anything yet)
Redid AI structure -saved 1000b
Redid unit spawning (when you buy a new unit) -saved 1000b
Added a title screen!
Added level selection!

I was thinking of adding and 'epic' version of each vehicle. It would be unlockable throughout the game for going above and beyond or reaching a secret area. They would be like the normal version of the vehicle but free to summon (the limit is 1 though)  and have a special upgrade. What do you think?
  • 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

I think it might be hard doing them, thinking about the tiles for the monochrome calc.
I'd rather go for general updates like in CookieClicker (all drills word 10% faster, all units move 15% faster, ...)
whats the general target of the game?

there was once a game where you had a special amount of oxigen (trappedo on a planet) and had to build stuff like robots and c to mine minerals and stuff to build a rocket and escape.
(how much is mined? % of how far you are in the game, also time countdown, the oxigen)
what is your game about? :)
  • 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

#29
The story is you are the captain of an exploration ship in space. Your mission is to discover new planets for mining. Your ship is sucked through a wormhole and is badly damaged. You need the crystals on the planet to restore power and the ore to repair the ship. The ship remains in orbit, while units are teleported down to the planet. (There is a crystal cost to power the ship's teleporter) There will be several dangers including hungry rock monsters and crystal draining slugs. Landslides and a depleting oxygen supply are the natural hazards.

I have made 10 out of 20 levels so far. Some levels can be completed in under 10 minutes and others take an hour to beat. The levels are also not linear. Sometimes you can pick between 3 levels and other times you are forced to complete one. Of course you can go back and beat the levels you skip.

It takes so long to compile! I timed it once and to recompile all the parts of it is over two minutes! Thankfully I only have to recompile small parts of it to make a change.

Note that I am not used to the controls. It is fairly easy to use. I also used god mode on the first couple levels to show the level unlocking.
  • 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