June 26, 2019, 08:12:51 PM

Author Topic: Genus Prime - 8-BIT WARS competition entry  (Read 1617 times)

Offline Xerra

  • Hero Member
  • *****
  • Posts: 605
    • Retro Evolved
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #60 on: April 06, 2019, 06:08:29 PM »
Are you on macos 10.14 too?
Wonder why they both crash at Adams but not on yours. There's a difference between your systems.

My Mac is prehistoric but that shouldn't really cause an issue. I've been too busy using the machine to let the latest OS update install and restart it, however.


Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 1808
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #61 on: April 06, 2019, 06:40:11 PM »
High Sierra?   :o
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #62 on: April 06, 2019, 09:39:15 PM »
@ Xerra
Eaaasy fix:
Replace in GenusPrime.bmx:
Code: BlitzMax
  1. Field alive:int
  2. 'with
  3. Field alive:int = True
  4.  
If a ship was not alive it never decreased the count when getting destroyed ;-)

Updated my repo accordingly (just fetch a new GenusPrime.bmx if you want).



@ Steve




@ others
Uploaded v1.0.2 with fixes. Adams version for Mac should still work - as it did the "performance hungry" fix (creating a copy of a map containing all currently existing ships/missiles each time).


https://www.gamezworld.de/files/GenusPrime_v1.0.2_LinuxMacWindows.zip


Thanks for Xerra pointing me to the bug regarding the level end check/playerstates.


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1123
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #63 on: April 07, 2019, 08:30:21 AM »
Hi Derron.
I really like the concept for this and I'm going to use it as a test bed for my next project.
I like the concept of clicking/selection and sending things that you have no real control over

I'm working on the base core of clicking and selecting atm

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 1808
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #64 on: April 07, 2019, 08:47:14 AM »
@ Derron  :o :o  ;D
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #65 on: April 07, 2019, 09:32:18 AM »
Hi Derron.
I really like the concept for this and I'm going to use it as a test bed for my next project.
I like the concept of clicking/selection and sending things that you have no real control over

I'm working on the base core of clicking and selecting atm


Feel free to use some of the code / logic (it is Open Source you can have more than a peek).

Think one could do this in a Fantasy/Monsters world too ... so different castles (puddy-slime-pond-castle vs anthill-castle...)  and different troops. Would even allow for different TechTrees ...
Drop me a line if you want to tinker in a collaborative way.


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1123
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #66 on: April 07, 2019, 10:24:28 AM »
currently I am at the 'putting things on screen (squares, so no designation). I've added sizes and kinds, but neither have any function yet
and then sorting out the selecting - done

I'm not going to use any of the code or look at it. as I want to get a feel for how things fit together in my head (completely blank at the moment)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #67 on: April 07, 2019, 10:40:39 AM »
For selection and so on: all the entities on screen have an "area" which reflects their map position and dimension. This area-rectangle can either get converted to screenspace - or you just convert your input into map-space. Then a simple "entity.area.contains(mousePos) then SelectEntity(entity)" is enough to that.
Using group select - dunno if this is the best approach - I just used a check whether a groupSelectionRect is created (done on "button down" with x,y at mouse pos and w,h = 0,0) and if then button is no longer down you use the new mouse position for rectangle's width/height.

But I think you know all of this already as your other games hat similar interaction mechanics.


@ sizes
I had sizes for planets in too (for now they are fixed). Sizes would have then allowed for more population, more missiles, ...
but thought "feature creep"...so kept it out - same for stealth, anti-stealth, ...


What might be of interest for (...to think about - not to look at) is to make sure that cities/planets/castles/... "bases" are having a minimum distance to their neighbours - and to avoid clamping too much (or... to allow/enforce clamping/grouping). I prefer dynamically created worlds over hand crafted ones - as this allows for endless games (I use defined seeds - maybe it would have been a good idea to add a "seed input widget" for the random/skirmish games to more easily replay stuff).


First game idea was btw without the complexity of upgrades - just "grow and send" but then I saw that other games used a similar approach which is why I wanted to be at least a bit different. A pity that this means to increase gameplay complexity (which isn't what all players like).


PS: I protoyped with DrawOval too. Some stuff like mouse cursor and the animated selection rectangle are even still created using DrawRect chains. Sooner or later the "graphician" in me wanted to tinker a bit so you will do for sure too.


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1123
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #68 on: April 07, 2019, 01:00:47 PM »
Here's a base build showing a single selection and range. the yellow/grey things are the available units. they are yellow when they are available

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #69 on: April 07, 2019, 01:06:08 PM »
Does size of the objects influence "refill speed" (try to describe it in neutral words)?

The range indicator seems to say: you can only target stuff in range - so you need to "chain" your movements (had this in mind too but ended up with a simple planetary defense).

If so: think about what happens if eg "20 units" reach one of the same owners other circle which already has 20 of 30 "unit slots" filled. Cap increased or something send back or ... ?


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1123
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #70 on: April 08, 2019, 07:56:55 AM »
Derron - not to drial this I've moved further work into Strata Nova
https://www.syntaxbomb.com/index.php/topic,5446.msg25062.html#msg25062

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #71 on: April 17, 2019, 08:49:00 AM »
Xerra suggested to add some features - so I added some of them:

- "Ctrl + A" to select all your planets
- Middle-Mouse-Button "click" to center the click position on screen (mouse "drag" is TODO)
-> [Interface] added CTRL+A (select all) middle-mouse-button (map move). Idea: Xerra


Next to the suggestions I now also deselect a planet if you loose owner ship but only íf you selected multiple planets as a single planet selection might be intentional.


Will try the map drag later on and update binaries to test the new sound engine too (no more rtAudio for streamed ogg - if it works at least ;-)).
Now kindergarten asked me to help building up a skid/slide so real life "world building" is asking for my attention.

bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1123
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #72 on: April 18, 2019, 06:54:00 AM »
hint - middle mouse is not a brilliant support choice as many people don't have mice with 3 buttons or even 2 buttons.

if you were looking at (purely from a usability point). track the mouse. over a planet = select not over a planet = drag about - or consider not needing to drag the screen about (some form of auto scaling perhaps?)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #73 on: April 18, 2019, 08:11:50 AM »
@ auto scaling
Nope - we already have the ability to position via minimap clicks, moving mouse to the sides of the space-viewport


@ 3 buttons
Yes, these people with 1button mices would not be able to use the middle mouse buttons nor would they be able to use right click. For them you need to provide eg. "D" and "F" keys to emulate the buttons (D and F because of their positions for a resting-hand-on-keyboard - and F having the "marker" on it for 10 finger typing).


@ mouse over planet or not
If you have your mouse not over a single planet you most probably want to mouse-area-select. Also it might look a bit odd if you did not hit the targeted planet perfectly and now the scrolling starts (for the moment you "hit" the mouse - aka "mouse down" until you "clicked" which means you released the mouse button).

I could add the option (for 1-button-mouse-users) to handle double click: double click then "scrolls to".

Aside of that I could also just add a simple cursor-key-movement to get rid of all that extra handling for 1-button-mouse-users (except for "right click").


As said above one should not forget: map dragging, mouse map scrolling, ... this is a convenience-extra-feature which is reachable with mouse-movement (sides) and LMB-click (minimap) already.


@ new release
Will have to fight a little bug in my freeaudio-soundmanager as it bugs refilling stream buffers on the second crossfade to a track (a-b-a) think the TChannels behave not exactly as they should with static buffers or an even simpler but yet hidden bug.

bye
Ron

Offline Derron

  • Hero Member
  • *****
  • Posts: 2170
Re: Genus Prime - 8-BIT WARS competition entry
« Reply #74 on: April 22, 2019, 09:49:06 PM »
Took a bit longer to do that little bugfix ;-)

I rewrote the crossfader in my SoundManager class. The problem was or is, that there was no easy way to chain a streamed audio to a FreeAudio-channel object and to synchronize played time (to refill buffers accordingly etc.). Once I seem to have it working I found crackling sounds on my Windows 10 notebook - seems the FreeAudio module has some quirks for the Windows part if it is running Windows 98 :) - and these settings are required here too (and they are even used in an exaggerated way when utilizing the Direct Sound backend ...). Once that was fixed I now have had at least flawless playback on:
- notebook with Windows 10 64Bit and a Linux Mint 18 64bit
- my desktop with Linux Mint 18 64Bit
- 32bit Mini-XP-VM on my desktop

Was not able to check the audio output of the Mac but ...heyya.


So for all 3 OS this means the download here (v1.0.4) now does not use "maxmod2/rtAudio" for playback of the music but the BlitzMax-provided FreeAudio and a little custom audiostream solution by me. It might work - or might fail, dunno.
Maybe that even makes it work on Adam's Mac OS but I heavily doubt it.


Next to the audio backend I added:
- map dragging (middle mouse button)
- map clicking (middle mouse button)
- ctrl+a to select all planets


Download: https://github.com/GWRon/GenusPrime/releases/download/v1.0.4/GenusPrime_v104_LinuxMacWindows.zip


Would be nice if some of you (Xerra?) could give it a little test (sound playback and new control support). If your feedback is positive I would upload it to itch.io (maybe it finds some new players then).


bye
Ron