This is awesome, but it sounds like if it will really end up being Clash of Clans, you'd need to get pretty good compression on everything. How much memory does the current prgm take up?
You are probably right:

Total bites is 8.6k
I would say about 1k-1.5k for the actual program maybe less

28x14 sprites:
- Grass
- Wall

20*20 sprites:
- Two animation states for the cannon (smaller pieces that change)

56*28 sprites:
- Base of the cannon


Most of the sprites are going to be the 56*28 or even bigger if it wants to overlap for the 3D feeling (such as the archer tower being tall and partially covering the squares behind it

What I am most likely going to have to is make most of the sprites a lot less detailed by halving the pixels. I am not super familiar with how do do any compression or storing the sprites in appvars so I might need a bit of help in the future Smile
I really suggest Huffman/pattern replacement compression. That would make the program really small, especially if the actual program is only 1k. If you give proper credit, you could use the Huffman.exe file in JamesV's Banchor.

EDIT: If you don't add too much to the textures, you could get as much as 85-90% compression, and that could drop the program down to abt. 3.5k.
Also, I looked at the GitHub and it only has the readme. Have you added the actual file yet?
sJRw wrote:
Also, I looked at the GitHub and it only has the readme. Have you added the actual file yet?

The source code is in a zip file linked to in the release.
The source file only has the readme in it.
sJRw wrote:
The source file only has the readme in it.

The source is quite clearly in the release zip.
sJRw wrote:
The source file only has the readme in it.

Not the zip file included in the release, the zip file linked in the release.
This looks nice, but how will you handle transparency of moving objects on the map like those wooden pillars? :O I always wanted to make an isometric game in the past but that transparency thing when character or unit sprites move partially behind map tiles made it seem like it would be much difficult for me to make such game run at acceptable speed (although in ICE that might not be as much of an issue but I was curious)
I am picking this project up again (:

Things I have added since last post:
- Buildings larger than 1x1 now work
- animation system with a dynamic tickrate
- map saving/loading into an appvar
- an object placing system, just temporary for now

For keeping the layering with troops I will probably end up re-drawing the buildings that are under it, but if there are a lot of troops, it could turn into basically re-drawing the map every frame. For now, however; I will just not mess with that for simplicity

Like the layering, I’m just not going to worry about sprite compression for now - I’ll work on it when I get to that point
Glad to see you back at it! Just so you're aware, sprite de-compression is quite slow so I would recommend caching commonly used sprites. It does significantly reduce file sizes though so definitely worth looking into when you get to it.
After working on sprites a bit more, I don’t think I will need to do any type of compression. So far I have cannons, archer towers, grass, bombs and a few other small things, I haven’t even broken 10kb. With another roughly 140kb available if I am smart with them I shouldn’t need to do any other tricks.

Some things I have added since last update:
- fixed map checking bug (it was reading bytes outside of the map list)
- added bombs
- added fence connecting (or re-added I think)
- added an archer tower
- slowed down cursor to usable speeds
- added info: when hovering over an object you can select it to see the info (type, level, a neat pic)
- added loading screen: shows THE-RAD-ONE instead of SUP-ERC-ELL (see what I did there) that is actually loading things

Here is some eye candy (sorry for irl calc):
Hey back again for a double post (:

For troop pathing:
I am not sure if I want to spend a ton of time on it especially if I’m the end it will just make the game too slow, so I have a few options:

1. Have the troops just go in a straight line towards closest defender: this wouldn’t include walls, but they would still have to go trough the walls
2. Just get rid of walls and convert the target game to CoC’s close cousin boom beach (very fun game btw) which has no walls and could simplify a lot of things (but I would loose the outlandish idea of having clash of clans on a calc)
3. If you have a better idea, please tell me (:

____________________

Things I have added:
- got rid of building overlapping
- if you break a square that is visually a 2x2 but is just an open spot, it will break the 2x2
- improved selecting info and hovering info a bit
- added troop info list (for each troop):
- added troop spawning
- added defender info list (for each building)
- troop movement: Just going in a single direction when spawned right now
- troop drawing: currently has some flickering that is definitely noticeable but I am ignoring it for now

____________________

Things I am currently working on:
- adding buildings into defender info list when placed and removing when destroyed
- visual indicators of health
- more in depth hover info
- troop pathing


No eye candy today because there haven’t been a whole lot of visual improvement that could be shown in a picture ):
This is really coming along nicely! Great job so far Smile
What if each unit only re-made their target path every second or other interval? This may solve the performance issue you’re afraid of.

Very fun project by the way Smile
Thanks (:

Refreshing the paths every second could work, especially since the map is limited to a 10x10.

After thinking about it a bit more, instead of the troops having their own kind of coordinates, I could have them follow the building’s coordinate system that it is a grid. Every time they would move grid spots I could have them re-find their path.

Something that could be even more efficient is if they re-path when the map changes. Since that is the only thing that would be affecting the path anyway, it should work.

So many ideas (:
Howdy, I come with many a message Very Happy

Pathfinding:
I finished the pathfinding system, but am still working out small bugs. I haven’t optimized it yet like the TI basic version I made (it’s just a simple floodfill and backtrack algorithm), when I do it should help somewhat with the issues that have been created.

The main issue is that the FPS drops significantly, causing all of the troops to move slowly. I mostly fixed this by limiting the FPS to 15 (with no troops it sits at a stable 50-60 FPS) and limiting the floodfill max distance to 15. I haven’t added attacking walls if a defense isn’t found yet, but it shouldn’t take a whole lot of effort (right now they just run to (0,0)).

The current max troops on the move is around 7-10 before the FPS drops below 15 but I predict it will be a lot higher when optimized
__________________________________

Gameplay:
I haven’t thought a whole lot about this, but I’m not super sure on what to do with the gameplay. My current ideas are:

1. Focus on the base building more like actual CoC with resource collection, and attacking others for resources every now and then

2. A sandbox sort of thing where you can set up bases and try to destroy them.

For both of these I could add a send/receive system if you want to battle a friend or smthing. Number one would obviously be more complicated to do with automated base creation (or at least pre making enough to not be boring) please tell me what you would rather or another idea for it (:
__________________________________

Gameplay/visuals/map:
Another problem I have is that the map is a little bit tight. Zooming will very much not be a thing, but the map already hits the sides of the screen at only 10x10. There honestly isn’t enough room for a town hall. I could expand it to a 20x20 and shrink the tiles but it could become too hard to see and demand a zoom feature anyway. I could do a scroll feature but that would take a lot of work. (I think it might be the only option)

__________________________________

Other things:
I am going to be home soon so that means a few things:

1. Development with definitely slow down because of school again (might even pause until I go on vacation again ngl)

2. I’ll be able to upload source code and program to GitHub

3. Sprites that don’t look funky that I can just yoink from CoC

__________________________________

Changelog:
Finished:
+ troop pathfinding
+ grid movement for troops
+ smooth movement for troops
+ FPS limiter
+ fixed troop draw
+ troop states (moving [direction], attacking, idle]
+ did a lot of bug fixing

Todo:
+ implementing troop states (currently just space for it in data)
+ bug: troops only move to source block of 2x2
+ add wall attacking
+ troop sprites
+ troop animations
+ health indicators
Slight double post but ehhh Razz

I updated the github for yall. please don't comment on my garbage code
It has the source, compiled, files and an example map

TheRad2 wrote:
I haven’t added attacking walls if a defense isn’t found yet, but it shouldn’t take a whole lot of effort

So I have learned from my past actions of saying something should be simple... I worked on it for a few hours but got frustrated with it. Currently not finished but is relatively close...

Changelog:
+ cleaned up pathfinding alg (still bad)
+ worked on wall attacking
+ banged my head on the wall a couple of times
+ fixed a lot of bugs with troop movement
+ made a cute sprite for the troop Smile
+ fixed some bugs with troop initializing
+ I'm definitely forgetting something
+ troop health (and displaying it)

ToDo:
+ finish wall attacking
+ optimize pathfinding
+ add a menu for object placing instead of individual keybinds
+ re-write object placing code (to go along with menu)
+ fix weird pathing glitches that require ram reset to fix
is there a completed version? if so, can u make it so when u play, it doesn't crash you calculator and reset it?
tell me if there is a fully completed version with shop, enemies, gold, elixir, and l the other stuff you said
also can u give me a list of controls, also the game isjust a map with a pre-made base. Is this the right version? i didnt download the alpha
it would be cool to have a port on coc on ti 84 plus ce Very Happy Good Idea Laughing Razz Surprised 2

(edited by admin to combine a 5-combo double-post into a single post)
I'm not working on this project anymore - it just got too messy while programming on the calculator, and I don't ever plan on working on it on a pc. It's still possible that Ill work on it if I go on a long vacation without a laptop, but I wouldn't count on that at all.

Just letting you know, this clash of clans project was never to port it, but just make something to laugh at with your friends or something. Also, there isn't anything that I know of related to coc for the ce.

The controls are in the github repo readme - have fun Good Idea
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement