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
  
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 2
» 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